Matrix Multiplication Calculator

Choose the size and enter the rows of matrix A and matrix B.

Matrix size

Separate the numbers with commas. For a 2×2, the first two numbers are used.

Ignored for a 2×2 matrix.

This result is an estimate only. Double-check important figures before relying on them.

How it is calculated

  • Entry (i, j) of A × B = row i of A · column j of B
  • The product of two 2×2 or two 3×3 matrices has the same size
  • The determinant of the product equals det(A) × det(B)

For one matrix on its own, see the matrix inverse calculator.

Worked example

[[1, 2], [3, 4]] × [[5, 6], [7, 8]]:

  • Row 1: 1 × 5 + 2 × 7 = 19 and 1 × 6 + 2 × 8 = 22
  • Product = [[19, 22], [43, 50]]

Why your number may differ

Values are rounded to 6 decimal places. For matrices of different shapes you need a general matrix tool.

Frequently asked questions

How do I multiply two matrices?

Each entry of the product is the dot product of a row of A with a column of B: multiply matching entries and add them up.

Does the order matter?

Yes. A × B is usually different from B × A.

What is the identity matrix?

The matrix with 1s on the diagonal and 0s elsewhere. Multiplying by it leaves a matrix unchanged.