# Why isn't eqref working?

I am trying to use \eqref as in the following, but instead of (1), I get a set of blank parentheses as the result. Could anyone help me fix the problem?

\documentclass[10pt]{article}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage[left=1.5in,right=1.5in,bottom=1.5in,top=1.5in]{geometry}

\begin{document}

\label{eq:2} \begin{align*} 1\cdot 2+2\cdot 3+3\cdot 4+ \cdots+k\cdot(k+1)+(k+1)(k+2) &= \frac{(k+1)(k+2)(k+3)}{3} \\ &= \frac{(k^2+3k+2)(k+3)}{3} \\ &= \frac{k^3+3k^2+3k^2+9k+2k+6}{3} \\ &= \frac{k^3+6k^2+11k+6}{3}. \end{align*}

assuming ~\eqref{eq:2} ...

\end{document}
-
Your document does not compile - that's the problem. – Werner Jan 23 '14 at 6:04

You're not allowed to use the equation or align* environments inside a display math $...$ context. They create these themselves. Instead, use

\documentclass[10pt]{article}
\usepackage{amsmath}
\usepackage[margin=1.5in]{geometry}
\begin{document}

$$\label{eq:2} \begin{split} 1\cdot 2+2\cdot 3+3\cdot 4+ \cdots+k\cdot(k+1)+(k+1)(k+2) &= \frac{(k+1)(k+2)(k+3)}{3} \\ &= \frac{(k^2+3k+2)(k+3)}{3} \\ &= \frac{k^3+3k^2+3k^2+9k+2k+6}{3} \\ &= \frac{k^3+6k^2+11k+6}{3}. \end{split}$$

assuming~\eqref{eq:2} ...

\end{document}

The above split usage follows directly from an example in the amsmath user guide (Table 3.1, p 4).

-
it's also worth noting that a * on a display math environment suppresses the equation number. – barbara beeton Jan 23 '14 at 7:42