# equation: Write equal sign below each other

I want to write the equal sign below each other. My code is

\begin{equation*}
\overline{x}=\frac{1}{n}\sum_{i=1}^{n}x_{i}
=\frac{1}{3}(1 + 2 + 3)
=2
\end{equation*}


Now i' get but it should look like this: Load the package amsmath and use the {align} environment:

\begin{align*}
\overline{x}&=\frac{1}{n}\sum_{i=1}^{n}x_{i} \\
&=\frac{1}{3}(1 + 2 + 3) \\
&=2
\end{align*}


End all lines except the last one with \\ and insert & before the symbol you want the columns to be aligned at.

• Have you ever heard of split? – egreg Aug 31 '17 at 8:43
• Nope, but i found this thread: tex.stackexchange.com/questions/239252/… I will read about this topic. But for now, amsmath and align is working perfectly. – ipo Aug 31 '17 at 9:02
\begin{eqnarray*}
\overline{x} &=& \frac{1}{n}\sum_{i=1}^{n}x_{i}\\
&=& \frac{1}{3}(1 + 2 + 3)\\
&=& 2
\end{eqnarray*}

• Welcome to the site! Thanks very much for your first contribution! =) However, you should know that eqnarray is severely deprecated and out of date; you should definitely consider following the accepted answer and switch to align – Au101 Mar 13 '18 at 21:24