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:
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.
\begin{eqnarray*}
\overline{x} &=& \frac{1}{n}\sum_{i=1}^{n}x_{i}\\
&=& \frac{1}{3}(1 + 2 + 3)\\
&=& 2
\end{eqnarray*}
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
split? – egreg Aug 31 '17 at 08:43amsmathandalignis working perfectly. – idontknowwhoiamgodhelpme Aug 31 '17 at 09:02