跳到主要内容

Matrices

amsmath软件包提供了用不同定界符排版矩阵的命令。一旦你在序言中加载了 `usepackage{amsmath},你就可以在数学环境中使用以下环境。

速查表:

\begin{matrix}
1 & 2 & 3\\
a & b & c
\end{matrix}

\begin{pmatrix}
1 & 2 & 3\\
a & b & c
\end{pmatrix}

\begin{bmatrix}
1 & 2 & 3\\
a & b & c
\end{bmatrix}

\begin{Bmatrix}
1 & 2 & 3\\
a & b & c
\end{Bmatrix}

\begin{vmatrix}
1 & 2 & 3\\
a & b & c
\end{vmatrix}

\begin{Vmatrix}
1 & 2 & 3\\
a & b & c
\end{Vmatrix}

\left\lceil
\begin{matrix}
1 & 2 & 3\\
a & b & c
\end{matrix}
\right\rceil

\left\langle
\begin{matrix}
1 & 2 & 3\\
a & b & c
\end{matrix}
\right\rvert

\left\langle
\begin{matrix}
1 & 2 & 3\\
a & b & c
\end{matrix}
\right\rangle

内嵌式矩阵

当排版内联数学时,上面的通常矩阵环境可能看起来太大。在这种情况下,使用smallmatrix可能更好,尽管你需要提供自己的分隔符。

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\noindent Trying to typeset an inline matrix here:
$\begin{pmatrix}
a & b\\
c & d
\end{pmatrix}$,
but it looks too big, so let's try
$\big(\begin{smallmatrix}
a & b\\
c & d
\end{smallmatrix}\big)$
instead.
\end{document}