答案1
这有点复杂。你可以用嵌套矩阵来实现:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[ F_x=
\begin{bmatrix}
\, % for symmetry
\begin{matrix}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 1
\end{matrix} &
\smash{\underbrace{%
\begin{matrix}
0 & \dots & 0 \\
0 & \dots & 0 \\
0 & \dots & 0
\end{matrix}}_{\text{$3N$ columns}}%
}\,
\end{bmatrix}
\vphantom{%
\underbrace{%
\begin{matrix}
0 & \dots & 0 \\
0 & \dots & 0 \\
0 & \dots & 0
\end{matrix}}_{\text{$3N$ columns}}%
}
\]
\end{document}
需要\vphantom
保持对象的真实大小,因为我们粉碎了第二个内部矩阵,以便 TeX 不会“看到”下支撑的深度。
您可以通过定义临时宏来简化输入:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
\newcommand{\tempmatrix}{%
\underbrace{%
\begin{matrix}
0 & \dots & 0 \\
0 & \dots & 0 \\
0 & \dots & 0
\end{matrix}}_{\text{$3N$ columns}%
}%
}
F_x=
\begin{bmatrix}
\, % for symmetry
\begin{matrix}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 1
\end{matrix} &
\smash{\tempmatrix}
\,
\end{bmatrix}
\vphantom{\tempmatrix}
\]
\end{document}
答案2
另一种方法是蒂克兹 matrix of nodes
:
以下是代码:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{matrix,decorations.pathreplacing}
\begin{document}
\begin{equation}\label{E:columns}
\begin{tikzpicture}[baseline=(current bounding box.center)]
\matrix (M)[matrix of math nodes,
left delimiter=(,
right delimiter=)]{
1 & 0 & 0 & 0 & ... & 0 \\
0 & 1 & 0 & 0 & ... & 0 \\
0 & 0 & 1 & 0 & ... & 0 \\
};
\draw[decorate, decoration={brace, mirror}]
(M-3-4.south west)--(M-3-6.south east)
node[font=\scriptsize,below left]{$3N$ columns};
\end{tikzpicture}
\end{equation}
\end{document}
答案3
附有{bNiceMatrix}
包裹nicematrix
。
\documentclass{article}
\usepackage{nicematrix}
\begin{document}
\[
F_x =
\begin{bNiceMatrix}[margin=2pt]
1 & 0 & 0 & 0 & ... & 0 \\
0 & 1 & 0 & 0 & ... & 0 \\
0 & 0 & 1 & 0 & ... & 0 \\
\CodeAfter
\UnderBrace[shorten=1mm]{3-4}{3-6}{3N \text{ columns}}
\end{bNiceMatrix}
\]
\end{document}