I am typing up a technical report that contains many large matrices. I am looking for a way to print these matrices with an equation number next to them without getting an overfull \hbox error.
I was thinking it might be possible to temporarily alter the page margins for the matrix. I don't really want to use smaller text as the matrix then starts becoming a little hard to read. This is currently what my matrix looks like. Any suggestions would really be appreciated. Thanks.
My code in creating the above matrix is as follows:
\documentclass[12pt]{article}
\usepackage[margin=1in]{geometry}
\usepackage{amsmath}
\setcounter{MaxMatrixCols}{20}
\begin{document}
\begin{equation}
\textbf{k}
=
\begin{bmatrix}
\frac{EA}{L} & 0 & 0 & 0 & 0 & 0 & \frac{-EA}{L} & 0 & 0 & 0 & 0 & 0 \\
& \frac{12EI_z}{L^3} & 0& 0& 0& \frac{6EI_z}{L^2} & 0& \frac{-12EI_z}{L^3} & 0 & 0& 0 &\frac{6EI_z}{L^2} \\
& & \frac{12EI_y}{L^3} & 0& \frac{-6EI_y}{L^2} & 0& 0& 0& \frac{-12EI_y}{L^3} & 0& \frac{-6EI_y}{L^2} & 0 \\
& & & \frac{GI_p}{L} & 0 & 0 & 0 & 0 & 0 & \frac{-GI_p}{L} & 0 & 0 \\
& & & & \frac{4EI_y}{L}& 0 & 0& 0 & \frac{6EI_y}{L^2}& 0 & \frac{2EI_y}{L} & 0 \\
& & & & & \frac{4EI_z}{L} & 0 & \frac{-6EI_z}{L^2}& 0 & 0 & 0 & \frac{2EI_z}{L} \\
& & & & & & \frac{EA}{L} & 0 & 0 & 0 & 0 & 0 \\
& & & & & & & \frac{12EI_z}{L^3} & 0 & 0 & 0 & \frac{-6EI_z}{L^2} \\
& & & & & & & & \frac{12EI_y}{L^3} & 0 & \frac{6EI_y}{L^2} & 0 \\
& & & & & & & & & \frac{GI_p}{L} & 0 & 0 \\
& & & & & & & & & & \frac{4EI_y}{L}& 0 \\
symm. & & & & & & & & & && \frac{4EI_z}{L}
\end{bmatrix}
\label{kmat}
\end{equation}
\end{document}
Best Answer
I stopped symm extending the first column (don't use math italic for multi-letter words) and reduced the column padding a bit: