Matrix Calculator

Type each matrix row on its own line. Arithmetic is done in exact fractions, so an inverse comes out as 13/9 rather than 1.444444.

Also called: Determinant calculator · Inverse matrix calculator · Matrix multiplication calculator

  • Last updated
  • Formula tested against reference values

Your numbers

One row per line; separate entries with spaces or commas. Fractions such as 1/3 are allowed. Up to 10 × 10.

Used only for A + B, A − B and A × B.

Result

Result (exact)
—

Calculating…

Result (decimal)
—
Size of the result
—
Full table

How to use this calculator

  1. Enter or choose operation.
  2. Enter or choose matrix A.
  3. Enter or choose matrix B.
  4. The result (exact) updates as you type. Use Copy result or Share to keep it.

Method

det and rank by Gaussian elimination; A⁻¹ by Gauss–Jordan elimination on [A | I]; (AB)ᵢⱼ = Σₖ Aᵢₖ Bₖⱼ

A, B
the matrices
I
the identity matrix
i, j
row and column positions

Worked example

  1. det A = 2 × 4 − 1 × 7 = 1.
  2. For a 2 × 2 matrix, swap the diagonal, negate the off-diagonal and divide by det: [4, −1; −7, 2] ÷ 1.
  3. Check: [2 1; 7 4] × [4 −1; −7 2] = [1 0; 0 1].

The inverse of [2 1; 7 4] is [4 −1; −7 2].

What the result means

A matrix has an inverse only when its determinant is not zero. The rank is the number of independent rows; a square matrix of full rank is invertible. Results are written row by row, with rows separated by semicolons.

Assumptions and limits

  • Entries are real numbers entered as decimals or fractions.
  • Up to 10 × 10. Eigenvalues and decompositions are not covered.

Questions

When can I multiply two matrices?

A × B needs the number of columns of A to equal the number of rows of B. An m × n matrix times an n × p matrix gives an m × p matrix, and in general A × B ≠ B × A.

Why does it say the matrix is singular?

Its determinant is zero: some row is a combination of the others, so the matrix squashes space flat and cannot be undone.