我正在尝试在一组元素周围插入括号,从而在更大的矩阵中创建一个矩阵。到目前为止,我有以下内容:
\begin{equation}
\begin{bmatrix}
\begin{matrix}
0 & 0 \\
0 & \omega_0 \\
-\omega_0 & 0 \\
0 & 0
\end{matrix} &
\begin{matrix}
-\frac{p_1}{2} & -\frac{p_2}{2} & 0 \\
0 & 0 & \frac{p_2}{2} \\
-\frac{p_2}{2} & \frac{p_1}{2} & 0 \\
\end{matrix} \\
\begin{matrix}
0 & 0 \\
0 & 0 \\
0 & 0
\end{matrix} & \omega_0 \mathbf{I}^{-1}
\begin{pmatrix}
I_{yx} & (I_{yy} - I_{zz}) & 2 I_{yz} \\
(I_{zz} - I_{xx}) & -I_{xy} & -2 I_{xz} \\
-I_{yz} & I_{xz} & 0
\end{pmatrix}
\end{bmatrix}
\end{equation}
基本上,它是四个较小的矩阵合并成一个较大的矩阵。但是,这些矩阵之间的元素并不对齐。抱歉,没有图片,我还没有名气来放一张。
答案1
\documentclass{article}
\usepackage{amsmath}
\usepackage{scalerel}
\begin{document}
Original:
\begin{equation}
\begin{bmatrix}
\begin{matrix}
0 & 0 \\
0 & \omega_0 \\
-\omega_0 & 0 \\
0 & 0
\end{matrix} &
\begin{matrix}
-\frac{p_1}{2} & -\frac{p_2}{2} & 0 \\
0 & 0 & \frac{p_2}{2} \\
-\frac{p_2}{2} & \frac{p_1}{2} & 0 \\
\end{matrix} \\
\begin{matrix}
0 & 0 \\
0 & 0 \\
0 & 0
\end{matrix} & \omega_0 \mathbf{I}^{-1}
\begin{pmatrix}
I_{yx} & (I_{yy} - I_{zz}) & 2 I_{yz} \\
(I_{zz} - I_{xx}) & -I_{xy} & -2 I_{xz} \\
-I_{yz} & I_{xz} & 0
\end{pmatrix}
\end{bmatrix}
\end{equation}
Revised:
\def\x{\begin{array}{c} x\\x\\x\end{array}}
\begin{equation}
\begin{bmatrix}
\begin{array}{c}
0 \\ 0 \\ -\omega_0 \\ 0 \\0 \\0 \\0 \\
\end{array}
&
\begin{array}{c@{\hspace{0ex}}}
0 \\ \omega_0 \\ 0 \\ 0 \\0 \\0 \\0 \\
\end{array}
&
\begin{array}{@{\hspace{0ex}}c}
\\ \\ \\ \\ \\ \omega_0 \mathbf{I}^{-1} \\ \\
\end{array}
\begin{array}{@{\hspace{0ex}}c@{\hspace{0ex}}}
\\ \\ \\ \\ \scalerel*[1.8ex]{(}{\x} \\
\end{array}
&
\begin{array}{@{\hspace{0ex}}c}
-p_1/2 \\ 0 \\ -p_2/2 \\ \\ I_{yx} \\(I_{zz} - I_{xx}) \\ -I_{yz} \\
\end{array}
&
\begin{array}{c}
-p_2/2 \\ 0 \\ p_1/2 \\ \\ (I_{yy} - I_{zz}) \\ -I_{xy} \\ -I_{xz} \\
\end{array}
&
\begin{array}{c@{\hspace{0ex}}}
0 \\p_2/2 \\ 0 \\ \\ 2I_{yz} \\ -2I_{xz} \\ 0 \\
\end{array}
&
\begin{array}{@{\hspace{0ex}}c@{\hspace{0ex}}}
\\ \\ \\ \\ \scalerel*[1.8ex]{)}{\x} \\
\end{array}
\end{bmatrix}
\end{equation}
\end{document}