8

I am using the command \begin{pmatrix} [...] \end{pmatrix}. I wonder why this command is not just called \begin{matrix} [...] \end{matrix} and why a "p" before "matrix".

  • 12
    "p" for "parenthesis", the surrounding delimiter. One might surmise that bmatrix is for bracketed matrices. – Steven B. Segletes Jan 19 '16 at 15:16
  • 3
    The matrix environment is the generic version -- it has no delimiters. – user31729 Jan 19 '16 at 15:18
  • 1
    B for braces, V for vertical bars and there are more. – Sigur Jan 19 '16 at 15:19
  • 1
    @StevenB.Segletes: You were the first who commented -- would you write the answer as an anthology on matrix delimiters? ;-) – user31729 Jan 19 '16 at 15:37
  • 1
    Related: Where is the \matrix command – Werner Jan 19 '16 at 16:36
18

The amsmath package provides a number of options. The leading letter before matrix indicates the delimiter that is used:

p for parens, b for brackets, v for verts, B for braces, V for double verts.

\documentclass{article}
\usepackage{amsmath,tabstackengine}
\begin{document}
\[
\begin{matrix}
1&2&3\\
4&5&6\\
7&8&9
\end{matrix}
\quad
\begin{pmatrix}
1&2&3\\
4&5&6\\
7&8&9
\end{pmatrix}
\quad
\begin{bmatrix}
1&2&3\\
4&5&6\\
7&8&9
\end{bmatrix}
\quad
\begin{vmatrix}
1&2&3\\
4&5&6\\
7&8&9
\end{vmatrix}
\]
\[
\begin{Bmatrix}
1&2&3\\
4&5&6\\
7&8&9
\end{Bmatrix}
\quad
\begin{Vmatrix}
1&2&3\\
4&5&6\\
7&8&9
\end{Vmatrix}
\]
\end{document}

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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