Multiply a 2x3 matrix A by a 3x2 matrix B to get a 2x2 result C. The inner dimension (3) must match. Each of the four output entries uses three terms in its dot product, and the state panel accumulates them one at a time until the cell is filled.

Example

Fill each 2x2 result entry from three row-column terms.

highlighted = computed this step

Step 1 — Set up

Start with the given matrix data.

A=[123401],B=[102103],C=[]A=\begin{bmatrix}1&2&3\\4&0&-1\end{bmatrix},\quad B=\begin{bmatrix}1&0\\2&-1\\0&3\end{bmatrix},\quad C=\begin{bmatrix}\square&\square\\\square&\square\end{bmatrix}

Step 2 — Top-Left entry

Fill top-left entry: 1*1 + 2*2 + 3*0 = 5.

C=[5],11+22+30=5C=\begin{bmatrix}\hl{5}&\square\\\square&\square\end{bmatrix},\quad 1\cdot 1+2\cdot 2+3\cdot 0=5

Step 3 — Top-Right entry

Fill top-right entry: 1*0 + 2*-1 + 3*3 = 7.

C=[57],10+21+33=7C=\begin{bmatrix}5&\hl{7}\\\square&\square\end{bmatrix},\quad 1\cdot 0+2\cdot -1+3\cdot 3=7

Step 4 — Bottom-Left entry

Fill bottom-left entry: 4*1 + 0*2 + -1*0 = 4.

C=[574],41+02+10=4C=\begin{bmatrix}5&7\\\hl{4}&\square\end{bmatrix},\quad 4\cdot 1+0\cdot 2+-1\cdot 0=4

Step 5 — Bottom-Right entry

Fill bottom-right entry: 4*0 + 0*-1 + -1*3 = -3.

C=[574-3],40+01+13=3C=\begin{bmatrix}5&7\\4&\hl{-3}\end{bmatrix},\quad 4\cdot 0+0\cdot -1+-1\cdot 3=-3

Step 6 — Result

Read the completed C matrix.

C=[5743],C completeC=\begin{bmatrix}5&7\\4&-3\end{bmatrix},\quad \text{C complete}
inner-dimension matching For A (m×p) · B (p×n), the inner dimension p must match. The output is m×n. Here A is 2×3 and B is 3×2, so p=3 and the result is 2×2.
non-square multiplication Matrix multiplication does not require square matrices. Shapes are determined by the outer dimensions after the inner dimension is consumed.