I am trying to write equations x=a and x=b in the same line.



does not provide the solution. Kindly help me.

  • 3
    ..$x=a$ and $x=b$ ... Jan 3, 2016 at 12:28
  • And what if the equations are long ? like x = max{n/2,l/2} and y = min{n/2,l/2} .
    – monalisa
    Jan 3, 2016 at 12:30
  • 1
    they may break over the line as the lines in the paragraph are arranged, but that would be a different question since this question explictly asks for two short equations fitting on a line. Jan 3, 2016 at 12:31
  • why did you tag this with biblatex? Jan 3, 2016 at 12:33
  • ...and why do you use the outdated eqnarray environment?
    – user31729
    Jan 3, 2016 at 12:40

2 Answers 2


You could use the align environment for such purposes.


  x &= a & x &= b \\
  x &=\max(n/2,l/2)  & x &= \min(n/2,l/2) 

enter image description here


I assume you want the pairs of equations to occupy an entire line and that the amount of whitespace between the pair should equal that to the left of the first equation and to the right of the second equation. If this assumption is correct, you could use \hfill instructions as is done the following code. (The \hrule directives are used merely to illustrate with width of the text block.)

enter image description here


$\hfill x=a \hfill x=b \hfill$

$\hfill x = \max(n/2,l/2) \hfill y = \min(n/2,l/2) \hfill$


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .