Matrix Calculator
Determinant, inverse, transpose, rank, RREF, eigenvalues and matrix arithmetic, with every step and exact fractions.
Entries can be whole numbers, decimals or fractions such as 3/4. Empty boxes count as 0.
How do you find the determinant and inverse of a matrix?
For a 2 × 2 matrix [[a, b], [c, d]] the determinant is ad − bc. If it is not 0, the inverse is 1/(ad − bc) × [[d, −b], [−c, a]]. Larger matrices use cofactor expansion for the determinant and Gauss–Jordan row reduction for the inverse.
Checked by the All Math Solver team · Last reviewed · How we check our answers
About the Matrix Calculator
Determinant, inverse, transpose, rank, RREF, eigenvalues and matrix arithmetic with exact fractionsA matrix is a rectangular table of numbers with \(m\) rows and \(n\) columns. Two matrices of the same size are added entry by entry, while the product \(AB\) is defined only when the number of columns of \(A\) equals the number of rows of \(B\): each entry is a row of \(A\) times a column of \(B\).
For a \(2 \times 2\) matrix the determinant is \(ad - bc\) and the inverse is \(\frac{1}{ad-bc}\begin{pmatrix} d & -b \\ -c & a \end{pmatrix}\). Larger matrices are handled with cofactor expansion and Gauss–Jordan elimination; every row operation is shown, and fractions stay exact instead of turning into rounded decimals.
How to use the matrix calculator
- Choose the operation: determinant, inverse, transpose, rank, RREF, trace, eigenvalues, a power Aⁿ, k × A, or A + B, A − B and A × B.
- Pick the size of each matrix (up to 5 × 5) and type the entries. Whole numbers, decimals and fractions such as
3/4are fine; an empty box counts as 0. - Press Calculate. You see every step: the 2 × 2 formulas, cofactor expansion, or each row operation of Gauss–Jordan elimination, with exact fractions.
Example: Inverse of A = [[1, 2], [3, 4]] → det A = 1·4 − 2·3 = −2, so A⁻¹ = (1/−2)[[4, −2], [−3, 1]] = [[−2, 1], [3/2, −1/2]]
Frequently asked questions
How do you find the determinant of a matrix?
For a 2 × 2 matrix [[a, b], [c, d]] the determinant is ad − bc. For a 3 × 3 matrix, expand along the first row: multiply each entry by the determinant of the 2 × 2 matrix left after crossing out its row and column, with signs +, −, +. Larger matrices are row reduced to triangular form and the diagonal entries are multiplied.
When does a matrix have an inverse?
Only a square matrix can have an inverse, and only when its determinant is not 0. If the determinant is 0 the matrix is called singular and the calculator tells you that no inverse exists.
When can two matrices be multiplied?
A × B is defined when the number of columns of A equals the number of rows of B. A 2 × 3 matrix times a 3 × 2 matrix gives a 2 × 2 matrix. In general A × B is not equal to B × A.
What is RREF and rank?
Reduced row echelon form (RREF) is what remains after row operations make every pivot 1 and clear the rest of its column. The rank is the number of non-zero rows in that form, which is the number of independent rows or columns.
Are the answers exact?
Yes. The calculator works with exact fractions, so an inverse such as [[−2, 1], [3/2, −1/2]] is shown with fractions instead of rounded decimals.