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.
Asked
Active
Viewed 535 times
1
-
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 Answers
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
-
-
please remove the uneeded pack by compiling and commenting out one by one – js bibra Jul 31 '20 at 08:51
-
6My point is that when answering to a new user one should better restrict the code to the necessary packages. Here only
amsmathis relevant.amssymbwould already loadamsfonts;amsthm,mathrsfsandparalistare irrelevant;latexsymis outdated. – campa Jul 31 '20 at 08:54