Inverse matrix calculator

Type or scan a square matrix. MathBuddy finds A inverse with the determinant and every step.

Loading math input...

What this page covers

  • The inverse of a 2×2 matrix with the swap-and-negate formula.
  • The inverse of a 3×3 matrix with cofactors and the adjugate, or with row reduction.
  • Solving a square linear system Ax=bA\mathbf{x} = \mathbf{b} as x=A−1b\mathbf{x} = A^{-1}\mathbf{b}.
  • Not covered here: determinants on their own (use Determinant calculator) and row reduction of non-square matrices (use Gauss-Jordan elimination calculator).

How to enter the problem

  • Type it or paste it. Write the matrix row by row, for example [[4, 7], [2, 6]], followed by ^-1, or write inverse of and the matrix.
  • Scan it. Fit the one problem in the frame.
  • Choose a photo. Several problems in one photo are solved as a list.
  • Then tap Solve.

Worked examples

Example 1

Problem

Find the inverse of A=(201110011)\displaystyle A = \begin{pmatrix}2 & 0 & 1\\ 1 & 1 & 0\\ 0 & 1 & 1\end{pmatrix}.

Answer

Verified

The answer is

(1313−13−13231313−2323)\begin{pmatrix}\frac{1}{3} & \frac{1}{3} & -\frac{1}{3}\\ -\frac{1}{3} & \frac{2}{3} & \frac{1}{3}\\ \frac{1}{3} & -\frac{2}{3} & \frac{2}{3}\end{pmatrix}

Explanation

  1. Find the determinant
    Expand along the first row: det⁡A=2(1⋅1−0⋅1)−0+1(1⋅1−1⋅0)=3\det A = 2(1 \cdot 1 - 0 \cdot 1) - 0 + 1(1 \cdot 1 - 1 \cdot 0) = 3. It is not 0, so AA has an inverse.
  2. Find the cofactors
    Row 1: 1,−1,11, -1, 1. Row 2: 1,2,−21, 2, -2. Row 3: −1,1,2-1, 1, 2.
  3. Transpose to get the adjugate
    adj⁡A=(11−1−1211−22)\operatorname{adj} A = \begin{pmatrix}1 & 1 & -1\\ -1 & 2 & 1\\ 1 & -2 & 2\end{pmatrix}
  4. Divide by the determinant
    A−1=13adj⁡AA^{-1} = \frac{1}{3}\operatorname{adj} A

Example 2

Problem

Solve 3x+2y=7\displaystyle 3x + 2y = 7 and x+y=3\displaystyle x + y = 3 with an inverse matrix.

Answer

Verified

The answer is

(12)\begin{pmatrix}1\\ 2\end{pmatrix}

Explanation

  1. Write the system as a matrix equation
    A=(3211)A = \begin{pmatrix}3 & 2\\ 1 & 1\end{pmatrix}, b=(73)\mathbf{b} = \begin{pmatrix}7\\ 3\end{pmatrix}, and A(xy)=bA\begin{pmatrix}x\\ y\end{pmatrix} = \mathbf{b}.
  2. Find the inverse
    det⁡A=3⋅1−2⋅1=1\det A = 3 \cdot 1 - 2 \cdot 1 = 1. Swap the diagonal entries and negate the others
    A−1=(1−2−13)A^{-1} = \begin{pmatrix}1 & -2\\ -1 & 3\end{pmatrix}
  3. Multiply
    A−1b=(7−6−7+9)A^{-1}\mathbf{b} = \begin{pmatrix}7 - 6\\ -7 + 9\end{pmatrix}, so x=1x = 1 and y=2y = 2.

Common mistakes

  • Adding instead of subtracting in the 2×2 determinant. For the runnable example, 4⋅6+7⋅2=384 \cdot 6 + 7 \cdot 2 = 38 is wrong; the determinant is 24−14=1024 - 14 = 10.
  • Swapping the off-diagonal entries instead of the diagonal ones. In the 2×2 formula the diagonal entries swap and the other two change sign.
  • Forgetting to transpose the cofactor matrix before dividing by the determinant.
  • Looking for an inverse when the determinant is 0. Such a matrix is singular and has no inverse.

Checks, assumptions and limits

  • Check by multiplying. AA−1A A^{-1} must be the identity matrix. For the runnable example, the top-left entry is 4⋅35+7⋅(−15)=14 \cdot \frac{3}{5} + 7 \cdot (-\frac{1}{5}) = 1.
  • Only square matrices with a nonzero determinant have an inverse. Entries are kept as exact fractions.
  • MathBuddy can make mistakes. Double check important steps.

Frequently asked questions

If the determinant is 0 the matrix is singular. The steps show the determinant and say that no inverse exists, instead of dividing by zero.

Yes. The steps find the determinant, the cofactors, the adjugate and then the inverse. Ask a follow-up if you want the row reduction method instead.

Yes. Use the camera on the one problem, or choose a photo. Several problems in one photo are solved as a list.

1 math question to try today without signing in, 3 a day signed in, unlimited with Pro.

Ready to solve your next math problem?

Try one problem free in your browser. Create a free account for 3 math questions a day.

Last updated: · MathBuddy