Skip to content

Matrix Calculator

All the standard matrix operations in one place. Up to 6×6, with determinant via partial-pivoting LU and RREF for solving linear systems.

Add, multiply, transpose, invert and reduce matrices up to 6×6. Determinant uses partial-pivoting LU decomposition.

Matrix A

Matrix B

Choosing the right operation

Most linear algebra problems boil down to a small set of canonical operations. Use this calculator like a Swiss-army knife:

  • A + B / A − B requires both matrices to have the same dimensions.
  • A × B requires the inner dimensions to match: an m×n times an n×p gives an m×p result.
  • Transpose swaps rows and columns and works on any matrix.
  • Determinant is only defined for square matrices. A non-zero determinant means the matrix is invertible.
  • Inverse exists if and only if the determinant is non-zero. Used for solving Ax = b as x = A⁻¹b.
  • RREF (reduced row-echelon form) reveals the rank and is the cleanest way to solve linear systems by hand.

Why partial pivoting matters

A naive Gaussian elimination can lose precision when small pivots get used. Partial pivoting picks the largest available element in the current column as the pivot at each step, which dramatically reduces round-off error. The determinant routine in this calculator uses partial-pivoting LU and tracks the sign change from each row swap.