The inverse matrix calculator finds A⁻¹ for any square matrix from 2×2 up to 6×6. Enter integers, decimals, or fractions, and the calculator runs Gauss-Jordan elimination with exact rational arithmetic, so answers such as 3/5 or −7/10 come out precisely instead of as rounded decimals. It reports the determinant, flags singular matrices that have no inverse, lists every row operation, and verifies the answer by checking that A·A⁻¹ equals the identity matrix.
Inverse Matrix Calculator
Integers, decimals or fractions such as 2/3. Tab moves to the next cell.
Blue cells are positive, pink cells are negative, and brighter means larger. Hover a cell to read its exact value.
Watch [A | I] turn into [I | A⁻¹] one row operation at a time. Changed rows are highlighted.
What is an Inverse Matrix?
The inverse of a square matrix A is the matrix A⁻¹ that satisfies A·A⁻¹ = A⁻¹·A = I, where I is the identity matrix. It plays the same role for matrices that 1/a plays for numbers.
Geometrically, a 2×2 matrix moves every point of the plane: it can stretch, rotate, shear, or reflect. The inverse matrix is the transformation that moves every point back to where it started.
- Square only: A must have the same number of rows and columns.
- Non-zero determinant: det(A) ≠ 0, otherwise the transformation flattens space and cannot be reversed.
- Unique: if an inverse exists, there is exactly one.
- Determinants multiply: det(A⁻¹) = 1/det(A), so areas scaled by A are unscaled by A⁻¹.
Set the four entries of A. The grey square is mapped to the blue shape by A, and A⁻¹ maps the blue shape back.
How to Calculate the Inverse of a 2×2 Matrix?
For A = [[a, b], [c, d]], the inverse is A⁻¹ = (1/(ad − bc))·[[d, −b], [−c, a]].
- Find the determinant ad − bc. If it is 0, stop: there is no inverse.
- Swap the two entries on the main diagonal, a and d.
- Negate the two off-diagonal entries, b and c.
- Divide every entry by the determinant.
Example: for [[4, 7], [2, 6]], det = 24 − 14 = 10, so A⁻¹ = (1/10)·[[6, −7], [−2, 4]] = [[0.6, −0.7], [−0.2, 0.4]].
Type any 2×2 matrix. The three moves of the formula are applied live, with exact fractions.
How to Use This Inverse Matrix Calculator?
Pick a size, fill in the entries of A, and press "Calculate A⁻¹."
2×2 up to 6×6. Existing entries are kept when you change the size, and new cells start at 0.
Use whole numbers, decimals like 0.25, or fractions like −3/4. Every value is converted to an exact fraction before elimination.
Switch between fractions and decimals, step through the row operations, and confirm the A·A⁻¹ = I check.
If the determinant is 0 the calculator stops at the column where no pivot can be found and explains why the matrix is singular.
Adjugate Method for a 3×3 Inverse
A⁻¹ = (1/det A)·adj(A), where adj(A) is the transpose of the cofactor matrix. This is the 3×3 version of the swap-and-negate rule.
- Minors: for each entry, delete its row and column and take the determinant of the 2×2 that is left.
- Cofactors: apply the checkerboard of signs + − + / − + − / + − + to the minors.
- Adjugate: transpose the cofactor matrix (rows become columns).
- Divide: multiply the adjugate by 1/det A.
The adjugate method needs 9 small determinants for a 3×3 but grows quickly for larger matrices, which is why calculators and computers use Gauss-Jordan elimination for 4×4 and up.
The row and column that get crossed out are dimmed. The leftover 2×2 gives the minor.
When Is a Matrix Not Invertible?
A matrix is not invertible (singular) exactly when its determinant is 0. All of these statements are equivalent for a square matrix:
- det(A) = 0.
- Some row is a combination of the other rows (the rows are linearly dependent).
- Ax = 0 has a solution other than x = 0.
- Gauss-Jordan elimination produces a row of zeros on the left side.
- A flattens the plane onto a line (or space onto a plane), so information is lost.
Nearly singular matrices are also a problem in practice: when det(A) is tiny, small rounding errors in the entries cause huge errors in A⁻¹.
Slide t toward 1. Row 2 moves toward 2 × row 1, the determinant shrinks to zero, and the square collapses to a line.
Properties of the Inverse Matrix
Inverses follow a small set of rules that make algebra with matrices possible. For invertible n×n matrices A and B and a non-zero number k:
- (A⁻¹)⁻¹ = A: undoing the undo gives the original.
- (AB)⁻¹ = B⁻¹A⁻¹: the order reverses.
- (Aᵀ)⁻¹ = (A⁻¹)ᵀ: transpose and inverse can be swapped.
- (kA)⁻¹ = (1/k)·A⁻¹: scalars come out as reciprocals.
- det(A⁻¹) = 1/det(A).
Note that (A + B)⁻¹ is generally not A⁻¹ + B⁻¹. There is no simple sum rule.
Pick a rule and roll new random matrices. Both sides are computed exactly and compared.
Common Matrices and Their Inverses
Click any row to load the matrix into the calculator.
| Matrix A | A⁻¹ | det A | Type |
|---|---|---|---|
| [[4, 7], [2, 6]] | [[3/5, −7/10], [−1/5, 2/5]] | 10 | textbook 2×2 |
| [[2, 1], [5, 3]] | [[3, −1], [−5, 2]] | 1 | integer inverse |
| [[0, 1], [1, 0]] | [[0, 1], [1, 0]] | −1 | reflection, self-inverse |
| [[0, −1], [1, 0]] | [[0, 1], [−1, 0]] | 1 | 90° rotation |
| [[1, 2], [0, 1]] | [[1, −2], [0, 1]] | 1 | shear |
| diag(2, 4, 5) | diag(1/2, 1/4, 1/5) | 40 | diagonal |
| [[1, 2, 3], [0, 1, 4], [5, 6, 0]] | [[−24, 18, 5], [20, −15, −4], [−5, 4, 1]] | 1 | classic 3×3 |
| [[2, −1, 0], [−1, 2, −1], [0, −1, 2]] | (1/4)·[[3, 2, 1], [2, 4, 2], [1, 2, 3]] | 4 | tridiagonal |
| [[1, 1, 1], [0, 1, 1], [0, 0, 1]] | [[1, −1, 0], [0, 1, −1], [0, 0, 1]] | 1 | upper triangular |
| Hilbert 3×3 | [[9, −36, 30], [−36, 192, −180], [30, −180, 180]] | 1/2160 | ill-conditioned |
| [[1, 2], [2, 4]] | none | 0 | singular |
Solving Linear Systems with the Inverse Matrix
If Ax = b and A is invertible, the unique solution is x = A⁻¹b. Multiply both sides on the left by A⁻¹ and use A⁻¹A = I.
Each equation of a 2×2 system is a line in the plane, and the solution is the point where the two lines cross. If det A = 0 the lines are parallel (no solution) or identical (infinitely many solutions), which is exactly when A⁻¹ does not exist.
Computing A⁻¹ once is useful when you must solve Ax = b for many different right-hand sides b, as in circuit analysis, input-output economic models, and 3D graphics, where the same camera matrix is inverted once and applied to millions of points.
The system is 2x + y = b₁ and x + 3y = b₂. Move b₁ and b₂ and watch x = A⁻¹b follow the crossing point.
Other Inverse Calculators
Related tools that solve problems in reverse.
Turns F(s) back into f(t) with partial fractions, a pole-zero map, and a live time-response graph.
(3s+5)/(s²+3s+2) → 2e⁻ᵗ + e⁻²ᵗ Open calculator Finds a⁻¹ mod m with the extended Euclidean algorithm, a modular clock, and a congruence solver.
17⁻¹ mod 43 = 38 Open calculator Returns the x value or z-score for any area under a normal curve, with left, right, and central tails.
invNorm(0.975) = 1.9600 Open calculator Solves I₁d₁² = I₂d₂² for light, sound, gravity, and radiation, plus the reciprocal 1/x².
2× distance → 1/4 intensity Open calculator Finds f⁻¹(x) by swapping x and y and solving, with the y = x mirror graph and a domain check.
f(x) = 2x + 3 → (x − 3)/2 Open calculator Takes the antilog in base 10, e, 2, or any base, with characteristic, mantissa, and a log ruler.
antilog(2.5) = 316.23 Open calculator Solves y = k/x, k/x², and k/xⁿ problems, finds k, and shows the constant-product curve.
x × y = k = 24 Open calculator Finds the count k for a target probability, or the rate λ, with PMF bars and a CDF staircase.
qpois(0.95, 10) = 15 Open calculator Frequently Asked Questions
Answers to common questions about matrix inverses, determinants and singular matrices
The inverse is [[0.6, −0.7], [−0.2, 0.4]]. The determinant is 4·6 − 7·2 = 10. Swap the diagonal entries to get 6 and 4, negate the off-diagonal entries to get −7 and −2, then divide every entry by 10.
A square matrix has no inverse when its determinant is 0. This happens when one row (or column) is a combination of the others, for example [[1, 2], [2, 4]], whose second row is twice the first. Such a matrix is called singular, and it squashes space into a lower dimension that cannot be undone.
No. Only square matrices can have a two-sided inverse. A 2×3 matrix can have a right inverse or a left inverse, and the Moore-Penrose pseudoinverse generalises the idea, but A·A⁻¹ = A⁻¹·A = I is only possible for n×n matrices.
Multiply the matrix by your answer. If A·A⁻¹ equals the identity matrix I, the inverse is correct. The calculator does this check for you with exact fractions, so a correct result shows exactly 1s on the diagonal and 0s everywhere else.
The identity matrix is its own inverse, because I·I = I. Other self-inverse matrices include reflections such as [[0, 1], [1, 0]] and [[1, 0], [0, −1]], since applying a reflection twice returns every point to where it started.
(AB)⁻¹ = B⁻¹A⁻¹, with the order reversed. To undo "first B, then A" you must undo A first and B second, just as you take off shoes before socks. The rule extends to any number of factors: (ABC)⁻¹ = C⁻¹B⁻¹A⁻¹.
A system Ax = b has the solution x = A⁻¹b when A is invertible. For 2x + y = 5 and x + 3y = 10, A⁻¹ = (1/5)[[3, −1], [−1, 2]], so x = (1/5)(15 − 10) = 1 and y = (1/5)(−5 + 20) = 3.