Matrix Multiplication Calculator

Quick answer

The matrix multiplication calculator multiplies a matrix A (up to 3 × 3) by a matrix B (up to 3 × 3) when the inner dimensions match, showing how each entry is formed.

A × B
⎡ 8 11 ⎤ ⎣ 1 5 ⎦
Size of the product
2×2
How each entry is computed
c₁₁ = 4·1 + 1·0 + 2·2 = 8 c₁₂ = 4·2 + 1·1 + 2·1 = 11 c₂₁ = 1·1 + 3·0 + 0·2 = 1 c₂₂ = 1·2 + 3·1 + 0·1 = 5

Matrix multiplication composes linear transformations, chains Markov transitions, rotates and scales graphics, and is the core operation of neural networks.

How to use the Matrix Multiplication Calculator

  1. First matrix size (rows × columns)
  2. A: a₁
  3. A: b₁
  4. A: c₁
  5. A: a₂
  6. A: b₂
  7. A: c₂
  8. A: a₃
  9. A: b₃
  10. A: c₃
  11. Second matrix size (rows × columns)
  12. B: x₁
  13. B: y₁
  14. B: z₁
  15. B: x₂
  16. B: y₂
  17. B: z₂
  18. B: x₃
  19. B: y₃
  20. B: z₃

Everything is calculated in your browser, so results appear instantly and nothing you type is sent to a server.

How it works

Each entry of the product is the dot product of a row of A with a column of B. The number of columns of A must equal the number of rows of B.

Tips

  • Check the sizes first: matrix products need the inner dimensions to match.
  • Enter the matrix row by row; each row of fields is one row of the matrix.
  • Integer matrices are shown with exact fractions where the result is rational.
  • A determinant of zero means the matrix has no inverse and its columns are dependent.

Common mistakes to avoid

  • Multiplying matrices element by element when a matrix product is needed.
  • Assuming AB = BA – matrix multiplication is not commutative.
  • Mixing up rows and columns when reading a result.

Formula

cᵢⱼ = Σₖ aᵢₖ · bₖⱼ (A is m × n, B is n × p, C is m × p)

Worked example

Inputs — First matrix size (rows × columns): 2 × 3; A: a₁: 4; A: b₁: 1; A: c₁: 2; A: a₂: 1; A: b₂: 3; A: c₂: 0; Second matrix size (rows × columns): 3 × 2; B: x₁: 1; B: y₁: 2; B: x₂: 0; B: y₂: 1; B: x₃: 2; B: y₃: 1.
Results — A × B = ⎡ 8 11 ⎤
⎣ 1 5 ⎦
; Size of the product = 2×2; How each entry is computed = c₁₁ = 4·1 + 1·0 + 2·2 = 8
c₁₂ = 4·2 + 1·1 + 2·1 = 11
c₂₁ = 1·1 + 3·0 + 0·2 = 1
c₂₂ = 1·2 + 3·1 + 0·1 = 5.

Key terms

Matrix product
The composition of linear maps.

Frequently asked questions

When can two matrices be multiplied?

When A has as many columns as B has rows.

Is AB = BA?

Generally not – matrix multiplication is not commutative.

What is the size of the product?

(rows of A) × (columns of B).

What is the identity matrix?

The square matrix with 1s on the diagonal; AI = IA = A.

What formula does the Matrix Multiplication Calculator use?

cᵢⱼ = Σₖ aᵢₖ · bₖⱼ (A is m × n, B is n × p, C is m × p).

Sources

  1. Wolfram MathWorld – Matrix multiplication
  2. MIT OpenCourseWare – 18.06 Linear Algebra (Gilbert Strang)
  3. Jim Hefferon – Linear Algebra (free textbook)

Cite this calculator

Speedy Calculator. (2026). Matrix Multiplication Calculator. Speedy Calculator. https://speedycalculator.com/calculators/math/matrix-multiplication/