Matrix Calculator

Choose a matrix operation, enter the matrices and see it worked out.

Matrix A
Rows
2
Columns
2

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

Matrix B
Rows
2
Columns
2

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

Try

Result

You entered(1234)(5678)\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} \begin{pmatrix} 5 & 6 \\ 7 & 8 \end{pmatrix}

(19224350)\displaystyle \begin{pmatrix} 19 & 22 \\ 43 & 50 \end{pmatrix}

Size

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

    Here AA is 2×22 \times 2 and BB is 2×22 \times 2. The product ABAB exists because AA has 2 columns and BB has 2 rows, and these match. The product is 2×22 \times 2: 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×5+2×7=5+14=19\begin{aligned} \left(AB\right)_{11} &= 1 \times 5 + 2 \times 7 \\ &= 5 + 14 \\ &= 19 \end{aligned}
  3. Every entry

    Repeat for every row of AA and every column of BB.

    AB=(1234)(5678)=(19224350)AB = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}\begin{pmatrix} 5 & 6 \\ 7 & 8 \end{pmatrix} = \begin{pmatrix} 19 & 22 \\ 43 & 50 \end{pmatrix}
  4. Result

    So AB=(19224350)AB = \begin{pmatrix} 19 & 22 \\ 43 & 50 \end{pmatrix}.

Worked examples