17

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".

cmhughes
  • 100,947
Colas
  • 6,772
  • 4
  • 46
  • 96

3 Answers3

33

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

2

Plain TeX defines the macro \pmatrix as matrix with parentheses and \matrix as the same without parentheses. So, the terminology mentioned here is inspired by plain TeX.

wipet
  • 74,238
-1

The "p" in pmatrix stands for "parentheses"

There is also Bmatrix for "Brace Matrix"

and... bmatrix for "bracket Matrix"

picture of various matricies

IdleCustard
  • 1,194
  • 6
    All this is already mentioned in the @Steven B. Segletes answer, from where is also showed image ... – Zarko Sep 23 '22 at 02:17