答案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}