next up previous contents index
Next: Alignment building blocks Up: Displayed equations (amsmath Previous: Equation groups without

Equation groups with mutual alignment

The align environment is used for two or more equations when vertical alignment is desired; usually binary relations such as equal signs are aligned (see Table 2.1).

To have several equation columns side-by-side, use extra ampersands to separate the columns:

\begin{align}
x&=y       & X&=Y       & a&=b+c\\ 
x'&=y'     & X'&=Y'     & a'&=b\\ 
x+x'&=y+y' & X+X'&=Y+Y' & a'b&=c'b
\end{align}
Line-by-line annotations on an equation can be done by judicious application of text inside an align environment:

\begin{align}
x& = y_1-y_2+y_3-y_5+y_8-\dots
                    && \text{by \eqref{eq:C}}\\ 
 & = y'\circ y^*    && \text{by \eqref{eq:D}}\\ 
 & = y(0) y'        && \text {by Axiom 1.}
\end{align}
A variant environment alignat allows the space between equation columns to be explicitly specified. Here the number of equation columns must also be specified (where the number of `columns' is calculated as with number of & markers on any line).

\begin{alignat}{2}
x& = y_1-y_2+y_3-y_5+y_8-\dots
                  &\quad& \text{by \eqref{eq:C}}\\ 
 & = y'\circ y^*  && \text{by \eqref{eq:D}}\\ 
 & = y(0) y'      && \text {by Axiom 1.}
\end{alignat}



Carsten Braeutigam
Sun Jun 25 14:57:10 MET DST 1995