我需要绘制以下块矩阵
我最接近的方法是使用以下代码:
\begin{pmatrix}
\lambda_1 & * & \dots & *\\
0 & \lceil & & \rceil \\
\vdots & \mid & A_{n-1} & \mid \\
0 & \lfloor & & \rfloor
\end{pmatrix}
我愿意接受tikz
基于的解决方案;但在这种情况下,它需要与以下alignat*
环境完美契合:
\begin{alignat*}{3}
A\begin{pmatrix}
u_1 & \tilde{u}_{2} & \dots & \tilde{u}_{n}
\end{pmatrix} \quad&=&&\quad \begin{pmatrix}
\ lambda_1 u_1 & A\tilde{u}_{2} & \dots & A\tilde{u}_{n}
\end{pmatrix}\\
&=&&\quad \begin{pmatrix}
u_1 & \tilde{u}_{2} & \dots & \tilde{u}_{n}
\end{pmatrix}\begin{pmatrix}
lambda_1 & * & \dots & *\\
0 & \lceil & & \rceil \\
\vdots & \mid & A_{n-1} & \mid \\
0 & \lfloor & & \rfloor
\end{pmatrix}
\end{alignat*}
答案1
两种解决方案:一种基于blkarray
,另一种基于pstricks
:
\documentclass{article}
\usepackage{mathtools}
\usepackage{blkarray}
\usepackage{bigdelim}
\usepackage{pst-node, auto-pst-pdf}
\begin{document}
\begin{alignat*}{3}
A\begin{pmatrix}
u_1 & \tilde{u}_{2} & \dots & \tilde{u}_{n}
\end{pmatrix} \quad&=&&\quad \begin{pmatrix}
\lambda_1 u_1 & A\tilde{u}_{2} & \dots & A\tilde{u}_{n}
\end{pmatrix}\\
&=&&\quad \begin{pmatrix}
u_1 & \tilde{u}_{2} & \dots & \tilde{u}_{n}
\end{pmatrix}\begin{pmatrix}
\begin{blockarray}{@{}cccc@{\;}}
\lambda_1 & * & \dots & *\\
\begin{block}{c|@{}ccc@{\;}|}
\BAhhline{~|---|}
0 & & & \\
\vdots & & A_{n-1} & \\
0 & & & \\
\end{block}
\BAhhline{~|---|}
\end{blockarray}
\end{pmatrix}
\end{alignat*}
\begin{alignat*}{3}
A\begin{pmatrix}
u_1 & \tilde{u}_{2} & \dots & \tilde{u}_{n}
\end{pmatrix} \quad&=&&\quad \begin{pmatrix}
\lambda_1 u_1 & A\tilde{u}_{2} & \dots & A\tilde{u}_{n}
\end{pmatrix}\\
&=&&\quad \begin{pmatrix}
u_1 & \tilde{u}_{2} & \dots & \tilde{u}_{n}
\end{pmatrix}\begin{pmatrix}
\lambda_1 & * & \dots & *\\
0 & \pnode[-1ex, 2ex]{A} & & \\
\vdots & & A_{n-1} &\\
0 & & & \phantom{*}\pnode[0.4ex, -0.4ex]{B}\,\\
\end{pmatrix}
\psframe[linewidth=0.4pt](A)(B)
\end{alignat*}
\end{document}
答案2
您可以使用nicematrix
:
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{alignat*}{3}
A\begin{pmatrix}
u_1 & \tilde{u}_{2} & \dots & \tilde{u}_{n}
\end{pmatrix} \quad
&=&&\quad
\begin{pmatrix}
\lambda_1 u_1 & A\tilde{u}_{2} & \dots & A\tilde{u}_{n}
\end{pmatrix}\\
&=&&\quad
\begin{pmatrix}
u_1 & \tilde{u}_{2} & \dots & \tilde{u}_{n}
\end{pmatrix}
\begin{pNiceMatrix}[extra-right-margin = 1.8mm]
u_1 & \tilde{u}_{2} & \Cdots & \tilde{u}_{n} \\[2mm]
0 & \Block[draw]{3-3}{A_{n-1}} & & \\
\Vdots & & & \\
0 & & & \\
\end{pNiceMatrix}
\end{alignat*}
\end{document}
您需要进行多次编译(因为nicematrix
在后台使用了 PGF/Tikz)。