Cross-referencing an equation

Your question is more a general question about labeling and referencing equations.

I think one great introduction is the mathmode of Herbert Voss. It's available at CTAN.

mathmode at CTAN

In the linked document you will find an extra sub section about Labels. It is introduced by:

Every numbered equation can have a label to which a reference is possible.

  • There is one restriction for the label names, they cannot include one of LaTeX’s 8 command characters.
  • The label names are replaced by the equation number.

Update

The following point was mentioned by Mico:

It may be useful to note that in addition to the eight "basic" special characters that can't be used inside labels, users should also refrain from using

  1. commas if the plan on using the cleveref package or
  2. any characters that have special meanings for various languages supported by the babel package (such as : in babel/French).

The environment equation doesn't allow any line breaks. So the syntax will be:

\begin{equation}
 a^2+b^2=c^2\label{eq:1}
\end{equation}

The environment align allows line breaks and so every line can get a label.

\begin{align}
  x^2+y^2&=2r^2 \label{eq:1} \\
  d^2+h^2&=4r^2 \label{eq:2}
\end{align}

To reference to a given label you can use the standard command \ref or any other reference command provided by some packages. I like to use \eqref to reference to equations.

Here a complete example:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
 a^2+b^2=c^2\label{eq:1}
\end{equation}
Text \eqref{eq:1}
\end{document}

For align and equation numbering you might be also interested in using align together with subequations.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{subequations}\label{eq:1}
\begin{align} 
 a^2+b^2=c^2\label{eq:1a} \\
 a^2+b^2=c^2\label{eq:1b} 
\end{align}
\end{subequations}
Text \eqref{eq:1}, \eqref{eq:1a}, \eqref{eq:1b}
\end{document}