[Tex/LaTex] Formatting multiple equations in one displaymath line

equationsspacing

If I want to write multiple equations in the same line in displaymath mode, I would do something like this:

\[
a + b = c
\qquad\text{and}\qquad
a^2 + b^2 = c^2
\]

But I know it's not good to rely on manual spacing. Is there a better way to get the same effect?

Best Answer

I think your solution is fine, in particular, since it is only one line of equations. Other than that, groups of equations next to each other can be obtained with align, or alignat from the amsmath package. Note however, that these two environments add more space above and below the equations. Compare:

\documentclass{article}

\usepackage{amsmath}

\begin{document}
\hrule
\[
  a + b = c \qquad\text{and}\qquad a^2 + b^2 = c^2
\]
\hrule

\bigskip

\hrule
\begin{equation*}
  a + b = c \qquad\text{and}\qquad a^2 + b^2 = c^2
\end{equation*}
\hrule

\bigskip

\hrule
\begin{align*}
  a + b &= c  &\text{and } a^2 + b^2 &= c^2
\end{align*}
\hrule
\bigskip

\hrule
\begin{alignat*}{2}
  a + b &= c  &\qquad\text{and}\qquad a^2 + b^2 &= c^2
\end{alignat*}
\hrule
\end{document}

leading to enter image description here

Related Question