When I use double dollar signs $$
or \[
and \]
to begin and end math mode I have no problem compiling the file. When I substitute them with \begin{equation}
and \end{equation}
correspondingly I get an error.
For example:
\[
\label{eq:stress_strain_eq}
\left\{\begin{array}{c}
\sigma_x \\
\sigma_y \\
\tau_{xy}
\end{array}\right\}
=
\begin{bmatrix}
\overline{Q}_{11} & \overline{Q}_{12} & \overline{Q}_{16} \\[0.3em]
\overline{Q}_{12} & \overline{Q}_{22} & \overline{Q}_{26} \\[0.3em]
\overline{Q}_{16} & \overline{Q}_{26} & \overline{Q}_{66}
\end{bmatrix}
\cdot
\left\{\begin{array}{c}
\epsilon_x \\
\epsilon_y \\
\gamma_{xy}
\end{array}\right\}
\]
produces the right result but I cannot reference it. I thought that the three options were interchangeable.
\begin{equation}
, don't include\[
or$$
. Also see Why is\[
…\]
preferable to$$
?\[
. The problem is now solved by moving the\label{}
at the end of the block just before\end{equation}