0

I want to do the following: Some vectors (using pmatrix) aligned in an align environment but with a single equation number (using split):

\documentclass[11pt]{article}
\usepackage{amsmath}

\begin{document}

\begin{align}
\begin{split}
{\bf a}
&=
\begin{pmatrix}
0 \\ 0 \\ 1
\end{pmatrix}
\, ,
&{\bf b}
&=
\begin{pmatrix}
-\tfrac{\sqrt{2}}{3} \\ -\sqrt{\tfrac{2}{3}} \\ \tfrac{1}{3}
\end{pmatrix}
\, , \\
{\bf c}
&=
\begin{pmatrix}
-\tfrac{2\sqrt{2}}{3} \\ 0 \\ -\tfrac{1}{3}
\end{pmatrix}
\, ,
&{\bf d}
&=
\begin{pmatrix}
-\tfrac{\sqrt{2}}{3} \\ \sqrt{\tfrac{2}{3}} \\ \tfrac{1}{3}
\end{pmatrix}
\, .
\end{split}
\end{align}

\end{document}

I get error message like Extra alignment tab has been changed to \cr. }$\hfill \endtemplate. Using eqnarray it works. Why is that and is it possible to use align instead?

1 Answer 1

1

you want only one equation number, so think of this as a single equation, and use the substructure aligned inside of that:

\documentclass[11pt]{article}
\usepackage{amsmath}

\begin{document}

\begin{equation}
\begin{aligned}
{\bf a}
&=
\begin{pmatrix}
0 \\ 0 \\ 1
\end{pmatrix}
\, ,
&{\bf b}
&=
\begin{pmatrix}
-\tfrac{\sqrt{2}}{3} \\ -\sqrt{\tfrac{2}{3}} \\ \tfrac{1}{3}
\end{pmatrix}
\, , \\
{\bf c}
&=
\begin{pmatrix}
-\tfrac{2\sqrt{2}}{3} \\ 0 \\ -\tfrac{1}{3}
\end{pmatrix}
\, ,
&{\bf d}
&=
\begin{pmatrix}
-\tfrac{\sqrt{2}}{3} \\ \sqrt{\tfrac{2}{3}} \\ \tfrac{1}{3}
\end{pmatrix}
\, .
\end{aligned}
\end{equation}

\end{document}

split can support only a single &, so any attempt to have additional alignment points will result in the Extra alignment tab has been changed to \cr. that you encountered.

there are several different sub-structures provided by amsmath. take a look at the documentation: texdoc amsmath. (and mathtools provides another that's "missing" from amsmath.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .