[Tex/LaTex] matrices too big to fit the width of a page

matricesscalingwidth

When I type matrices in beamer class, they are often too big to fit the width of a page. What is the way to make the matrices smaller? I also want to make the font of the entries of these matrices smaller. I used

\[ \scriptscriptstyle
M_{1,k}  = \frac{1}{15} \left(
        \begin{array}{cccccccc}
         0 & 0 & 0 & 0 & 0 & 0  \\
         0 & 12k b_0 & (12k+15) b_1 & (12k+30) b_2 & (12k+45)  b_3 & (12k+60) b_4  \\
         0 & 0 & 0 & 0 & 0 & 0   \\
         0 & 2k  a_0 & (2k+5)  a_1 & (2k+10)  a_2 & 0 & 0   \\
        \end{array}
      \right)
\]

But it only makes the scaler 1/15 smaller, not the entries of this matrix. Is there a way to make the entries smaller, without typing \scriptstyle for each entries? Maybe something we can change the whole size by 75%, 50% of the content in \begin{equation}...\end{equation}

Best Answer

One quick (but not very beautiful) solution is to work with \scalebox from the graphicx package, e.g.

\newcommand\scalemath[2]{\scalebox{#1}{\mbox{\ensuremath{\displaystyle #2}}}}

\[
M_{1,k}  = \frac{1}{15} \left(
    \scalemath{0.3}{
    \begin{array}{cccccccc}
     0 & 0 & 0 & 0 & 0 & 0  \\
     0 & 12k b_0 & (12k+15) b_1 & (12k+30) b_2 & (12k+45)  b_3 & (12k+60) b_4  \\
     0 & 0 & 0 & 0 & 0 & 0   \\
     0 & 2k  a_0 & (2k+5)  a_1 & (2k+10)  a_2 & 0 & 0   \\
    \end{array}
    }
  \right)
\]