Matrix Inverse Calculator
Find the inverse of a square matrix up to 10 × 10, with an exact determinant, a clear singular-or-invertible verdict and a warning sign for near-singular input.
Matrix Inverse Calculator
Background.
A matrix that doubles every x-coordinate and quadruples every y-coordinate is undone by one that halves x and quarters y: the inverse of [2 0; 0 4] is [0.5 0; 0 0.25]. That is the whole idea of an inverse. A⁻¹ reverses whatever A does, so that A⁻¹A and AA⁻¹ both give the identity matrix I. Diagonal matrices make it look like taking reciprocals, and almost nothing else does. The inverse of [1 2; 3 4] is [−2 1; 1.5 −0.5], and each of those four numbers depends on all four entries of the original.
An inverse exists only when the determinant is not zero. A zero determinant means the matrix flattens space, a plane onto a line or a solid onto a plane, and once two different points have landed in the same place no matrix can tell them apart again. [1 2; 2 4] is the simplest case: its second row is twice its first, its determinant is 1 × 4 − 2 × 2 = 0, and it has no inverse, for the same reason zero has no reciprocal.
The calculator inverts any square matrix up to 10 × 10. It works out the determinant exactly, so a singular verdict means the determinant is zero, not merely small, and it reports the largest entry of the inverse as an early warning. When that number is enormous, the matrix is close to singular and tiny changes in the input swing the answer.
If your real aim is to solve a system Ax = b, you probably want a different tool. The LAPACK Users' Guide, which documents the library behind the linear-algebra routines of MATLAB, NumPy and R, says: "It is seldom necessary to compute the inverse of a matrix explicitly, and it is certainly not recommended as a means of solving linear systems." Elimination solves the system with less work and less rounding. The inverse earns its place when you need the matrix itself: checking a hand calculation, reversing a change of coordinates, or following a derivation that calls for A⁻¹.
What is matrix inverse calculator?
The inverse of a square matrix A is the matrix A⁻¹ for which AA⁻¹ = A⁻¹A = I, where I has ones on the diagonal and zeros everywhere else. Only square matrices can have one, because for a rectangular m × n matrix the two products would be identity matrices of different sizes. A square matrix with an inverse is called invertible or non-singular; one without is singular, and the dividing line is exactly det(A) ≠ 0. When an inverse exists it is unique: if BA = I and AC = I, then B = B(AC) = (BA)C = C.
Several rules follow from the definition. Inverting twice returns the original, (A⁻¹)⁻¹ = A. The determinant of the inverse is the reciprocal of the determinant, det(A⁻¹) = 1/det(A). The inverse of a product reverses the order, (AB)⁻¹ = B⁻¹A⁻¹, since the last operation applied has to be the first one undone. Inverse and transpose can be taken in either order, (A⁻¹)ᵀ = (Aᵀ)⁻¹, so a symmetric matrix has a symmetric inverse. And when every entry of A is an integer and det(A) is 1 or −1, every entry of A⁻¹ is an integer too.
Geometrically, an invertible matrix is a linear map that is one-to-one and onto: each output comes from exactly one input, so the map can be run backwards. A singular matrix sends at least one non-zero direction to zero, and that lost direction cannot be brought back.
How to use this calculator.
- Type the matrix with one row per line, separating entries with spaces or commas; a semicolon also starts a new row, so 1,2;3,4 works on a single line. The matrix must be square and no larger than 10 × 10.
- Enter fractions as decimals: 1/2 is not read, so type 0.5. Entries are taken to ten decimal places, which means 1/3 becomes 0.3333333333, a very slightly different matrix from one with exact thirds.
- Read A⁻¹ with its rows separated by semicolons: [-2 1; 1.5 -0.5] has first row −2, 1 and second row 1.5, −0.5. Entries are given to ten decimal places.
- Check the invertibility line, which prints the determinant in full. The numeric det(A) figure is rounded, so a determinant below about 0.00000000005 can show there as 0 beside a perfectly valid inverse.
- Note the largest entry of A⁻¹, then confirm the result by multiplying A by A⁻¹ on the matrix multiplication calculator. You should get the identity matrix, apart from any tenth-decimal rounding in the entries.
The formula.
The inverse is built from the adjugate: A⁻¹ = adj(A) / det(A). Every entry of A has a cofactor, Cᵢⱼ = (−1)^(i+j) times the determinant of the smaller matrix left after deleting row i and column j. The adjugate is the transpose of the matrix of cofactors, and it satisfies A · adj(A) = det(A) · I. Dividing it by the determinant therefore gives exactly the matrix that multiplies A to make I, and the same identity shows why a zero determinant is fatal: there is nothing to divide by.
For a 2 × 2 the construction shrinks to a rule worth memorising. The inverse of [a b; c d] is 1/(ad − bc) × [d −b; −c a]: swap the diagonal entries, change the sign of the other two, and divide by the determinant. For [4 7; 2 6] the determinant is 24 − 14 = 10, so the inverse is 1/10 × [6 −7; −2 4] = [0.6 −0.7; −0.2 0.4].
The calculator takes the adjugate route rather than Gauss–Jordan elimination because of how it decides singularity. Elimination divides at every step, so judging whether a matrix is singular turns into judging whether a pivot is small enough to count as zero, and the verdict depends on where that cut-off sits. Here, entries are read to ten decimal places and multiplied by a power of ten until every one is a whole number. Determinants of that integer matrix are found by Bareiss's fraction-free elimination, in which every division comes out exact, so a zero determinant is exactly zero. The true determinant is the integer result divided by the power of ten raised to the size of the matrix. Only the final step, dividing each cofactor by the determinant, can produce a non-terminating decimal, which is why an entry such as 1/3 appears as 0.3333333333.
Two consequences matter in practice. Matrices that differ only beyond the tenth decimal place are treated as the same matrix, so [1 1; 1 1.00000000001] is reported as singular while [1 1; 1 1.0000000001] is invertible, with inverse entries of about ten billion. And the work grows steeply with size, because a separate determinant is needed for each of the n² cofactors; that is fine within the 10 × 10 limit, but it is not how large systems are handled in numerical software.
A worked example.
Take A = [1 2; 3 4]. The determinant comes first, because it decides whether there is an inverse at all: 1 × 4 − 2 × 3 = 4 − 6 = −2. That is not zero, so the invertibility line reads 'Invertible — det(A) = -2', and the size is 2. The cofactors are C₁₁ = 4, C₁₂ = −3, C₂₁ = −2 and C₂₂ = 1. Transposed, they form the adjugate [4 −2; −3 1]. Dividing each entry by −2 gives 4 ÷ (−2) = −2, (−2) ÷ (−2) = 1, (−3) ÷ (−2) = 1.5 and 1 ÷ (−2) = −0.5, so A⁻¹ = [-2 1; 1.5 -0.5], and the largest entry in absolute value is 2. Multiplying back confirms it. Row 1 of A against the two columns of A⁻¹ gives 1 × (−2) + 2 × 1.5 = 1 and 1 × 1 + 2 × (−0.5) = 0; row 2 gives 3 × (−2) + 4 × 1.5 = 0 and 3 × 1 + 4 × (−0.5) = 1. That is the identity matrix. The determinant of the inverse, (−2)(−0.5) − (1)(1.5) = 1 − 1.5 = −0.5, is 1 ÷ (−2), exactly as the reciprocal rule requires.
Frequently asked questions.
What is the inverse of the 3 × 3 matrix [1 2 3; 0 1 4; 5 6 0]?
Why does [1 2 3; 4 5 6; 7 8 9] have no inverse?
Why is solving Ax = b by multiplying by the inverse discouraged?
What does an enormous largest entry in the inverse warn me about?
Can I enter exact fractions such as 1/3?
Why is a matrix called singular when it differs from a singular one in the eleventh decimal place?
Why does det(A) read 0 when an inverse was found?
Does a rectangular matrix have any kind of inverse?
How can I check an inverse without a computer?
Which matrices have inverses that can be written down at sight?
References& sources.
- [1]Encyclopedia of Mathematics (EMS Press / Springer), article "Inverse matrix" — "The matrix A⁻¹ for which AA⁻¹=A⁻¹A=E, where E is the identity matrix", and "Invertibility of a matrix is equivalent to its being non-singular". Retrieved 2026-07-29; open access.
- [2]LAPACK Users' Guide, 3rd edition (Anderson et al., SIAM, 1999), §2.3 "Linear Equations" — "It is seldom necessary to compute the inverse of a matrix explicitly, and it is certainly not recommended as a means of solving linear systems." Retrieved 2026-07-29; open access.
- [3]NIST Digital Library of Mathematical Functions, §1.3 "Determinants, Linear Operators, and Spectral Expansions", §1.3(i) elementary properties of determinants — the determinant identities behind the invertibility test. Retrieved 2026-07-29; open access.
- [4]Encyclopedia of Mathematics (EMS Press / Springer), article "Matrix" — the matrix product AA⁻¹ = E that defines the inverse, and the cofactor-and-determinant construction used to compute it. Retrieved 2026-07-29; open access.
- [5]MIT OpenCourseWare 18.06 Linear Algebra, Spring 2010, Prof. Gilbert Strang — lectures on inverses, Gauss-Jordan elimination and singular matrices. CC BY-NC-SA 4.0; retrieved 2026-07-29; open access.
- [6]Bareiss, E.H. (1968). "Sylvester's Identity and Multistep Integer-Preserving Gaussian Elimination." Mathematics of Computation 22(103), 565–578 — the fraction-free algorithm this calculator uses to compute every determinant exactly. The DOI resolves to ams.org, which returned HTTP 403 to an unauthenticated request, so this is a bibliographic, gated citation rather than a page read in full.
How this page was produced
- Published by
- Quanta Calculator
- Overseen by
- Daniel, Quanta Calculator Researcher
- Primary sources
- 6 cited below
- Method
- A⁻¹ = adj(A) / det(A)
- Published
- Last verified
Built with AI assistance and verified by automated tests against the cited sources — every worked example on this page is computed by the same code that runs the calculator. How we build and check calculators.
In this category
Embed
Quanta Pro
Paid features are coming later.
- All 1560 calculators remain free
- No billing is enabled