Skip to content
The Calculatorz
Algebra

Matrix Determinant and Inverse Calculator

Find the determinant, inverse, transpose, trace and rank of a square matrix up to 5 × 5.

Matrix entries

Matrix

How to use this calculator

Type the matrix with one row per line and the numbers in each row separated by spaces or commas. Fractions such as 1/2 and negative numbers are accepted. The matrix must be square (2 × 2 up to 5 × 5) to have a determinant and inverse.

Formula

The determinant is found by Gaussian elimination: det(A) = (−1)^s × product of the pivots, where s is the number of row swaps. The inverse is found by Gauss–Jordan elimination of [A | I] into [I | A⁻¹]; it exists only when det(A) ≠ 0. Rank is the number of non-zero pivots.

Calculator credits

Calculator developmentJulia Edwards

Editorial supervision

Expert reviewIfrahMSc Mathematics

Published byThe Calculatorz

Last updated

Read how we research, test, review and correct our calculators in our editorial policy.

Frequently asked questions

What does the determinant tell me?

A non-zero determinant means the matrix is invertible and its rows are linearly independent. Its absolute value is the factor by which the matrix scales areas (2 × 2) or volumes (3 × 3).

When does a matrix have no inverse?

When its determinant is 0. Such a matrix is called singular; at least one row is a combination of the others.

How do I enter fractions?

Type them as 1/3 or −2/5. Decimals such as 0.25 also work.

Why are some inverse entries long decimals?

The inverse often contains fractions. The calculator shows them as decimals rounded to 8 significant figures.

What is the rank of a matrix?

Rank is the number of linearly independent rows (or columns). A square matrix is invertible only if its rank equals its size.

Can I multiply two matrices?

Not in this calculator, which focuses on properties of a single square matrix: determinant, inverse, transpose, trace and rank.

References & methodology sources

These sources support the calculator’s formula, definitions, thresholds, units or result interpretation.

  1. Strang, G. (2016). Introduction to linear algebra (5th ed.). Wellesley-Cambridge Press. View source
  2. Abramson, J. (2021). College algebra 2e. OpenStax. View source
  3. Abramson, J. (2021). Precalculus 2e. OpenStax. View source
  4. Olver, F. W. J., Lozier, D. W., Boisvert, R. F., & Clark, C. W. (Eds.). (2024). NIST Digital Library of Mathematical Functions. National Institute of Standards and Technology. View source