我有一个相当大的矩阵乘法:
\begin{align*}
\mathrm{Var}(\alpha)&\approx \begin{pmatrix}\sqrt{1+\pi^{2}}\exp(-\delta^{*}+\zeta^{*}) &\frac{\pi\exp(-\delta^{*}+\zeta^{*})}{\sqrt{1+\pi^{2}}}&-\sqrt{1+\pi^{2}}\exp(-\delta^{*}+\zeta^{*})\end{pmatrix}
\begin{pmatrix} \mathrm{Var}(\zeta^{*}) &\mathrm{Cov}(\zeta^{*},\pi) & \mathrm{Cov}(\zeta^{*},\delta^{*}) \\\mathrm{Cov}(\pi,\zeta^{*}) & \mathrm{Var}(\pi) & \mathrm{Cov}(\pi, \delta^{*}) \\\mathrm{Cov}(\delta^{*},\zeta^{*}) & \mathrm{Cov}(\delta^{*},\pi) & \mathrm{Var}(\delta^{*}) \end{pmatrix}
\begin{pmatrix}\sqrt{1+\pi^{2}}\exp(-\delta^{*}+\zeta^{*}) \\\frac{\pi\exp(-\delta^{*}+\zeta^{*})}{\sqrt{1+\pi^{2}}}\\-\sqrt{1+\pi^{2}}\exp(-\delta^{*}+\zeta^{*})\end{pmatrix}
\end{align*}
由于这不适合一行,我想知道如何以最佳方式排版?以便矩阵乘法的逻辑仍然可见?
答案1
请始终发布完整的文档,而不仅仅是片段。如果您强调这是 VAV^T,则会更简短、更清晰:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
\mathrm{Var}(\alpha)&\approx
V\begin{pmatrix} \mathrm{Var}(\zeta^{*}) &\mathrm{Cov}(\zeta^{*},\pi) & \mathrm{Cov}(\zeta^{*},\delta^{*}) \\\mathrm{Cov}(\pi,\zeta^{*}) & \mathrm{Var}(\pi) & \mathrm{Cov}(\pi, \delta^{*}) \\\mathrm{Cov}(\delta^{*},\zeta^{*}) & \mathrm{Cov}(\delta^{*},\pi) & \mathrm{Var}(\delta^{*}) \end{pmatrix}V^T
\end{align*}
where
\[V=\begin{pmatrix}\sqrt{1+\pi^{2}}\exp(-\delta^{*}+\zeta^{*}) &\frac{\pi\exp(-\delta^{*}+\zeta^{*})}{\sqrt{1+\pi^{2}}}&-\sqrt{1+\pi^{2}}\exp(-\delta^{*}+\zeta^{*})\end{pmatrix} \]
\end{document}
答案2
就像 David Carlisle 在他的回答中所做的那样,我也会通过将其重写为形式V(a)=V <some matrix> V^T
并提供单独的方程来解释 的结构,从而降低主方程的整体视觉复杂性V^T
。此外,为了增强 3x3 矩阵和 3x1 列向量的分量的外观,我建议您这样做不是使用pmatrix
环境,将每列的内容居中。相反,最好使用更通用的环境来左对齐矩阵中的列并右对齐列向量。此外,我认为,如果在序言中定义数学运算符项和,然后在整个方程中使用它们,array
代码的可读性(以及输出的外观)会得到增强。\Var
\Cov
如果您愿意,您可以V^T
通过分解出公共项来进一步简化表达式\exp(-\delta^{*}+\zeta^{*})
。
\documentclass{article}
\usepackage{amsmath,array}
\setlength\arraycolsep{3pt}
\DeclareMathOperator{\Var}{Var}
\DeclareMathOperator{\Cov}{Cov}
\begin{document}
\begin{align*}
\Var(\alpha) &\approx V
\left( \begin{array}{lll}
\Var(\zeta^{*}) &\Cov(\zeta^{*},\pi) & \Cov(\zeta^{*},\delta^{*}) \\
\Cov(\pi,\zeta^{*}) & \Var(\pi) & \Cov(\pi, \delta^{*}) \\
\Cov(\delta^{*},\zeta^{*}) & \Cov(\delta^{*},\pi) & \Var(\delta^{*})
\end{array} \right)
V^T\\
\intertext{where}
V^T &=
\left( \begin{array}{@{}r}
\sqrt{1+\pi^{2}}\,\exp(-\delta^{*}+\zeta^{*}) \\
\pi/(\sqrt{1+\pi^{2}})\, \exp(-\delta^{*}+\zeta^{*})\\
-\sqrt{1+\pi^{2}}\,\exp(-\delta^{*}+\zeta^{*})
\end{array}\right)
\end{align*}
\end{document}