Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Apparently text is resized in one way and math in other way. However, the commands to resize math do not work well on a matrix; it appears barely smaller and unexpectedly shifted down. The commands to resize text also "work well" to resize a matrix except that it give a warning that you are doing it wrong.

LaTeX Font Warning: Command \scriptsize invalid in math mode on input line 16.

So, what is a proper way to resize a matrix that actually works?

\documentclass[12pt]{article}

\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}

\begin{document}
 Properly resize variable: $x$ $\scriptscriptstyle{x}$

 Properly resize matrix: $\begin{bmatrix}a & b\\ c & d\end{bmatrix}$ $\scriptscriptstyle{\begin{bmatrix}a & b\\ c & d\end{bmatrix}}$

 Improperly resize matrix: $\begin{bmatrix}a & b\\ c & d\end{bmatrix}$ $\scriptsize{\begin{bmatrix}a & b\\ c & d\end{bmatrix}}$
\end{document}

enter image description here

share|improve this question

1 Answer 1

up vote 4 down vote accepted
  1. Size changing commands such as \small or \scriptsize are invalid in math mode.
  2. \scriptstyle and \scriptscriptstyle are not commands with an argument; writing $\scriptstyle<formula>$ or $\scriptstyle{<formula>}$ has exactly the same result.

  3. Neither $\scriptsize\begin{bmatrix}...\end{bmatrix}$ nor $\scriptstyle\begin{bmatrix}...\end{bmatrix}$ work, as you experimented

  4. If you need small matrices there's the smallmatrix environment (with amsmath that you're already loading).

  5. Another way (not that I recommend it) is to say \mbox{\scriptsize$\begin{bmatrix}...\end{bmatrix}$} inside a math formula.

share|improve this answer
    
4. But they didn't include the corresponding smallbmatrix?? –  Tyson Williams Jul 25 '11 at 20:27
    
2  
\left[\begin{smallmatrix}...\end{smallmatrix}\right] –  egreg Jul 25 '11 at 20:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.