# Highlighting box within a matrix

I'm trying to ilustrate how matrix multiplication works with the following code:

\begin{align*}
&  \begin{pmatrix}
1 &2 \\
-1 &0
\end{pmatrix} \\
\begin{pmatrix}
3 & 2 \\
1 &-2
\end{pmatrix} & \begin{pmatrix}
? & ? \\ ? & ?
\end{pmatrix}
\end{align*}


With the following result:

I'd like to add some highlighting boxes like this:

I've seen some ways of doing boxes like these, but they don't seem to work properly within matrices (the & symbol for separating columns doesn't do its job when put within the boxes). Is there a way to do these that plays nicely with matrices? Also, is there a way to nicely align the top and bottom right matrices? Because right now they're aligned at the parenthesis, and it looks a bit odd.

You might want to make the whole expression as one array using nicematrix and add the parentheses using \SubMatrix. The highlighting boxes can be drawn with tikz using the fit library.

Note that \SubMatrix doesn't add space for the parentheses, so some additional space needs to be added between columns 2 and 3.

\documentclass{article}

\usepackage{nicematrix, tikz}
\usetikzlibrary{fit}

\begin{document}

$\begin{NiceArray}{cc@{\hspace{1.5em}}cc} & & 1 & 2\\ & & -1 & 0\\[1ex] 3 & 2 & ? & ?\\ 1 & -2 & ? & ? \CodeAfter \SubMatrix({3-3}{4-4}) \SubMatrix({1-3}{2-4}) \SubMatrix({3-1}{4-2}) \tikz{ \node [draw, red, fit = (3-1)(3-2), inner sep=1pt]{}; \node [draw, red, fit = (1-3)(2-3), inner sep=1pt]{}; \node [draw, red, fit = (3-3), inner sep=1pt]{}; } \end{NiceArray}$

\end{document}