Matricespmatrix

pmatrixEnvironment

Used for parenthesized matrices in linear algebra and systems of equations

\begin{pmatrix} a & b \\ c & d \end{pmatrix}
Topic
Matrices
Available in
ams
Allowed mode
math
Body mode
math
Frequency
0.86% of corpus formulasrank 11 of 31
Commonality
high
Tags
matrix, nestable
Renderer support
PackageMathJaxKaTeXXeTeX
amsMathJax: FullKaTeX: FullXeTeX: Full
About the test scope

Syntax#

\begin{pmatrix}…math body\end{pmatrix}

Takes no arguments. Reading argspecs

Common tasks#

How to write a matrix in parentheses#

\begin{pmatrix} a & b \\ c & d \end{pmatrix}

How to write a column vector in parentheses#

\begin{pmatrix} x \\ y \end{pmatrix}

How to write a 2-by-3 matrix#

\begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \end{pmatrix}

In TeXForm#

TeXForm reads the environment body in math mode.

Rewrite the fenced pmatrix environment to explicit parens around a core matrix environment.

\begin{pmatrix} #1 \end{pmatrix} \left(\begin{matrix} #1 \end{matrix}\right)

See also#

Test cases#

ams
InputCaseMathJaxKaTeXXeTeX
\begin{pmatrix} a & b \\\\ c & d \end{pmatrix}Positive · baselinePassPassPass
All 18 in Matrices