With TikZ matrix
:
\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{matrix, positioning, patterns, backgrounds}
\tikzset{
every matrix/.append style={
matrix of math nodes,
nodes in empty cells,
inner sep=0pt,
outer sep=0pt,
column sep=-\pgflinewidth,
row sep=-\pgflinewidth,
},
mylargenode/.style={
text centered,
text width=30pt,
text height=20pt,
text depth=10pt,
},
mylongnode/.style={
text centered,
text width=20pt,
text height=40pt,
text depth=30pt,
},
mysmallnode/.style={
text centered,
text width=20pt,
text height=20pt,
text depth=10pt,
},
mylonglargenode/.style={
text centered,
text width=30pt,
text height=40pt,
text depth=30pt,
},
}
\begin{document}
With delimiters like in your image:
\[
\begin{tikzpicture}
\matrix[
nodes={mylargenode},
column 6/.style={nodes={mysmallnode}},
row 6/.style={nodes={mylonglargenode}}
] (A) {%
&&&&&|[draw=blue, fill=blue!10!white]| \\
&&&&&|[draw=blue, fill=blue!30!white]|\\
&&&&&|[draw=blue, fill=blue!50!white]|\\
&&&&&|[draw=blue,dotted]| \\
&&&&&|[draw=blue, fill=blue!70!white]|\\
&&&&& |[mylongnode,pattern=crosshatch,pattern color=blue!40!white, draw=blue]|\Dot{F}\\
};
\begin{scope}[on background layer]
\foreach \ind in {1,2,3,5}
{
\draw[green!70!black,fill=green!40!lightgray] (A-\ind-\ind.north west) -- (A-\ind-\ind.north east) -- (A-\ind-\ind.south east) -- cycle;
\node[anchor=north east] at (A-\ind-\ind.north east) {R};
}
\end{scope}
\draw[dotted, green!70!black] (A-4-4.north west) -- (A-4-4.north east) -- (A-4-4.south east) -- cycle;
\node[font=\Huge,shift={(-1,-2)}] at (A) {$0$};
\node[font=\Huge,shift={(1,3)}] at (A) {$0$};
\matrix[
right =of A.north east,
anchor=north west,
nodes={mysmallnode}
] (B) {%
\underline{a}_1 \\
\underline{a}_2 \\
\underline{a}_3 \\
\\
\underline{a}_M\\
\underline{b}\\
};
\foreach \ind in {1,2,...,5}{
\draw (B-\ind-1.south west) -- (B-\ind-1.south east);
}
\draw[dotted] (B-4-1.north) -- (B-4-1.south);
\matrix[
right =4em of B.north east,
anchor=north west,
nodes={draw,mysmallnode}
] (C) {%
|[fill=yellow!10!white]|\\
|[fill=yellow!30!white]|\\
|[fill=yellow!50!white]|\\
\\
|[fill=yellow!70!white]|\\
|[mylongnode, pattern=horizontal lines, pattern color=yellow!90!white]|\underline{\Dot{f}}\\
};
\path (B-4-1) -- node[midway] {$=$} (C-4-1);
\draw[dotted] (C-4-1.north) -- (C-4-1.south);
% delimiters:
\foreach \mymatr in {A,B,C}
{
\draw[very thick] ([xshift=4pt]\mymatr.north west) -- (\mymatr.north west) -- (\mymatr.south west) -- ([xshift=4pt]\mymatr.south west);
\draw[very thick] ([xshift=-4pt]\mymatr.north east) -- (\mymatr.north east) -- (\mymatr.south east) -- ([xshift=-4pt]\mymatr.south east);
}
\end{tikzpicture}
\]
Or with ordinary delimiter:
\[
\begin{tikzpicture}[
every matrix/.append style={
left delimiter={[},
right delimiter={]},
}
]
\matrix[
nodes={mylargenode},
column 6/.style={nodes={mysmallnode}},
row 6/.style={nodes={mylonglargenode}}
] (A) {%
&&&&&|[draw=blue, fill=blue!10!white]| \\
&&&&&|[draw=blue, fill=blue!30!white]|\\
&&&&&|[draw=blue, fill=blue!50!white]|\\
&&&&&|[draw=blue,dotted]| \\
&&&&&|[draw=blue, fill=blue!70!white]|\\
&&&&& |[mylongnode,pattern=crosshatch,pattern color=blue!40!white, draw=blue]|\Dot{F}\\
};
\begin{scope}[on background layer]
\foreach \ind in {1,2,3,5}
{
\draw[green!70!black,fill=green!40!lightgray] (A-\ind-\ind.north west) -- (A-\ind-\ind.north east) -- (A-\ind-\ind.south east) -- cycle;
\node[anchor=north east] at (A-\ind-\ind.north east) {R};
}
\end{scope}
\draw[dotted, green!70!black] (A-4-4.north west) -- (A-4-4.north east) -- (A-4-4.south east) -- cycle;
\node[font=\Huge,shift={(-1,-2)}] at (A) {$0$};
\node[font=\Huge,shift={(1,3)}] at (A) {$0$};
\matrix[
right =of A.north east,
anchor=north west,
nodes={mysmallnode}
] (B) {%
\underline{a}_1 \\
\underline{a}_2 \\
\underline{a}_3 \\
\\
\underline{a}_M\\
\underline{b}\\
};
\foreach \ind in {1,2,...,5}{
\draw (B-\ind-1.south west) -- (B-\ind-1.south east);
}
\draw[dotted] (B-4-1.north) -- (B-4-1.south);
\matrix[
right =4em of B.north east,
anchor=north west,
nodes={draw,mysmallnode}
] (C) {%
|[fill=yellow!10!white]|\\
|[fill=yellow!30!white]|\\
|[fill=yellow!50!white]|\\
\\
|[fill=yellow!70!white]|\\
|[mylongnode, pattern=horizontal lines, pattern color=yellow!90!white]|\underline{\Dot{f}}\\
};
\path (B-4-1) -- node[midway] {$=$} (C-4-1);
\draw[dotted] (C-4-1.north) -- (C-4-1.south);
\end{tikzpicture}
\]
\end{document}
