HexMathv1.0.4

Inverse matrix calculator

This inverse matrix calculator finds the inverse of a 2×2 or 3×3 matrix. Type the matrix or scan it. HexMath computes the determinant first, tells you when no inverse exists, and otherwise returns the inverse matrix with every step shown: the swap-and-negate formula for 2×2, and cofactors with the adjugate or row reduction for 3×3.

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 and row reduction of non-square matrices (see the matrix 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: Find the inverse of [4, 7; 2, 6].

Problem

Find the inverse of (4726)\displaystyle \begin{pmatrix}4 & 7\\ 2 & 6\end{pmatrix}.

Answer

Verified

The answer is

(35−710−1525)\begin{pmatrix}\frac{3}{5} & -\frac{7}{10}\\ -\frac{1}{5} & \frac{2}{5}\end{pmatrix}

Explanation

  1. Find the determinant
    det⁡=4⋅6−7⋅2=24−14=10\det = 4 \cdot 6 - 7 \cdot 2 = 24 - 14 = 10. It is not 00, so the inverse exists.
  2. Swap and negate
    For a 2×22 \times 2 matrix, swap the diagonal entries and change the sign of the other two: (6−7−24)\begin{pmatrix}6 & -7\\ -2 & 4\end{pmatrix}.
  3. Divide by the determinant
    A−1=110(6−7−24)=(35−710−1525)A^{-1} = \frac{1}{10}\begin{pmatrix}6 & -7\\ -2 & 4\end{pmatrix} = \begin{pmatrix}\frac{3}{5} & -\frac{7}{10}\\ -\frac{1}{5} & \frac{2}{5}\end{pmatrix}
  4. Check one entry of AA−1AA^{-1}
    Row 1 of AA times column 1 of A−1A^{-1}: 4⋅35+7⋅(−15)=12−75=14 \cdot \frac{3}{5} + 7 \cdot \left(-\frac{1}{5}\right) = \frac{12 - 7}{5} = 1, as the identity requires.

Example 2: Solve 3x + 2y = 7 and x + y = 3 with an inverse matrix.

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 example in the solver above, 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 example in the solver above, 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.
  • HexMath 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.

Multiply the matrix by its inverse. The product must be the identity matrix. You can run that product on the matrix multiplication calculator.

Ready to solve your next math problem?

Create a free account for 3 math questions a day in your browser. No card.

Get HexMath on your phone

The same solver and camera scan on iPhone and Android.

Last updated: · HexMath