Skip to content
AllCalcHub

Matrix Calculator

Find the determinant, inverse and transpose of a matrix, and add or multiply matrices, with exact fractions.

About the Matrix Calculator

Matrices are grids of numbers used to solve systems of equations, transform shapes in graphics and model networks. This calculator works with exact fractions, so an inverse like 1/3 stays exact instead of 0.333333.

Type one row per line. A matrix has an inverse only if its determinant isn't zero.

The formula

det [[a, b], [c, d]] = ad − bc; A⁻¹ = (1/det A) [[d, −b], [−c, a]]

A × B
entry (i, j) = row i of A · column j of B
Larger matrices
row reduction (Gaussian elimination)

Worked example

A = [[2, 1], [5, 3]]

  1. det = 2·3 − 1·5 = 1
  2. A⁻¹ = [[3, −1], [−5, 2]]

Questions people ask

Why can't I multiply these matrices?

The number of columns in A must equal the number of rows in B.

Is A × B the same as B × A?

Usually not; matrix multiplication isn't commutative.