2
\documentclass[11pt]{article}
\usepackage{amsmath, amsthm, amssymb,amsfonts}

\begin{document}

$A=\begin{pmatrix} 

1 && 1 && 1 && 0 && 0 && 0 && 0 && 0 && 0 \\

0 && 0 && 1 && 1 && 1 && 0 && 0 && 0 && 0 \\

0 && 1 && 0 && 1 && 0 && 1 && 1 && 0 && 0 \\

0 && 1 && 0 && 0 && 1 && 0 && 0 && 1 && 1 \\

0 && 0 && 0 && 0 && 0 && 1 && 0 && 0 && 0 \\

0 && 0 && 0 && 0 && 0 && 0 && 0 && 1 && 0 \\

1 && 0 && 0 && 0 && 0 && 0 && 1 && 0 && 0 \\

1 && 0 && 0 && 0 && 0 && 0 && 0 && 0 && 1 \\

1 && 0 && 0 && 0 && 0 && 0 && 0 && 0 && 0 \\
\end{pmatrix}$
\end{document}

marked as duplicate by Mico, CarLaTeX, dexteritas, barbara beeton, Stefan Pinnow Jun 16 '18 at 13:17

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    Off-topic: instead of providing lots of empty columns (presumably to increase the separation between "real" columns, right?), it would be much more efficient if you (a) replaced all instances of && with & and (b) issued the command \setlength\arraycolsep{10pt}. A side benefit of the approach recommended here would be that you wouldn't have to increase the value of the counter variable MaxMatrixCols -- at least, not the the pmatrix at hand. – Mico Jun 16 '18 at 10:03
  • Welcome to TeX SX! Is there any reason that cells are separated by &&, not a single &? In short, is each other column empty? – Bernard Jun 16 '18 at 10:07
  • @Mico tex removes empty columns so if you use && in every row it doesn't increase space – David Carlisle Jun 16 '18 at 10:31
  • @DavidCarlisle - My apologies for not expressing myself well. I was comparing (after running \setcounter{MaxMatrixCols}{17}, of course) the outputs of (a) $A=\begin{pmatrix} 1 && 1 && 1 && 0 && 0 && 0 && 0 && 0 && 00 \end{pmatrix}$ and (b) \setlength\arraycolsep{10pt}$A=\begin{pmatrix} 1 & 1 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \end{pmatrix}$. These pmatrix environments have the same width -- a result that isn't changed by having more rows of the type shown in the OP's example. – Mico Jun 16 '18 at 10:38
3

number of columns in your matrix exceed default value (10). it can be enlarged for example to 20 columns by adding

 \setcounter{MaxMatrixCols}{20}

in preamble. why you need empty columns?

Not the answer you're looking for? Browse other questions tagged or ask your own question.