# How do I make a small pmatrix?

I want a small matrix but the only command I can find is \smallmatrix which leaves the brackets out. Is there a simliar one that includes brackets?

-
Welcome to TeX.SX! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Marco Daniel Jan 26 '14 at 13:34
If you use mathtools package, I believe there is a psmallmatrix or smallpmatrix environment. – Manuel Jan 26 '14 at 13:35

Three possibilities:

\documentclass{article}
\usepackage{mathtools}
\newcommand\SmallMatrix[1]{{%
\tiny\arraycolsep=0.3\arraycolsep\ensuremath{\begin{pmatrix}#1\end{pmatrix}}}}

\begin{document}

$\left(\begin{smallmatrix}1&2&3\\1&2&3\end{smallmatrix}\right)$

$\begin{psmallmatrix}1&2&3\\1&2&3\end{psmallmatrix}$

\SmallMatrix{1&2&3\\1&2&3}

\end{document}

-

It's easy to define one:

\newenvironment{psmallmatrix}
{\left(\begin{smallmatrix}}
{\end{smallmatrix}\right)}


Complete example:

\documentclass{article}
\usepackage{amsmath}

\newenvironment{psmallmatrix}
{\left(\begin{smallmatrix}}
{\end{smallmatrix}\right)}

\begin{document}

Here is a small matrix $\begin{psmallmatrix}1 & 0\\0 & 1\end{psmallmatrix}$,
that is, the identity matrix.

\end{document}


-
No need to use \left( and \right) in this case: ( and ) produce the same size... – Mico Jan 26 '14 at 14:16
@Mico This is one of the rare cases where I recommend them; if the matrix has more than two rows they're necessary. – egreg Jan 26 '14 at 14:19
You're right, of course. :-) Typesetting a small matrix with three or more rows would seem to defeat the whole purpose of having a small-matrix-environment to begin with. – Mico Jan 26 '14 at 14:21
@Mico I'd be very careful before using an inline smallmatrix with more than two rows, but sometimes this could be a good compromise. – egreg Jan 26 '14 at 14:23

You mention pmatrix in the title of your posting, but you refer to "brackets" rather than "parentheses" later on, so I'll assume for now that you're interested in a small matrix surrounded be square brackets.

To create a small matrix surrounded by square brackets, you could either use the bsmallmatrix environment, which is provided by the the mathtools package, or "roll your own", so to say, by enclosing a smallmatrix environment inside \bigl[ and \bigr]:

You'll notice that the latter matrix is surrounded by larger brackets than is the former, which features the basic size of the [ and ] square brackets. Your call as to which one looks better...

\documentclass{article}
\usepackage{mathtools} % for 'bsmallmatrix' environment
\newenvironment{brsm}{% % short for 'bracketed small matrix'
\bigl[ \begin{smallmatrix} }{%
\end{smallmatrix} \bigr]}
\begin{document}
$x\begin{bsmallmatrix}1&2\\3&4\end{bsmallmatrix}x$
vs.\
$x\begin{brsm}1&2\\3&4\end{brsm}x$
\end{document}

-
One might add that the mathtools package also defines smallmatrix* and p(/b/B/v/V)smallmatrix* environments which accept an alignment parameter. – Bernard Jan 26 '14 at 16:46
@Bernard - I agree with you. I was trying mostly to address the OP's specific question, so that's why I the limited the length of my answer. Of course, should the OP feel like exploring the many capabilities of the mathtools and amsmath packages, I'd be delighted. – Mico Jan 26 '14 at 18:19