# Typsetting big matrix (but keeping A4 size)

This question is a slight variation of Compiling a BIG matrix, but I need to write a matrix in a A4 or letter size paper; it is a block 48x48 matrix but I can put lot of $0_2$ and $0_4$'s in order to keep a small number of entries, which, however, exceed the usual dimensions. How could I make the font smaller or the spaces between the entries (most of them 0) narrower in order for this matrix to fit in the page? For instance, the first rows are

\documentclass[a4paper,10pt]{article}
\usepackage{amsmath}
\begin{document}
$\begin{pmatrix} 0 & 0 & B & 0 & 0 & 0& 0& 0 & A & 0& 0& 0 & 0 & 0& 0& 0 \\ 0 & 0 & 0 & C & 0 & 0& 0& 0 & 0 & 0& 0& 0 & 0 & 0& 0& 0 \\ D & 0 & 0 & 0 & 0 & 0& 0& 0 & 0 & 0& 0& 0 & 0 & 0& 0& 0 \\ 0 & E & 0 & 0 & 0 & 0& 0& 0 & 0 & 0& 0& 0 & 0 & 0& 0& 0 \end{pmatrix}$
\end{document}

-
thanks. I just did. –  c.p. Sep 5 '12 at 14:44
ok, I've reedited. –  c.p. Sep 5 '12 at 14:57

The following example uses three different methods:

• The distance between the entries can be set by \arraycolsep.

• The font size can be decreased by switching to text mode, setting the smaller font size and going back to math.

• And finally the whole equation can be scaled to fit the line width using the package resizegather if amsmath is used.

The whole example:

\documentclass[12pt]{article}
\usepackage[a6paper]{geometry}
\usepackage{amsmath}
\setcounter{MaxMatrixCols}{48}
\usepackage{resizegather}
\begin{document}
\hrule
\begin{gather*}
\setlength{\arraycolsep}{.75\arraycolsep}
\text{\footnotesize$\displaystyle \begin{pmatrix} 0 & 0 & B & 0 & 0 & 0& 0& 0 & A & 0& 0& 0 & 0 & 0& 0& 0 \\ 0 & 0 & 0 & C & 0 & 0& 0& 0 & 0 & 0& 0& 0 & 0 & 0& 0& 0 \\ D & 0 & 0 & 0 & 0 & 0& 0& 0 & 0 & 0& 0& 0 & 0 & 0& 0& 0 \\ 0 & E & 0 & 0 & 0 & 0& 0& 0 & 0 & 0& 0& 0 & 0 & 0& 0& 0 \end{pmatrix}$}
\end{gather*}
\hrule
\end{document}


-
Thank you for this nice answer. I've installed resizegather: this code however gives me an error at the resizegather.sty file "Undefined control sequence AddToKeyvalOption{equation}" –  c.p. Sep 5 '12 at 15:58

One idea would be to use landscape enviroment. At that way you can print your big table along the biggest side of your paper.

-