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

=\frac{1}{3}(1 + 2 + 3)

Now i' get

enter image description here

but it should look like this:

enter image description here


Load the package amsmath and use the {align} environment:

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

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

\overline{x} &=& \frac{1}{n}\sum_{i=1}^{n}x_{i}\\
&=& \frac{1}{3}(1 + 2 + 3)\\
&=& 2
  • 2
    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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.