Skip to content
  • Open the math solver
  • Ask the AI tutor
  • Find an AP course
  • Create a quiz
  • Open the calculator
  • Graphing Calculator
  • Browse all calculators
  • Read math guides
↑ ↓Enter to open · Esc to close
Solve a problem

Inverse Matrix Calculator

Enter a square matrix to find its inverse with exact fractions, using the 2×2 shortcut or Gauss-Jordan elimination on [A | I], and see the check that A times its inverse is the identity.

One row per line (or separate rows with ;). Separate entries with spaces or commas. Fractions like 1/2 and decimals are fine.

Examples

About the Inverse Matrix Calculator

The inverse of a matrix plays the role that division plays for numbers. If Ax=bA\mathbf{x} = \mathbf{b}, then x=A−1b\mathbf{x} = A^{-1}\mathbf{b}, so an inverse solves every system with the same coefficient matrix at once. Inverses also undo transformations in graphics, decode messages in Hill ciphers and appear throughout statistics in formulas such as least-squares regression.

This calculator first checks that the determinant is nonzero, because only then does an inverse exist. For a 2×22 \times 2 matrix it applies the quick swap-and-negate rule. For larger matrices it performs Gauss-Jordan elimination on the augmented matrix [A∣I][A \mid I], listing each row operation. Every entry is an exact fraction, and the final step multiplies AA by the result to confirm the identity matrix appears.

What is the inverse of a matrix?

The inverse of a square matrix AA is the matrix A−1A^{-1} for which AA−1=A−1A=IAA^{-1} = A^{-1}A = I, where II is the identity matrix. When it exists it is unique, and the matrix is called invertible or non-singular.

A square matrix is invertible exactly when its determinant is nonzero. Equivalent conditions are that its rows are linearly independent, its rank equals its size and the equation Ax=0A\mathbf{x} = \mathbf{0} has only the zero solution. Non-square matrices never have a two-sided inverse.

How to use the Inverse Matrix Calculator

  1. Enter a square matrix with spaces between entries and semicolons between rows, for example 4 7; 2 6.
  2. Press Find inverse.
  3. Check the determinant step; if it is zero, the matrix has no inverse.
  4. Follow the row operations or the 2×2 rule to the inverse.
  5. Confirm the final check that A·A⁻¹ equals the identity.

Formulas

2×2 inverse

(abcd)−1=1ad−bc(d−b−ca)\begin{pmatrix} a & b \\ c & d \end{pmatrix}^{-1} = \frac{1}{ad - bc}\begin{pmatrix} d & -b \\ -c & a \end{pmatrix}

Gauss-Jordan

[A∣I]  ⟶  [I∣A−1][A \mid I] \;\longrightarrow\; [I \mid A^{-1}]

Inverse of a product

(AB)−1=B−1A−1(AB)^{-1} = B^{-1}A^{-1}

Solving a system

Ax=b  ⇒  x=A−1bA\mathbf{x} = \mathbf{b} \;\Rightarrow\; \mathbf{x} = A^{-1}\mathbf{b}

Worked example: 2×2 matrix

The example inverts A=(4726)A = \begin{pmatrix}4 & 7\\2 & 6\end{pmatrix}. Its determinant is 4⋅6−7⋅2=104 \cdot 6 - 7 \cdot 2 = 10, which is nonzero, so the inverse exists.

Swapping the diagonal entries, negating the off-diagonal ones and dividing by 10 gives (35−710−1525)\begin{pmatrix}\frac35 & -\frac{7}{10}\\-\frac15 & \frac25\end{pmatrix}. Multiplying this by AA returns the identity matrix, which the final step confirms.

The solution below is generated by the same engine that powers the calculator above.

Final answer

A−1=[35−710−1525]A^{-1} = \begin{bmatrix}\frac{3}{5} & -\frac{7}{10} \\ -\frac{1}{5} & \frac{2}{5}\end{bmatrix}

How we read your problem

Find the inverse of a 2×2 matrix.

[4726]−1\begin{bmatrix}4 & 7 \\ 2 & 6\end{bmatrix}^{-1}

Step-by-step solution

  1. Check that the determinant is non-zero

    det⁡A=10≠0\det A = 10 \neq 0
  2. Swap a and d, negate b and c, divide by the determinant

    A−1=110[6−7−24]=[35−710−1525]A^{-1} = \frac{1}{10}\begin{bmatrix}6 & -7 \\ -2 & 4\end{bmatrix} = \begin{bmatrix}\frac{3}{5} & -\frac{7}{10} \\ -\frac{1}{5} & \frac{2}{5}\end{bmatrix}
  3. Check: A·A⁻¹ = I

    AA−1=[1001]A A^{-1} = \begin{bmatrix}1 & 0 \\ 0 & 1\end{bmatrix}

Formulas used

  • 2×2 inverse

    [abcd]−1=1ad−bc[d−b−ca]\begin{bmatrix} a & b \\ c & d \end{bmatrix}^{-1} = \frac{1}{ad-bc}\begin{bmatrix} d & -b \\ -c & a \end{bmatrix}
  • Gauss–Jordan

    [A∣I]∼[I∣A−1][A \mid I] \sim [I \mid A^{-1}]

The determinant is 10, so A is invertible. Every entry of the inverse is exact.

Verification

  • Multiplying A by the result gives the identity matrix exactly.

Detailed explanation

Gauss-Jordan elimination

For a 3×33 \times 3 or larger matrix, write AA and the identity side by side and apply row operations to the whole augmented matrix. Scale each pivot row so the pivot becomes 1, then clear every other entry in that column. When the left half has become the identity, the right half is A−1A^{-1}, because the same sequence of operations that turns AA into II turns II into A−1A^{-1}.

For the matrix with rows (2,0,1)(2, 0, 1), (1,1,0)(1, 1, 0) and (0,1,3)(0, 1, 3), the calculator divides the first row by 2, clears the first column, clears the second column, divides the third row by 72\frac72 and clears the third column. Every entry of the inverse turns out to be a multiple of 17\frac17, because the determinant is 7.

Singular matrices

If the determinant is zero, elimination produces a row of zeros on the left and the identity can never be reached. The calculator detects this at the start. The matrix (1224)\begin{pmatrix}1 & 2\\2 & 4\end{pmatrix} is singular because its second row is twice the first, so the calculator reports that it has no inverse rather than printing a meaningless answer.

A determinant that is merely small is not a problem for exact arithmetic, but it is a warning sign in real-world data: the inverse will have large entries, and small measurement errors in AA will be greatly magnified.

Using the inverse

To solve Ax=bA\mathbf{x} = \mathbf{b}, multiply A−1A^{-1} by b\mathbf{b}. This is efficient when several systems share the same matrix. For a single system, row reducing the augmented matrix [A∣b][A \mid \mathbf{b}] directly is usually less work than computing the full inverse first.

The 2×22 \times 2 shortcut is not a separate trick: it is what Gauss-Jordan elimination produces when carried out symbolically on a general 2×22 \times 2 matrix. Seeing the determinant ad−bcad - bc appear in the denominator of every entry explains why a zero determinant makes the inverse impossible.

Common mistakes

  • Forgetting to divide by the determinant in the 2×2 formula.
  • Swapping the off-diagonal entries instead of negating them.
  • Applying a row operation to only the left half of the augmented matrix.
  • Writing (AB)−1=A−1B−1(AB)^{-1} = A^{-1}B^{-1}; the order reverses.
  • Trying to invert a matrix whose determinant is zero.

Tips

  • Compute the determinant first; if it is zero, stop.
  • Keep entries as fractions to avoid rounding errors that break the identity check.
  • Verify by multiplying AA by your answer; every diagonal entry should be 1 and the rest 0.
  • Look for the determinant in the denominators of the inverse's entries.
  • Use the matrix calculator to multiply the inverse by a vector of constants.

Frequently asked questions

How do you find the inverse of a 2×2 matrix?

Swap the two diagonal entries, change the signs of the other two and divide every entry by the determinant ad − bc.

How do you find the inverse of a 3×3 matrix?

Write the augmented matrix [A | I] and use row operations to turn the left half into the identity. The right half is then the inverse.

When does a matrix have no inverse?

When its determinant is zero. Such a matrix is called singular; its rows are linearly dependent and elimination cannot reach the identity.

How can I check an inverse?

Multiply the original matrix by the inverse. If the result is the identity matrix, the inverse is correct. The calculator does this automatically.

Does a non-square matrix have an inverse?

No. Only square matrices can have an inverse that works from both sides.

Can I enter decimals?

Yes. Decimals are converted to exact fractions, so 0.5 is treated as 1/2 and the inverse is computed exactly.

What is the inverse of the identity matrix?

The identity matrix itself, because multiplying it by itself leaves it unchanged.

Invert your matrix

Enter a square matrix above to get its exact inverse with the determinant check and every row operation.

More math calculators