1
\documentclass{article}
\usepackage{amsmath,amsfonts,amsthm,amssymb,mathrsfs,latexsym,paralist}
\begin{document}
\[
\begin{bmatrix}
    1 & 0 & 0 & -1 & 0  & 0  & 1 & -1 & 1  & -1 & 0 \\
    0 & 1 & 0 & 0  & -1 & 0  & 1 & -1 & 0  & 1  & -1 \\
    0 & 0 & 1 & 0  & 0  & -1 & 1 & -1 & -1 & 0  & 1 
\end{bmatrix}
\]
\end{document}

I am trying to create this 3x11 matrix and it is complaining. What is wrong here? Here is the message.

Extra alignment tab has been changed to \cr. \endtemplate

l.529 ...0 & 0 & -1 & 0 & 0 & 1 & -1 & 1 & -1 & 0 \ You have given more \span or & marks than there were in the preamble to the \halign or \valign now in progress. So I'll assume that you meant to type \cr instead.

! Extra alignment tab has been changed to \cr. \endtemplate

  • This question has been asked and answered here: add \setcounter{MaxMatrixCols}{20} to your code and it will work. – DJP May 04 '15 at 05:01

1 Answers1

2

By default bmatrix takes 10 columns. So you have to use

\setcounter{MaxMatrixCols}{20}

in the preamble to increase it to 20 (say)

\documentclass{article}
\usepackage{amsmath,amsfonts,amsthm,amssymb,mathrsfs,latexsym,paralist}
\setcounter{MaxMatrixCols}{20}
\begin{document}
\[
\begin{bmatrix}
1 & 0 & 0 & -1 & 0  & 0  & 1 & -1 & 1  & -1 & 0 \\
0 & 1 & 0 & 0  & -1 & 0  & 1 & -1 & 0  & 1  & -1 \\
0 & 0 & 1 & 0  & 0  & -1 & 1 & -1 & -1 & 0  & 1 
\end{bmatrix}
\]
\end{document}
egreg
  • 1,121,712