Matrix Multiplication Calculator

Calculate matrix multiplication instantly in your browser.

Loading calculator…

What this tool does

Calculate matrix multiplication instantly in your browser. The worked default multiplies a 2×3 matrix by a 3×2 matrix to give a 2×2 product.

How to use the Matrix Multiplication Calculator

  1. Enter or select matrix a — rows separated by ; or new lines, entries by commas.
  2. Enter or select matrix b — same format as a.
  3. Read the calculated result; change any measurement to compare alternatives.

Formula

Each entry of A×B is the dot product of a row of A with a column of B: (AB)ᵢⱼ = Σ Aᵢₖ·Bₖⱼ. The product exists only when A's column count equals B's row count, and matrix multiplication is not commutative — A×B ≠ B×A in general.
matrixA
Matrix A — rows separated by ; or new lines, entries by commas
matrixB
Matrix B — same format as A

The worked default multiplies a 2×3 matrix by a 3×2 matrix to give a 2×2 product.

Worked example

For matrix multiplication calculator, the following measurements illustrate the exact method: Matrix A — rows separated by ; or new lines, entries by commas: 1, 2, 3; 4, 5, 6; Matrix B — same format as A: 7, 8; 9, 10; 11, 12.

Inputs

  • Matrix A — rows separated by ; or new lines, entries by commas1, 2, 3; 4, 5, 6
  • Matrix B — same format as A7, 8; 9, 10; 11, 12

Result

  • Product A × B58, 64 ; 139, 154
  • Product size2 × 2
  • A size2 × 3
  • B size3 × 2

Results explained

Product A × B
Product A × B from the formula above. The worked default multiplies a 2×3 matrix by a 3×2 matrix to give a 2×2 product.
Product size
Product size from the formula above. The worked default multiplies a 2×3 matrix by a 3×2 matrix to give a 2×2 product.
A size
A size from the formula above. The worked default multiplies a 2×3 matrix by a 3×2 matrix to give a 2×2 product.
B size
B size from the formula above. The worked default multiplies a 2×3 matrix by a 3×2 matrix to give a 2×2 product.

Frequently asked questions

Each entry of A×B is the dot product of a row of A with a column of B: (AB)ᵢⱼ = Σ Aᵢₖ·Bₖⱼ. The product exists only when A's column count equals B's row count, and matrix multiplication is not commutative — A×B ≠ B×A in general.

The worked default multiplies a 2×3 matrix by a 3×2 matrix to give a 2×2 product.

Where mathematically meaningful, yes. Fields specify permitted ranges and undefined operations display an error.

Exact integer calculations use safe integers; decimal calculations use browser floating point, so small rounding differences can occur.

All values remain in your browser and are never uploaded.