[Tex/LaTex] Smaller matrices (or other math elements) in displayed math

math-modematrices

I'm trying to find The Right Way to make a smaller matrix (but not a smallmatrix) along the following lines.

Example: Consider the following piece of LaTeX code:

% \usepackage{amsmath} in the pre-amble
\begin{gather*}
    A = \begin{footnotesize}
        \left[\,\begin{matrix} a & b & c \\ d & e & f \\ g & h & i \end{matrix}\,\right]
    \end{footnotesize}
    \\
    A = \left[\,\begin{matrix} a & b & c \\ d & e & f \\ g & h & i \end{matrix}\,\right]
\end{gather*}

Motivation: I want occasionally to be able to have small — but easily legible and æshetically pleasing — matrices in displayed environments. The æsthetic criteria rule out the use of smallmatrix, so I'm looking for alternatives. In the example above, the variable A is meant to be outside of the footnotesize environment: I want these matrices to be typeset smaller than the surrounding math. Sometimes, I want to display matrices for the sake of clarity, but matrices usually take up much more room than I want (both in the sense of leaving too little room for other things, and in the sense of attracting more focus than I would like).

Partial solution: If you inspect the two matrix environments in the example above, you'll see that the matrix is the same in both cases. The only difference you might expect is that the matrix in the footnotesize environment will be smaller. When I compile this, it tells me that footnotesize is invalid in math-mode, which is a perfectly reasonable complaint. Despite this, it produces the smaller output that I desire. (No doubt it is automatically inserting some cludge that makes everything work out.) So this seems to be a viable way of making "smaller" matrices, but not a correct way.

Question: Is there a nice way to achieve the above — shrinking a part of a displayed math environment — with a minimum of switching between text-mode and math-mode? (Preferably, with no switching at all?)

Best Answer

\documentclass{article}
\usepackage{amsmath}
\begin{document}

\begin{gather*}
 \mbox{\scriptsize%
    $A = \begin{bmatrix} a & b & c \\ d & e & f \\ g & h & i \end{bmatrix}$}\\
    A = \begin{bmatrix} a & b & c \\ d & e & f \\ g & h & i \end{bmatrix}
\end{gather*}

\end{document}
Related Question