I am interested in doing something like the following:
I need to show the structure of several matrices, ignoring the actual values inside of each block, but naming (some of) them, like in the image. What would be the best way to go about it? I imagine tikz may be able to do it, but I don't know enough about it.
EDIT:
I have managed to do the following:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{fit}
\tikzset{%
highlight/.style={rectangle,rounded corners,fill=blue!15,draw,fill opacity=0.5,thick,inner sep=0pt}
}
\newcommand{\tikzmark}[2]{\tikz[overlay,remember picture,baseline=(#1.base)] \node (#1) {#2};}
%
\newcommand{\Highlight}[1][submatrix]{%
\tikz[overlay,remember picture]{
\node[highlight,fit=(left.north west) (right.south east)] (#1) {};}
}
\begin{document}
\[
M = \left(\begin{array}{*5{c}}
\tikzmark{left}{} & & & & \\
& & & & \tikzmark{right}{} \\
& & & & \\
& & & &
\end{array}\right)
\Highlight[first]
\qquad
\begin{array}{*1{c}}
\end{array}
\]
\end{document}
Which produces:
I cannot add another highlighted block, only the second one appears.
Best Answer
A code to start your learning with
TiKZ
matrices.