![用线划分矩阵](https://linux22.com/image/472903/%E7%94%A8%E7%BA%BF%E5%88%92%E5%88%86%E7%9F%A9%E9%98%B5.png)
我用什么来将矩阵分成一条垂直线和一条水平线?
\begin{equation*}
A=
\begin{bmatrix}
a & b & c & a & b & c & a & a & a & a \\
d & e & f & a & b & c & a & a & a & a \\
g & h & i & a & b & c & a & a & a & a \\
a & b & c & a & b & c & a & a & a & a \\
d & e & f & a & b & c & a & a & a & a \\
a & b & c & a & b & c & a & a & a & a \\
d & e & f & a & b & c & a & a & a & a \\
g & h & i & a & b & c & a & a & a & a \\
a & b & c & a & b & c & a & a & a & a \\
d & e & f & a & b & c & a & a & a & a \\
d & e & f & a & b & c & a & a & a & a \\
g & h & i & a & b & c & a & a & a & a
\end{bmatrix}
\end{equation*}
答案1
我建议你从bmatrix
环境切换到array
环境。以下屏幕截图中的第三个矩阵在第 3 列和第 6 列后有垂直线,在第 3、6 和第 9 行后有水平线。
\documentclass{article}
\usepackage{amsmath} % for 'align*' env.
\begin{document}
\begin{align*}
A &=
\begin{bmatrix}
a & b & c & a & b & c & a & a & a & a \\
d & e & f & a & b & c & a & a & a & a \\
g & h & i & a & b & c & a & a & a & a \\
a & b & c & a & b & c & a & a & a & a \\
d & e & f & a & b & c & a & a & a & a \\
a & b & c & a & b & c & a & a & a & a \\
d & e & f & a & b & c & a & a & a & a \\
g & h & i & a & b & c & a & a & a & a \\
a & b & c & a & b & c & a & a & a & a \\
d & e & f & a & b & c & a & a & a & a \\
d & e & f & a & b & c & a & a & a & a \\
g & h & i & a & b & c & a & a & a & a
\end{bmatrix} \\
&=
\left[ \begin{array}{@{} *{10}{c} @{}} % switch to an 'array' setup
a & b & c & a & b & c & a & a & a & a \\
d & e & f & a & b & c & a & a & a & a \\
g & h & i & a & b & c & a & a & a & a \\
a & b & c & a & b & c & a & a & a & a \\
d & e & f & a & b & c & a & a & a & a \\
a & b & c & a & b & c & a & a & a & a \\
d & e & f & a & b & c & a & a & a & a \\
g & h & i & a & b & c & a & a & a & a \\
a & b & c & a & b & c & a & a & a & a \\
d & e & f & a & b & c & a & a & a & a \\
d & e & f & a & b & c & a & a & a & a \\
g & h & i & a & b & c & a & a & a & a
\end{array} \right] \\
&\approx
\left[ \begin{array}{@{} ccc | ccc | cccc @{}} % add vertical and horizontal lines
a & b & c & a & b & c & a & a & a & a \\
d & e & f & a & b & c & a & a & a & a \\
g & h & i & a & b & c & a & a & a & a \\
\hline
a & b & c & a & b & c & a & a & a & a \\
d & e & f & a & b & c & a & a & a & a \\
a & b & c & a & b & c & a & a & a & a \\
\hline
d & e & f & a & b & c & a & a & a & a \\
g & h & i & a & b & c & a & a & a & a \\
a & b & c & a & b & c & a & a & a & a \\
\hline
d & e & f & a & b & c & a & a & a & a \\
d & e & f & a & b & c & a & a & a & a \\
g & h & i & a & b & c & a & a & a & a
\end{array} \right]
\end{align*}
\end{document}