Matrix Multiplication Calculator

Multiply matrices step-by-step

CalculatorsFreeNo Signup
4.5(226 reviews)
All Tools

Loading tool...

About Matrix Multiplication Calculator

A matrix multiplication calculator that computes A×B for compatible matrices. Validates dimensions (cols of A = rows of B), shows each element as a dot product, and displays the resulting matrix. Supports up to 4×4 matrices. All calculations are client-side. Essential for linear algebra, computer graphics, machine learning, and physics.

Matrix Multiplication Calculator Features

  • Dimension check
  • Dot products
  • Up to 4×4
  • Step-by-step
  • Result grid
Matrix multiplication: (AB)ᵢⱼ = Σₖ Aᵢₖ·Bₖⱼ. Requires cols(A) = rows(B). If A is m×n and B is n×p, then AB is m×p. Not commutative: AB ≠ BA in general. Associative: (AB)C = A(BC). Distributive: A(B+C) = AB+AC.

How to Use

Enter two matrices:

  • Matrix A: Set dimensions, fill values
  • Matrix B: Cols of A must match rows of B
  • Result: Product matrix shown

Key Rules

  • AB ≠ BA (not commutative)
  • (AB)C = A(BC) (associative)
  • AI = IA = A (identity)
  • (AB)ᵀ = BᵀAᵀ

Applications

3D graphics transforms, neural network layers, Markov chains, control systems, image processing, quantum gates.

Step-by-Step Instructions

  1. 1Set Matrix A dimensions.
  2. 2Fill Matrix A values.
  3. 3Set Matrix B dimensions.
  4. 4Fill Matrix B values.
  5. 5View the product matrix.

Matrix Multiplication Calculator — Frequently Asked Questions

Why can't I multiply any two matrices?+

The inner dimensions must match: A(m×n) × B(n×p) → C(m×p). Each element of C is a dot product of a row of A with a column of B — they must have the same length n.

Why isn't matrix multiplication commutative?+

AB and BA may have different dimensions (or one may not even exist). Even for square matrices, the row-by-column structure means the operations are fundamentally different.

What is the identity matrix?+

The identity matrix I has 1s on the diagonal and 0s elsewhere. AI = IA = A for any compatible matrix A. It's the multiplicative identity, like 1 for numbers.

Share this tool: