How can I label only one line of an equation array?
amsmath
provides a similar interface to eqnarray
, but is better in terms of it's horizontal spacing/alignment:
\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\begin{document}
\begin{align}
X &= Y + Z \label{eqn:1} \\
&\leq U \times W. \nonumber \\
& = Y + Z \tag{a}
\end{align}
\end{document}
\nonumber
removes the number for that line in the align
environment. \tag
can also be used to create a manual tag.
if only one equation number is wanted for a group, the split
environment from
amsmath
is a reasonable candidate; it must be "wrapped" in an equation
environment for the equation number to appear.
if all the equations in a group are to be numbered, then (as pointed out in other answers)
the align
environment is more suitable.
\begin{equation}
\begin{split}
X &=Y+Z\\
&\leq U \times W
\end{split}
\label{eqn:1}
\end{equation}
\begin{align}
X &=Y+Z \label{eqn:2}\\
&\leq U \times W \label{eqn:3}
\end{align}