Matrix Calculator
Determinant, inverse, transpose, A × B, A + B and 2 × 2 eigenvalues for matrices up to 4 × 4, in exact fractions with every step shown.
Result…
How it's calculated
2 × 2: det = ad − bc, A⁻¹ = (1 ÷ det) × [d −b; −c a] Larger: det by cofactor expansion along row 1; A⁻¹ by row-reducing [A | I] (A × B)ᵢⱼ = row i of A · column j of B 2 × 2 eigenvalues: λ² − (a + d)λ + (ad − bc) = 0
Works with matrices from 1 × 1 to 4 × 4. Every entry is kept as an exact fraction (decimals such as 0.25 become 1/4), so inverses come out as exact fractions with no rounding; decimals are shown alongside to 10 significant figures. A matrix has an inverse only when its determinant is not zero. A × B needs as many columns in A as rows in B, and A × B is usually not B × A. Eigenvalues are given for 2 × 2 matrices, real or complex, from the characteristic equation, with an eigenvector for each real one.
Your numbers, step by step
About the Matrix calculator
This matrix calculator finds the determinant, inverse and transpose of a matrix, multiplies, adds or subtracts two matrices, and gives the eigenvalues and eigenvectors of a 2 × 2 matrix, real or complex. Matrices can be anything from 1 × 1 to 4 × 4, typed as rows of numbers such as 1 2; 3 4. Every entry is kept as an exact fraction, so an inverse comes out as 3/5 and −7/10 rather than a rounded decimal, and the decimals are shown alongside. The working is written out: the cofactor expansion for a determinant, the row operations that turn [A | I] into the inverse, and each row-times-column sum in a product. It suits linear algebra students checking homework, and anyone solving equations, transforming coordinates or working with graphics or data. To solve equations directly, use the system of equations calculator.
How to use it
- Choose the operation in “Find”: determinant, inverse, transpose, product, sum, difference or eigenvalues.
- Type “Matrix A” with entries split by spaces and rows split by a semicolon or a new line, for example 4 7; 2 6. Fractions like 1/2 and decimals work.
- For A × B, A + B or A − B, type “Matrix B” too. For a product, A needs as many columns as B has rows.
- Read the result as rows in square brackets, with the decimals and the step-by-step working below.
Worked example
For A = [4 7; 2 6], the determinant is 4 × 6 − 7 × 2 = 10, so the inverse is (1/10) × [6 −7; −2 4] = [3/5 −7/10; −1/5 2/5], or [0.6 −0.7; −0.2 0.4] in decimals. For the 3 × 3 matrix [2 1 3; 0 4 1; 5 2 0], expanding along row 1 gives a determinant of −59. The matrix [2 1; 1 2] has eigenvalues 3 and 1, with eigenvectors (1, 1) and (1, −1).
Updated
Questions people ask
How do I find the determinant of a 3 × 3 matrix?
Expand along the first row: multiply each entry by the determinant of the 2 × 2 matrix left when you cross out its row and column, then combine them with alternating signs, + − +. The steps show each of these minors with your numbers.
When does a matrix have no inverse?
When its determinant is zero. Such a matrix is called singular: its rows depend on each other, so it squashes space flat and the transformation cannot be undone.
Why is A × B not the same as B × A?
Matrix multiplication is not commutative. Each entry of A × B is a row of A times a column of B, and swapping the order pairs different rows with different columns. Often only one of the two products is even defined.
How are 2 × 2 eigenvalues found?
They are the roots of λ² − (a + d)λ + (ad − bc) = 0, where a + d is the trace and ad − bc the determinant. A negative discriminant gives a pair of complex eigenvalues, such as 2 ± i.
Can I enter fractions or decimals?
Yes. Type 1/3, −2.5 or 0.125 as entries. Decimals are turned into exact fractions, so 0.25 is worked with as 1/4 and nothing is rounded until the decimal display.
Does it find eigenvalues of 3 × 3 or larger matrices?
Not yet: eigenvalues here are for 2 × 2 matrices only. Determinant, inverse, transpose and the other operations work up to 4 × 4.