TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

It is pretty normal, I guess, to use \begin{array} ... \end{array} to model matrices, when more control is required than you get with pmatrix, bmatrix, etc., with the proper \left and \right, and the relevant symbol.

Now, I need smallmatrix, but I need more control. Basically, I'd like to model \begin{smallmatrix} ... \end{smallmatrix} with \begin{array} ... \end{array}.

It's not as easy as just putting a command left and right of \begin{array} ... \end{array}. Should I use \scalebox?

    a & b \\ \hline c & d

As you can see, I'm using verical and horizonal lines. Now I'd need that, but in this matrix:

    a & b \\ \hline c & d

Is that even possible?

share|improve this question
smallmatrix is optimized for two line arrays so that the delimiters around them don't grow too much; as soon as you add a horizontal rule the size will grow. A partitioned matrix is best treated in a display. – egreg Feb 18 '13 at 0:27
I understand, but even adding vertical lines is not possible. I'd like to control at least that. – polemon Feb 18 '13 at 4:37

You can emulate smallmatrix with array in the following way:

\usepackage{amsmath} % just for comparison


$\left[\begin{smallmatrix}a & b\\ g&d\end{smallmatrix}\right]
\left[\begin{smallarray}{cc}a & b\\g&d\end{smallarray}\right]
\left[\begin{smallarray}{c|c}a & b\\g&d\end{smallarray}\right]$

However, adding \hline between rows in a smallarray won't give a pleasant result.

Horizontal rules may be added in both environments with


instead of \hline, but this will probably make delimiters grow by one step.

enter image description here

share|improve this answer

Your Answer


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.