CamteX
All guides

Aligned equations in LaTeX

Several equations aligned at the = sign are written with the align environment. The & character marks the alignment point and \\ ends a row. align numbers every equation, align* numbers none.

Step-by-step derivation

\begin{aligned} (a+b)^2 &= (a+b)(a+b) \\ &= a^2 + 2ab + b^2 \end{aligned}
(a+b)2=(a+b)(a+b)=a2+2ab+b2\begin{aligned} (a+b)^2 &= (a+b)(a+b) \\ &= a^2 + 2ab + b^2 \end{aligned}

Numbered equations in a document

\begin{align}
  F &= ma \label{eq:newton} \\
  E &= mc^2 \nonumber
\end{align}

Common mistakes

See also

Don't want to memorize commands?

Draw a formula or paste a screenshot, and CamteX turns it into ready LaTeX.

Try it free