答案1
下面的代码适用于第一个矩阵,因为对于三个矩阵来说它很容易编写。
$\begin{matrix}
& A & \\
& \begin{bmatrix}
1 & 2 & 3\\
a & b & c
\end{bmatrix} &\\
& \mbox{Input matrix} & \\
\end{matrix}$
我在编写此代码时想象该块是一个具有三行的矩阵,其中第二行是另一个矩阵。
答案2
和nicematrix
:
\documentclass{article}
\usepackage{nicematrix}
\begin{document}
\noindent
$\begin{bNiceMatrix}[first-row,last-row=6]
\Block{1-5}{\text{\small A}} \\
\times & \times & \times & \times & \times\\
\times & \times & \times & \times & \times\\
\times & \times & \times & \times & \times\\
\times & \times & \times & \times & \times\\
\times & \times & \times & \times & \times\\
\rule{0pt}{12pt}
\Block{1-5}{\text{\small Input matrix} }
\end{bNiceMatrix}$
%
\begin{tabular}[c]{c}
$\rightarrow$ \\
\small Phase 1
\end{tabular}
%
$\begin{bNiceMatrix}[first-row,last-row=6]
\Block{1-5}{\text{\small U}}\\
\times & \times & \times & \times & \times\\
\times & \times & \times & \times & \times\\
0 & \times & \times & \times & \times \\
0 & 0 & \times & \times & \times\\
0 & 0 & 0 & \times & \times\\
\rule{0pt}{12pt}
\Block{1-5}{\text{\small Upper Hessenberg}}
\end{bNiceMatrix}$
%
\begin{tabular}[c]{c}
$\rightarrow$ \\
\small Phase 2
\end{tabular}
%
$\begin{bNiceMatrix}[first-row,last-row=6]
\Block{1-5}{\text{\small T}}\\
\times & \times & \times & \times & \times\\
0 & \times & \times & \times & \times\\
0 & 0 & \times & \times & \times \\
0 & 0 & 0 & \times & \times\\
0 & 0 & 0 & 0 & \times\\
\rule{0pt}{12pt}
\Block{1-5}{\text{\small Upper Triangular}}
\end{bNiceMatrix}$
\end{document}
答案3
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\noindent{}
\begin{tabular}{*{5}{c}}
{\small A} & & {\small U} & & {\small T} \\
$\begin{bmatrix}
\times & \times & \times & \times & \times\\%
\times & \times & \times & \times & \times\\%
\times & \times & \times & \times & \times \\%
\times & \times & \times & \times & \times\\%
\times & \times & \times & \times & \times\\%
\end{bmatrix}
$ &
\begin{tabular}[c]{c}
$\rightarrow$ \\\small Phase 1
\end{tabular}
& $\begin{bmatrix}
\times & \times & \times & \times & \times\\%
\times & \times & \times & \times & \times\\%
0 & \times & \times & \times & \times \\%
0 & 0 & \times & \times & \times\\%
0 & 0 & 0 & \times & \times\\%
\end{bmatrix} $ & \begin{tabular}[c]{c}
$\rightarrow$ \\\small Phase 2
\end{tabular} &
$\begin{bmatrix}
\times & \times & \times & \times & \times\\%
0 & \times & \times & \times & \times\\%
0 & 0 & \times & \times & \times \\%
0 & 0 & 0 & \times & \times\\%
0 & 0 & 0 & 0 & \times\\%
\end{bmatrix} $ \\
{\small Input matrix} & & {\small Upper Hessenberg} & & {\small Upper Triangular}
\end{tabular}
\end{document}