Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

How to Solve a System with the Inverse Matrix

If the coefficient matrix AA is invertible, multiply both sides of Ax=bA\mathbf{x} = \mathbf{b} on the left by A−1A^{-1} to get x=A−1b\mathbf{x} = A^{-1}\mathbf{b}. Once A−1A^{-1} is known, every new right-hand side costs one matrix-vector product.

Recognize the task

A square system where the question asks for, or gives, the inverse; or several systems with the same coefficients and different constants: 2x+y=52x + y = 5, 5x+3y=135x + 3y = 13, then 2x+y=12x + y = 1, 5x+3y=05x + 3y = 0. Test: is AA square with det⁡(A)≠0\det(A) \neq 0? For a single large system, elimination is less work.
The inverse is defined in the inverse matrix lesson; the method is the solve-via-inverse formula.

Two ways to do it

2 × 2 inverse formula2 × 2
(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}
Swap the diagonal, negate the off-diagonal, divide by the determinant; see inverse of a 2×2 matrix.
Row-reduce the block matrix3 × 3 and larger
[A∣I]∼[I∣A−1][A \mid I] \sim [I \mid A^{-1}]
Gauss-Jordan on AA with II alongside (inverse by row reduction); see inverse by Gauss-Jordan.

Steps

StepOn 2x+y=5, 5x+3y=132x + y = 5,\ 5x + 3y = 13
1Write the system as Ax = b. Coefficients in AA, unknowns in x\mathbf{x}, constants in b\mathbf{b}.A=(2153), b=(513)A = \begin{pmatrix} 2 & 1 \\ 5 & 3 \end{pmatrix},\ \mathbf{b} = \begin{pmatrix} 5 \\ 13 \end{pmatrix}
2Check that det(A) is not zero. If it is zero there is no inverse; use elimination.det⁡(A)=6−5=1\det(A) = 6 - 5 = 1
3Find the inverse. The 2×22 \times 2 formula, or row reduction of [A∣I][A \mid I] for larger matrices.A−1=(3−1−52)A^{-1} = \begin{pmatrix} 3 & -1 \\ -5 & 2 \end{pmatrix}
4Multiply the inverse by b, in that order. A−1A^{-1} on the left, b\mathbf{b} on the right.x=(15−13−25+26)=(21)\mathbf{x} = \begin{pmatrix} 15 - 13 \\ -25 + 26 \end{pmatrix} = \begin{pmatrix} 2 \\ 1 \end{pmatrix}
5Check in the original equations.4+1=54 + 1 = 5 ✓, 10+3=1310 + 3 = 13 ✓

Worked examples

Example 1 · a negative determinant

2 × 2
x+2y=4, 3x+5y=7x + 2y = 4,\ 3x + 5y = 7: det⁡(A)=5−6=−1\det(A) = 5 - 6 = -1
A−1=1−1(5−2−31)=(−523−1)A^{-1} = \frac{1}{-1}\begin{pmatrix} 5 & -2 \\ -3 & 1 \end{pmatrix} = \begin{pmatrix} -5 & 2 \\ 3 & -1 \end{pmatrix}
swap, negate, divide
x=(−20+14, 12−7)=(−6,5)\mathbf{x} = (-20 + 14,\ 12 - 7) = (-6, 5)

Example 2 · a new right-hand side

reuse the inverse
2x+y=1, 5x+3y=02x + y = 1,\ 5x + 3y = 0
same AA as above
x=(3−1−52)(10)\mathbf{x} = \begin{pmatrix} 3 & -1 \\ -5 & 2 \end{pmatrix}\begin{pmatrix} 1 \\ 0 \end{pmatrix}
no new inverse needed
x=3, y=−5x = 3,\ y = -5

Example 3 · a 3 × 3 system

via [A | I]
x+z=3, y+z=5, x+y=4x + z = 3,\ y + z = 5,\ x + y = 4: det⁡(A)=−2\det(A) = -2
A−1=12(1−11−11111−1)A^{-1} = \frac{1}{2}\begin{pmatrix} 1 & -1 & 1 \\ -1 & 1 & 1 \\ 1 & 1 & -1 \end{pmatrix}
row-reduce the block matrix
x=12(3−5+4, −3+5+4, 3+5−4)\mathbf{x} = \frac{1}{2}(3 - 5 + 4,\ -3 + 5 + 4,\ 3 + 5 - 4)
row times b\mathbf{b}
x=1, y=3, z=2x = 1,\ y = 3,\ z = 2
Compute inverses step by step in the matrix inverse visualizer.

See it happen

The matrix AA moves the unknown vector x\mathbf{x} to b\mathbf{b}. Its inverse moves every point back to where it came from, so applying A−1A^{-1} to b\mathbf{b} returns the one x\mathbf{x} that AA sent there. When det⁡(A)=0\det(A) = 0, AA flattens the plane onto a line, different points land on the same spot, and there is no way back.

Common mistakes

Multiplying in the wrong order

✗ x=bA−1\mathbf{x} = \mathbf{b}A^{-1}
✓ x=A−1b\mathbf{x} = A^{-1}\mathbf{b}; a column vector times a 2×22 \times 2 matrix is not even defined

Forgetting to divide by the determinant

✗ A−1=(5−2−31)A^{-1} = \begin{pmatrix} 5 & -2 \\ -3 & 1 \end{pmatrix} for (1235)\begin{pmatrix} 1 & 2 \\ 3 & 5 \end{pmatrix}, giving (6,−5)(6, -5)
✓ divide by det⁡=−1\det = -1: the answer is (−6,5)(-6, 5)

No inverse read as no solution

✗ x+2y=3, 2x+4y=6x + 2y = 3,\ 2x + 4y = 6: "AA is not invertible, so no solution"
✓ the method fails, not the system; elimination gives infinitely many