gizmobench
BrowseDaily

Inverse Matrix Calculator

Invert a real square matrix up to 8×8 using exact Gauss-Jordan arithmetic. This page selects A⁻¹ after saved restoration; the opening [1 2; 3 4] gives [-2 1; 3/2 -1/2] unless a saved matrix restores. Paste a complete grid or edit its cells. A zero determinant is reported as singular, and a successful result is multiplied back by A to check the exact identity. Fraction and Decimal change the display of the same answer; no intermediate row-operation trace is shown.

A2 × 2
RowsColumns
-21
3/2-1/2
Display

The matrix that multiplies A back to the identity, in exact fractions.

Paste a whole matrix

Use one row per line or semicolon. Separate entries with spaces, tabs or commas; write fractions as 1/3. Brackets around each row are optional. Applying a matrix replaces that grid and its dimensions.

  • Determinantnot zero, so A can be inverted
    -2
  • Rank of Aall 2 rows independent; the most a 2×2 matrix can have
    2
  • A⁻¹exact fractions
    [ -2 1 ] [ 3/2 -1/2 ]

Checked: A⁻¹ × A comes back as the exact identity matrix, with no rounding to look past.

Every calculation uses exact rational numbers. Integers, decimals and fractions are read exactly. A singular square matrix has determinant 0 and no ordinary inverse. Fraction display keeps the exact value; Decimal rounds only the displayed result. Floating-point methods need care with rounding residuals near zero. This calculator accepts real numeric entries, not complex numbers or symbolic variables. It shows the finished answer rather than an intermediate row-operation trace.

Common questions

How do I invert a 2×2 matrix here?
Type the four numbers into grid A and read the answer off the right of the equals sign. The page starts on [1 2; 3 4], whose inverse is [-2 1; 3/2 -1/2]: that is the textbook rule of swapping the diagonal, negating the other two and dividing by the determinant ad − bc, which is −2 here. Put [4 7; 2 6] in instead and the determinant is 10 and the inverse is [3/5 -7/10; -1/5 2/5]. A cell takes a whole number, a decimal like 0.5, a fraction like 1/3, exponent notation like 1.5e-2, or the long minus sign that comes with anything pasted out of a PDF, and a cell left blank counts as zero.
What happens when the matrix has no inverse?
A singular square matrix is refused: the determinant is exactly 0, so there is no ordinary inverse. The message asks you to change an entry so the rows become independent. [1 2 3; 4 5 6; 7 8 9] is a rank-2 example. Select det A to see its exact zero, or rank A to see its independent-row count. This is not a pseudoinverse or modular inverse calculator.
Can it invert a 3×3 or a larger matrix?
Yes, from 1×1 to 8×8. Gauss-Jordan reduction augments A with the identity; the right half becomes the inverse when the left half reduces to identity. [2 -1 0; -1 2 -1; 0 -1 2] gives [3/4 1/2 1/4; 1/2 1 1/2; 1/4 1/2 3/4]. Entries remain exact fractions. Large fractions can take longer to process, and this page shows the finished inverse rather than every row operation.
Why does the answer come back as fractions instead of decimals?
Because inverting divides by the determinant, and that answer usually is a fraction: the 3/2 in the inverse of [1 2; 3 4] is exactly three halves, and a third is a third rather than 0.3333333333. Holding every entry as a pair of whole numbers also means no error accumulates across the elimination, so an entry that should cancel to zero is zero. When a decimal is what you want, the Display switch under the stage turns the same exact values into decimals for reading at 0 to 10 places on the stepper, so 3/2 reads as 1.5 and 1/3 reads as 0.333 at three places while the value behind it is untouched.
How do I check the inverse is right?
The page checks it for you: it multiplies the answer back by A, and when A⁻¹ × A is the exact identity matrix it says so under the result. That check means something here because the arithmetic is exact, so the identity is a clean 1 on the diagonal and 0 everywhere else rather than 0.9999999999 and a scatter of tiny numbers. Beside the result, the Determinant cell reads not zero, so A can be inverted, and the Rank of A cell counts the rows that are not combinations of the others. The inverse copies out as plain text with aligned columns or as a LaTeX pmatrix, with each fraction written as \frac, for pasting into a write-up.
Can I invert a rectangular matrix?
This operation computes the ordinary two-sided inverse, which requires a square matrix with nonzero determinant. A 2×3 matrix is refused with its shape and a request for equal row and column counts. Some rectangular matrices have one-sided inverses or pseudoinverses, but those are different operations and are not computed here.
Does opening this page change the calculator I use for other operations?
The page selects its stated operation after saved restoration. Simply visiting it does not overwrite the saved draft. Only fields you deliberately edit update their stored values; changing a display preference does not save a preset matrix. Everything is computed in your browser.
How do I calculate an inverse transpose?
Invert A, copy the exact Fraction result as text, apply that text back to grid A through Paste a whole matrix and select A transposed. For [1 2; 3 4], this gives [-2 3/2; 1 -1/2]. It is a deliberate two-step workflow; there is no combined inverse-transpose button.

Exact: matrices are computed in rational arithmetic, so an inverse of an integer matrix is shown as fractions rather than rounded decimals, and a singular matrix is reported as singular instead of producing huge numbers.