如何制作此图像中的矩阵?我需要使用 LaTeX 来实现。
答案1
您可以使用blkarray
:
\documentclass{article}
\usepackage{amsmath,blkarray,mathrsfs}
\DeclareMathOperator{\Mat}{Mat}
\begin{document}
\[
\Mat_{\mathscr{B},\mathscr{C}}(f)=
\Mat_{\mathscr{C}}(f(\mathscr{B}))=
\begin{blockarray}{ccccccl}
f(e_1) & f(e_2) & & f(e_j) & & f(e_n) \\
\downarrow & \downarrow & & \downarrow & & \downarrow \\
\cline{4-4}
\begin{block}{(ccc|c|cc)l}
a_{11} & a_{12} & \dots & a_{1j} & \dots & a_{1n} & \leftarrow f_1 \\
a_{21} & a_{22} & \dots & a_{2j} & \dots & a_{2n} & \leftarrow f_2 \\
\vdots & \vdots & & \vdots & & \vdots \\
a_{i1} & a_{i2} & \dots & a_{ij} & \dots & a_{in} & \leftarrow f_i \\
\vdots & \vdots & & \vdots & & \vdots \\
a_{n1} & a_{n2} & \dots & a_{nj} & \dots & a_{nn} & \leftarrow f_n \\
\end{block}
\cline{4-4}
& & & \uparrow \\
\end{blockarray}
\]
\end{document}
答案2
或者tikz
\documentclass{article}
\usepackage{amsmath,mathrsfs}
\usepackage{tikz}
\usetikzlibrary{matrix,positioning,fit}
\DeclareMathOperator{\Mat}{Mat}
\begin{document}
\begin{equation*}
\Mat_{\mathscr{B},\mathscr{C}}(f)=\Mat_{\mathscr{C}}\bigl(f(\mathscr{B})\bigr)=
\begin{tikzpicture} [baseline=(m.center),every left delimiter/.style={xshift=2ex},
every right delimiter/.style={xshift=-2ex}] %,
column 6/.style={anchor=base east}]
\matrix (m)[matrix of math nodes,left delimiter=(,right delimiter=)]
{
a_{11} &[3mm] a_{12} & \dots & a_{1j} & \dots & a_{1n} \\
a_{21} & a_{22} & \dots & a_{2j} & \dots & a_{2n} \\[-2mm]
\vdots & \vdots & & \vdots & & \vdots \\
a_{i1} & a_{i2} & \dots & a_{ij} & \dots & a_{in} \\[-2mm]
\vdots & \vdots & & \vdots & & \vdots \\
a_{n1} & a_{n2} & \dots & a_{nj} & \dots & a_{nn} \\
};
\begin{scope}[every node/.style={text=blue}]
\foreach \j/\sub in {1/1,2/2,4/i,6/n} \node[right=\tabcolsep of m-\j-6.east] {$\leftarrow f_{\sub}$};
\foreach \i/\sub in {1/1,2/2,4/j,6/n} \node[above=1.2\tabcolsep of m-1-\i.north] (a-\i) {$f(e_{\sub})$};
\foreach \i in {1,2,4,6} \draw[blue,->] (a-\i) -- (m-1-\i);
\end{scope}
\node[line width=1pt,draw=blue,inner sep=-1pt,fit=(m-1-4) (m-6-4)](mfit){};
\draw[blue,->] ([shift={(-5mm,-5mm)}]mfit.south) -| ([yshift=-1mm]mfit.south);
\end{tikzpicture}
\end{equation*}
\end{document}