[Tex/LaTex] How to write two small equations in the same line

equations

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

\begin{eqnarray}   

\end{eqnarray} 

does not provide the solution. Kindly help me.

Best Answer

You could use the align environment for such purposes.

\documentclass{article}

\usepackage{mathtools}
\begin{document}
\begin{align}
  x &= a & x &= b \\
  x &=\max(n/2,l/2)  & x &= \min(n/2,l/2) 
\end{align}
\end{document}

enter image description here