Matrix Multiplication Calculator

Multiply two matrices and see row times column at work.

Matrix A
Rows
1
Columns
3

Write rows separated by semicolons, like 1, 2; 3, 4.

Matrix B
Rows
3
Columns
1

Write rows separated by semicolons, like 5, 6; 7, 8.

Try

Result

You entered(123)(456)\begin{pmatrix} 1 & 2 & 3 \end{pmatrix} \begin{pmatrix} 4 \\ 5 \\ 6 \end{pmatrix}

(32)\displaystyle \begin{pmatrix} 32 \end{pmatrix}

Size

1×1\displaystyle 1 \times 1
Show the work
  1. Sizes for matrix multiplication

    Here AA is 1×31 \times 3 and BB is 3×13 \times 1. The product ABAB exists because AA has 3 columns and BB has 3 rows, and these match. The product is 1×11 \times 1: the rows of AA by the columns of BB.

  2. Row times column

    Each entry of ABAB is a row of AA multiplied term by term with a column of BB, then added. The entry in row 1, column 1 uses row 1 of AA and column 1 of BB.

    Using (AB)ij=ai1b1j+ai2b2j+⋯+ainbnj\left(AB\right)_{ij} = a_{i1}b_{1j} + a_{i2}b_{2j} + \cdots + a_{in}b_{nj}

    (AB)11=1×4+2×5+3×6=4+10+18=32\begin{aligned} \left(AB\right)_{11} &= 1 \times 4 + 2 \times 5 + 3 \times 6 \\ &= 4 + 10 + 18 \\ &= 32 \end{aligned}
  3. Result

    So AB=(32)AB = \begin{pmatrix} 32 \end{pmatrix}.

Worked examples