<s>[INST] How multiply Blocked Matrices? I am having a hard time understanding how to multiply blocked matrices with rectangle matrices and blocking into non-square matrices. Can someone please explain me how that works?
 [/INST] I hope it can help you
Example:
$A=
        \begin{bmatrix}
        2 & 3  & 2\\
        4 & 1  & 3\\
        3 & 2  & 1\\
        \end{bmatrix}
$$\to$
$ \left[
    \begin{array}{cc|c}
      2&3&2\\
      4&1&3 \\
\hline
      3 &2 &1
    \end{array}
\right] $
$ B=
        \begin{bmatrix}
        1 & 3 \\
        2 & 4 \\
        2 & 1 \\
        \end{bmatrix}
$$\to$
$ \left[
    \begin{array}{}
      1&3\\
      2&4 \\
\hline
      2 &1 
    \end{array}
\right] $
$AB= 
        \begin{bmatrix}
        A_{11} & A_{12} \\
        A_{21} & A_{22} \\
        \end{bmatrix}
\times\begin{bmatrix}
        B_{1}  \\
        B_{2}  \\
        \end{bmatrix}
=\begin{bmatrix}
        A_{11}B_{1} + A_{12}B_{2} \\
        A_{21}B_{1} + A_{22}B_{2} \\
        \end{bmatrix}
$
$A_{11}B_{1}= 
        \begin{bmatrix}
         2 & 3 \\
        4 & 1 \\
        \end{bmatrix}
\times\begin{bmatrix}
        1 & 3  \\
        2 & 4  \\
        \end{bmatrix}
=\begin{bmatrix}
        8 & 18 \\
        6 & 16 \\
        \end{bmatrix}
$
$A_{12}B_{2}= 
        \begin{bmatrix}
         2  \\
        3  \\
        \end{bmatrix}
\times\begin{bmatrix}
        2 & 1  \\
        \end{bmatrix}
=\begin{bmatrix}
        4 & 2 \\
        6 & 3 \\
        \end{bmatrix}
$
$A_{21}B_{1}= 
        \begin{bmatrix}
         3 & 2 \\
        \end{bmatrix}
\times\begin{bmatrix}
        1 & 3  \\
        2 & 4  \\
        \end{bmatrix}
=\begin{bmatrix}
        7 & 17 \\
        \end{bmatrix}
$
$A_{22}B_{2}= 
        \begin{bmatrix}
         1  \\
        \end{bmatrix}
\times\begin{bmatrix}
        2 & 1  \\
        \end{bmatrix}
=\begin{bmatrix}
        2 & 1 \\
        \end{bmatrix}
$

$A_{11}B_{1}+A_{12}B_{2}= 
        \begin{bmatrix}
         8 & 18 \\
        6 & 16 \\
        \end{bmatrix}
+\begin{bmatrix}
        4 & 2  \\
        6 & 3  \\
        \end{bmatrix}
=\begin{bmatrix}
        12 & 20 \\
        12 & 19 \\
        \end{bmatrix}
$
$A_{21}B_{1}+A_{22}B_{2}= 
        \begin{bmatrix}
         7 & 17 \\
        \end{bmatrix}
+\begin{bmatrix}
        2 & 1  \\
        \end{bmatrix}
=\begin{bmatrix}
        9 & 18 \\
        \end{bmatrix}
$
$$AB=
        \begin{bmatrix}
        12 & 20  \\
        12 & 19  \\
\hline
        9 & 18  \\
        \end{bmatrix}
$$
</s>