1

I want to write a matrix having 20x20 dimension. But in latex (using the package amsmath) number of columns is limited to 10. Please solve my problem.

  • https://tex.stackexchange.com/questions/95162/how-to-create-a-matrix-with-20-columns-in-latex – js bibra Jul 31 '20 at 08:43
  • https://tex.stackexchange.com/questions/3519/how-to-use-more-than-10-tab-stops-in-bmatrix-or-other-amsmath-matrix-environment – js bibra Jul 31 '20 at 08:44

1 Answers1

0

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}
js bibra
  • 21,280
  • What exactly is reason for loading all those packages besides amsmath? – campa Jul 31 '20 at 08:49
  • please remove the uneeded pack by compiling and commenting out one by one – js bibra Jul 31 '20 at 08:51
  • 6
    My point is that when answering to a new user one should better restrict the code to the necessary packages. Here only amsmath is relevant. amssymb would already load amsfonts; amsthm, mathrsfs and paralist are irrelevant; latexsym is outdated. – campa Jul 31 '20 at 08:54