将矩阵表示为矩形以指示其维度

将矩阵表示为矩形以指示其维度

我尝试用矩形来表示 Ax = b\,以便观众能够更直观地了解尺寸。在此处输入图片描述

我希望矩阵 A 位于矩形的中心,标签作为尺寸。我尝试使用 tikz,但无法对齐矩形。有什么提示吗?

答案1

像这样吗?

\documentclass[tikz,border=2mm]{standalone} 
\usetikzlibrary{positioning}

\begin{document}
\begin{tikzpicture}

\node[draw, minimum width=3cm, minimum height=8mm, label=left:6, label=below:$10^5$] (A) {A};
\node[right=1mm of A] (p) {$\times$};
\node[draw, minimum width=8mm, minimum height=3cm, label=-60:$10^5$, label=6, right=1mm of p] (x) {x};
\node[right=1mm of x] (e) {$=$};
\node[draw, minimum size=8mm, label=right:6, label=6, right=1mm of e] (B) {B};

\end{tikzpicture}
\end{document}

在此处输入图片描述

更新:北对齐

\documentclass[tikz,border=2mm]{standalone} 
\usetikzlibrary{positioning}

\begin{document}
\begin{tikzpicture}

\node[draw, minimum width=3cm, minimum height=8mm, label=left:6, label=below:$10^5$] (A) {A};
\node[draw, minimum width=8mm, minimum height=3cm, label=left:$10^5$, label=6, below right= 0 and 8mm of A.north east] (x) {x};
\node[draw, minimum size=8mm, label=right:6, label=6, below right=0 and 8mm of x.north east] (B) {B};

\path (A.east) --  node{$\times$} (A-|x.west);
\path (B-|x.east)  -- node {$=$} (B.west);

\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容