11

I have a big matrix which exceeds the width of page, how can I fix this problem? enter image description here

rose
  • 347
  • 1
  • 3
  • 9

4 Answers4

6

In those cases, I'd suggest you to use some names for the entries and then explain those names in the text, as the following example illustrates:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\[
\begin{pmatrix}
\alpha & \beta \\
\gamma & \delta
\end{pmatrix},
\]
where $\alpha=a+b+c+d+e+f+g+h+i+j+k+l+m+n+o$, $\beta=a+b+c+d+e+f+g+h+i+j+k+l+m+n+o$, $\gamma=a+b+c+d+e+f+g+h+i+j+k+l+m+n+o$
 and $\delta=a+b+c+d+e+f+g+h+i+j+k+l+m+n+o$.

\end{document} 

enter image description here

Gonzalo Medina
  • 505,128
6

Using smallmatrix:

\documentclass{article}
\usepackage{amsmath}

\begin{document}
\noindent X \hrulefill X
\[
\begin{smallmatrix}
a+b+c+d+e+f+g+h+i+j+k+l+m+n+o & a+b+c+d+e+f+g+h+i+j+k+l+m+n+o \\
a+b+c+d+e+f+g+h+i+j+k+l+m+n+o &a+b+c+d+e+f+g+h+i+j+k+l+m+n+o
\end{smallmatrix}
\]
\noindent X\hrulefill X


\end{document}

enter image description here

5

You can use the nccmathpackage, an extension to amsmath that defines medium-sized mathematics, intermediate between textstyle and displaystyle (ca 80 % of the displaystyle size). With a suitable text width, it's OK but, of course, everything depends on what you actually have. Here is an illustration with textwidth=16cm and both styles:

    \documentclass{article}

    \usepackage[showframe, nomarginpar, textwidth = 16cm]{geometry}
    \usepackage{amsmath}
    \usepackage{nccmath}
    \newenvironment{mpmatrix}{\begin{medsize}\begin{pmatrix}}%
    {\end{pmatrix}\end{medsize}}%

    \begin{document}

    \[
    \begin{mpmatrix}
    a+b+c+d+e+f+g+h+i+j+k+l+m+n+o & a+b+c+d+e+f+g+h+i+j+k+l+m+n+o \\
    a+b+c+d+e+f+g+h+i+j+k+l+m+n+o &a+b+c+d+e+f+g+h+i+j+k+l+m+n+o
    \end{mpmatrix},
    \]
    \[
    \begin{pmatrix}
    a+b+c+d+e+f+g+h+i+j+k+l+m+n+o & a+b+c+d+e+f+g+h+i+j+k+l+m+n+o \\
    a+b+c+d+e+f+g+h+i+j+k+l+m+n+o &a+b+c+d+e+f+g+h+i+j+k+l+m+n+o
    \end{pmatrix},
    \]

    \end{document} 

enter image description here

Bernard
  • 271,350
4

Or use of array in an math environment

enter image description here

Code

\documentclass[12pt]{article}
\usepackage{amsmath}
\thispagestyle{empty}
\begin{document}
\[
\left (
\begin{array}{ccc}
\begin{array}{l}
a+b+c+d+e+f+g+h\\
+i+j+k+l+m+n+o 
\end{array}
& \cdots & 
\begin{array}{l}
a+b+c+d+e+f+g+h\\
+i+j+k+l+m+n+o 
\end{array} \\
\vdots & \ddots & \vdots\\
\begin{array}{l}
a+b+c+d+e+f+g+h\\
+i+j+k+l+m+n+o 
\end{array} &
\cdots & 
\begin{array}{l}
a+b+c+d+e+f+g+h\\
+i+j+k+l+m+n+o \\
\end{array} 
\end{array}
\right )
\]

\end{document}
Jesse
  • 29,686