Boxed entries in matrices
A TikZ solution:
\documentclass{article}
\usepackage{amsmath,tikz}
\usetikzlibrary{matrix}
\begin{document}
\[
\begin{tikzpicture}[baseline=(current bounding box.center)]%
\matrix[matrix of math nodes,
inner sep=0,
nodes={draw,outer sep=0,inner sep=2pt},
every left delimiter/.style={xshift=1ex},%tighter delimiter spacing
every right delimiter/.style={xshift=-1ex},
left delimiter={(},right delimiter={)},
column sep=-\pgflinewidth,row sep=-\pgflinewidth] (r) {
|[inner sep=5mm]|A_1&&\\&A_2&\\&&A_3\\};
\end{tikzpicture}
\subset
\begin{tikzpicture}[baseline=(current bounding box.center)]%
\matrix[matrix of math nodes,
inner sep=0,
nodes={draw,outer sep=0,inner sep=2pt},
every left delimiter/.style={xshift=1ex},%tighter delimiter spacing
every right delimiter/.style={xshift=-1ex},
left delimiter={(},right delimiter={)},
column sep=-\pgflinewidth,row sep=-\pgflinewidth] (l) {
|[inner sep=5mm]|A_1&&&\\&A_2&&\\&&A_2&\\&&&A_3\\};
\draw (l-2-2.north east) |- (l-1-1.north east) (l-2-2.south west) -| (l-1-1.south west)
(l-3-3.north east) -| (l-4-4.north east) (l-3-3.south west) |- (l-4-4.south west);
\end{tikzpicture}
\]
\end{document}
A TikZ-free solution, using the easybmat
package:
\documentclass{article}
\usepackage{amsmath}
\usepackage{easybmat}
\begin{document}
\[
\left(
\begin{array}{c@{}c@{}c}
\begin{BMAT}{|ccc|}{|ccc|}
& & \\
& \mbox{\LARGE$A_1$} & \\
& &
\end{BMAT} & & \\
&
\begin{BMAT}{|c|}{|c|}
A_2
\end{BMAT} & \\
& &
\begin{BMAT}{|c|}{|c|}
A_3
\end{BMAT}
\end{array}
\right)
\subset
\left(
\begin{array}{c@{}c@{}c}
\begin{BMAT}{|ccc|c|}{|ccc|c|}
& & & \\
& \mbox{\LARGE$A_1$} & & \\
& & & \\
& & & A_2
\end{BMAT} & & \\
&
\begin{BMAT}{|c|c|}{|c|c|}
A_2 & \\
& A_3
\end{BMAT}
\end{array}
\right)
\]
\end{document}