用线划分矩阵

用线划分矩阵

我用什么来将矩阵分成一条垂直线和一条水平线?

\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}

相关内容