9 Aligning Equations
TheĀ align
environment is used for two or more equations when vertical alignment is desired.
Example:
[latex]\begin{align} (1+i_{e})^2&=(1+0.025)^4 &&(\text{by 7.5})\\ i_{e}&=(1.025)^{\frac{4}{2}}-1 \\ i_{e}&=0.050625=5.0625\% \end{align}[/latex]
[latex]
\begin{align}
(1+i_{e})^2&=(1+0.025)^4 &&(\text{by 7.5})\\
i_{e}&=(1.025)^{\frac{4}{2}}-1\\
i_{e}&=0.050625=5.0625\%
\end{align}
[/latex]
The & symbols separate the columns. There must be two columns (i.e. one & symbol). The \\ tells LaTeX that you are finished with this line and are on to the next. Notice that there’s no \\ on the last line; the \end{align*} tells LaTeX that you’re finished.
Exercises
Typeset the following equation:
[latex]\begin{align} x^2 + y^2 &= 1 \\ y &= \sqrt{1 - x^2}. \end{align}[/latex]