![如何创建块矩阵?](https://linux22.com/image/356679/%E5%A6%82%E4%BD%95%E5%88%9B%E5%BB%BA%E5%9D%97%E7%9F%A9%E9%98%B5%EF%BC%9F.png)
答案1
\documentclass{article}
\begin{document}
\[
\left(\begin{array}{@{}ccc|cc@{}}
a_{11} & a_{12} & a_{13} & b_{11} & b_{12} \\
a_{21} & a_{22} & a_{23} & b_{21} & b_{22} \\\hline
c_{11} & c_{12} & c_{13} & d_{11} & d_{12} \\
c_{21} & c_{22} & c_{23} & d_{21} & d_{22} \\
c_{31} & c_{32} & c_{33} & d_{31} & d_{32}
\end{array}\right)
\]
\end{document}
答案2
这是一种无需增加列宽matrix
即可轻松突出显示环境中的块的方法:在相关位置添加 s(空节点)并根据节点对定义 s。pstricks
pnode
\psframe
\documentclass[svgnames]{article}
\usepackage{mathtools}
\usepackage{pst-node}%
\begin{document}
\[ A = \begin{pmatrix}
M_{11} & M_{12}\\\
M_{21} & M_{22}
\end{pmatrix}
=
\begin{pspicture}
$ \begin{pmatrix}
\pnode[-0.3ex, 1.5ex]{A}
a_{11} & a_{12} & a_{13} & b_{11} & b_{12} \\
a_{21} & a_{22} & a_{23} & b_{21} & b_{22} \\
c_{11} & c_{12} &
c_{13} \pnode[1.4ex, -0.8ex]{C} & d_{11} & d_{12} \\
c_{21} & c_{22} & c_{23} & d_{21} & d_{22} \\
c_{31} & c_{32} & c_{33} & d_{31} & d_{32}\pnode[0.2ex, -0.6ex]{D}\,
\end{pmatrix} $
\psset{linecolor = IndianRed}
\psframe(A)(C)
\psset{dimen = inner}\psframe(C)(D)
\end{pspicture}
\]
\end{document}