Matrices

Inverse of a 2×2 Matrix

The inverse of A=[abcd]A=\begin{bmatrix}a&b\\c&d\end{bmatrix} is A−1=1ad−bc[d−b−ca]A^{-1}=\frac{1}{ad-bc}\begin{bmatrix}d&-b\\-c&a\end{bmatrix}, and it exists only when ad−bc≠0ad-bc\neq0. In words: swap the main diagonal, negate the other two entries, and divide everything by the determinant.

A−1=1ad−bc[d−b−ca]A^{-1}=\frac{1}{ad-bc}\begin{bmatrix}d&-b\\-c&a\end{bmatrix}

Try it with your numbers

Show every step

That recipe fits on one line, but the details are where points get lost: which entries move, which only change sign, and what to do when the numbers are negative or fractions. The sections below cover the method, the reason it works, the zero-determinant failure, and a few checks that catch mistakes in seconds.

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

Work in this order, because the determinant decides whether the rest is worth doing:

  1. Compute the determinant of the 2×2 matrix: ad−bcad-bc. If it is 00, stop. No inverse exists.
  2. Swap the two diagonal entries aa and dd.
  3. Change the signs of bb and cc, leaving them in their positions.
  4. Multiply every entry by 1ad−bc\frac{1}{ad-bc}.

Example 1. Find the inverse of A=[4726]A=\begin{bmatrix}4&7\\2&6\end{bmatrix}.

The determinant is 4⋅6−7⋅2=24−14=104\cdot6-7\cdot2=24-14=10. Swapping 44 and 66 and negating 77 and 22 gives [6−7−24]\begin{bmatrix}6&-7\\-2&4\end{bmatrix}. Then divide by 1010:

A−1=110[6−7−24]=[35−710−1525]A^{-1}=\frac{1}{10}\begin{bmatrix}6&-7\\-2&4\end{bmatrix}=\begin{bmatrix}\frac35&-\frac{7}{10}\\-\frac15&\frac25\end{bmatrix}

Leaving the factor 110\frac{1}{10} out front is a perfectly good final answer, and it is easier to check than a grid of fractions. The classic slip is forgetting the factor entirely. The swapped matrix on its own is not the inverse, and the next section shows exactly how far off it is.

Why does the inverse formula work?

Matrix 4 7 2 6 times its swapped negated matrix equals 10 times the identity matrix
The swapped matrix multiplies A to give 10·I, so dividing by the determinant 10 leaves exactly I.

An inverse must satisfy AA−1=IAA^{-1}=I, where II is the identity matrix. Multiply AA by the swapped-and-negated matrix and watch what happens, using the usual rule from matrix multiplication:

[abcd][d−b−ca]=[ad−bc−ab+abcd−dc−cb+da]=[ad−bc00ad−bc]\begin{bmatrix}a&b\\c&d\end{bmatrix}\begin{bmatrix}d&-b\\-c&a\end{bmatrix}=\begin{bmatrix}ad-bc&-ab+ab\\cd-dc&-cb+da\end{bmatrix}=\begin{bmatrix}ad-bc&0\\0&ad-bc\end{bmatrix}

The off-diagonal terms cancel in pairs, and the diagonal terms both equal the determinant. So the product is (ad−bc) I(ad-bc)\,I, not II. Dividing by ad−bcad-bc is the only correction needed, and that is the entire origin of the factor out front.

The adjugate

The swap-and-negate matrix has a name: the adjugate. For any square matrix, A adj⁡(A)=det⁡(A) IA\,\operatorname{adj}(A)=\det(A)\,I, which is why the inverse is always the adjugate divided by the determinant.

This also explains the failure case. If ad−bc=0ad-bc=0, the product above is the zero matrix, and no amount of dividing can turn zero into II.

Quick check

Multiply [2134][4−1−32]\begin{bmatrix}2&1\\3&4\end{bmatrix}\begin{bmatrix}4&-1\\-3&2\end{bmatrix}. What does the result tell you about the inverse?

What does a zero determinant mean for the inverse?

A matrix with det⁡=0\det=0 is called singular, and it has no inverse. Take [2436]\begin{bmatrix}2&4\\3&6\end{bmatrix}: the determinant is 12−12=012-12=0, and the formula would ask you to divide by zero. The second row is exactly 1.51.5 times the first, so the rows carry only one independent piece of information.

Geometrically, a singular matrix flattens the whole plane onto a single line. Many different points land on the same spot, so there is no way to run the process backwards and recover where each one started. In a system of equations, the same thing appears as two lines that are parallel (no solution) or identical (infinitely many). The rows being proportional means the lines share a slope, which is exactly what ad=bcad=bc expresses.

The determinant plays the role the discriminant plays in the quadratic formula: one number, computed first, that tells you whether the main calculation will behave. If you have practiced with quadratic formula problems, the habit transfers directly. Check the gatekeeper number before you build the answer.

One more point: a negative determinant is fine. Only exactly 00 blocks the inverse.

Inverse of a 2×2 matrix with negatives and fractions

Negatives cause most of the errors, and nearly all of them come from two places: computing ad−bcad-bc and negating an entry that is already negative.

Example 2. Find the inverse of A=[−325−4]A=\begin{bmatrix}-3&2\\5&-4\end{bmatrix}.

Here a=−3a=-3, b=2b=2, c=5c=5, d=−4d=-4. The determinant is (−3)(−4)−(2)(5)=12−10=2(-3)(-4)-(2)(5)=12-10=2. A common slip is writing −12−10-12-10, so remember that a product of two negatives is positive before you subtract (the order of operations applies to every term). Swapping the diagonal puts −4-4 in the top left and −3-3 in the bottom right. Negating 22 and 55 gives −2-2 and −5-5:

A−1=12[−4−2−5−3]=[−2−1−52−32]A^{-1}=\frac12\begin{bmatrix}-4&-2\\-5&-3\end{bmatrix}=\begin{bmatrix}-2&-1\\-\frac52&-\frac32\end{bmatrix}

When an off-diagonal entry is already negative, negating it makes it positive. The rule is “change the sign”, not “put a minus in front”.

Example 3, fractional entries. Find the inverse of A=[1214134]A=\begin{bmatrix}\frac12&\frac14\\1&\frac34\end{bmatrix}.

Factor out the fractions first: A=14BA=\frac14B with B=[2143]B=\begin{bmatrix}2&1\\4&3\end{bmatrix}. For BB, the determinant is 6−4=26-4=2, so B−1=12[3−1−42]B^{-1}=\frac12\begin{bmatrix}3&-1\\-4&2\end{bmatrix}. Since (14B)−1=4B−1\left(\frac14B\right)^{-1}=4B^{-1}:

A−1=4⋅12[3−1−42]=[6−2−84]A^{-1}=4\cdot\frac12\begin{bmatrix}3&-1\\-4&2\end{bmatrix}=\begin{bmatrix}6&-2\\-8&4\end{bmatrix}

Working directly with det⁡A=38−14=18\det A=\frac38-\frac14=\frac18 gives the same result: 8[34−14−112]8\begin{bmatrix}\frac34&-\frac14\\-1&\frac12\end{bmatrix} simplifies to [6−2−84]\begin{bmatrix}6&-2\\-8&4\end{bmatrix}. Pulling out a common factor keeps the arithmetic in whole numbers.

Quick check

Find the inverse of [−1−235]\begin{bmatrix}-1&-2\\3&5\end{bmatrix}.

How do you check that an inverse is correct?

Subtracting matrix 5 2 7 3 from 8 times identity gives its inverse 3 negative 2 negative 7 5
Because the trace is 5 + 3 = 8, the matrix 8·I minus B gives B⁻¹ directly when the determinant is 1.

Multiply the original by your answer. For square matrices, one product equal to II is enough. For Example 1, the first row of AA times the first column of A−1A^{-1} gives 4⋅35+7⋅(−15)=125−75=14\cdot\frac35+7\cdot\left(-\frac15\right)=\frac{12}{5}-\frac75=1, which is the top-left entry of II. Checking just the diagonal entries of the product takes about ten seconds and catches most sign errors, but a full check also confirms the zeros.

Two faster sanity checks need no multiplication. First, the determinant of the inverse must be the reciprocal of the original determinant: det⁡(A−1)=1det⁡A\det(A^{-1})=\frac{1}{\det A}. In Example 1, 35⋅25−(−710)(−15)=1250−750=110\frac35\cdot\frac25-\left(-\frac{7}{10}\right)\left(-\frac15\right)=\frac{12}{50}-\frac{7}{50}=\frac{1}{10}, matching 110\frac{1}{10}.

Second, the formula can be rewritten so you never have to remember which entries move. The trace is a+da+d, and subtracting AA from (a+d)I(a+d)I flips the diagonal and negates the rest:

A−1=1det⁡A(tr⁡(A) I−A)A^{-1}=\frac{1}{\det A}\bigl(\operatorname{tr}(A)\,I-A\bigr)

This is subtracting matrices entry by entry. In Example 1, 10I−A=[6−7−24]10I-A=\begin{bmatrix}6&-7\\-2&4\end{bmatrix}, the same matrix as before. It works because each diagonal entry becomes (a+d)−a=d(a+d)-a=d, and the off-diagonal entries become 0−b0-b and 0−c0-c.

Try this: Take B=[5273]B=\begin{bmatrix}5&2\\7&3\end{bmatrix}. Its determinant is 11, so write B−1B^{-1} with no division at all, then multiply BB−1BB^{-1} to confirm you get II. (You should find [3−2−75]\begin{bmatrix}3&-2\\-7&5\end{bmatrix}.)

Solving a system of equations with the inverse

A system ax+by=eax+by=e, cx+dy=fcx+dy=f is the single matrix equation Ax=bA\mathbf{x}=\mathbf{b}. Multiply both sides by A−1A^{-1} on the left and the unknowns drop out: x=A−1b\mathbf{x}=A^{-1}\mathbf{b}. Each equation is a line, which you may know in slope-intercept form, and the solution is where the two lines cross. A nonzero determinant guarantees they cross at exactly one point.

Example 4. Solve 2x+y=52x+y=5 and 5x+3y=125x+3y=12.

The coefficient matrix is A=[2153]A=\begin{bmatrix}2&1\\5&3\end{bmatrix} with det⁡=6−5=1\det=6-5=1, so A−1=[3−1−52]A^{-1}=\begin{bmatrix}3&-1\\-5&2\end{bmatrix}. Then:

[xy]=[3−1−52][512]=[15−12−25+24]=[3−1]\begin{bmatrix}x\\y\end{bmatrix}=\begin{bmatrix}3&-1\\-5&2\end{bmatrix}\begin{bmatrix}5\\12\end{bmatrix}=\begin{bmatrix}15-12\\-25+24\end{bmatrix}=\begin{bmatrix}3\\-1\end{bmatrix}

Check in both equations: 2(3)+(−1)=52(3)+(-1)=5 and 5(3)+3(−1)=125(3)+3(-1)=12. Both hold.

Cramer's rule is the same thing

Each entry of A−1bA^{-1}\mathbf{b} is a determinant divided by det⁡A\det A. Here x=15−121=3x=\frac{15-12}{1}=3 and y=24−251=−1y=\frac{24-25}{1}=-1.

The trap is the side you multiply on. Matrix multiplication is not commutative, so bA−1\mathbf{b}A^{-1} is not even defined for these shapes. The inverse always goes on the left of b\mathbf{b}.

Inverse rules: products, transposes and scalar multiples

A few identities save a lot of work once the 2×2 case is automatic:

  • (A−1)−1=A(A^{-1})^{-1}=A
  • (AB)−1=B−1A−1(AB)^{-1}=B^{-1}A^{-1} (the order reverses)
  • (kA)−1=1kA−1(kA)^{-1}=\frac1kA^{-1} for k≠0k\neq0
  • (AT)−1=(A−1)T(A^{T})^{-1}=(A^{-1})^{T}

The reversed order in a product is the one students forget. Think of putting on socks and then shoes: to undo it, the shoes come off first. The algebra confirms it, since (AB)(B−1A−1)=A(BB−1)A−1=AA−1=I(AB)(B^{-1}A^{-1})=A(BB^{-1})A^{-1}=AA^{-1}=I. A product ABAB is invertible only when both AA and BB are.

There is no rule for sums. In general (A+B)−1(A+B)^{-1} is not A−1+B−1A^{-1}+B^{-1}, and a sum of two invertible matrices can even be singular: II and −I-I are each invertible, but their sum is the zero matrix.

Quick check

If A−1=[1201]A^{-1}=\begin{bmatrix}1&2\\0&1\end{bmatrix}, what is AA?

Does the 2×2 shortcut work for 3×3 matrices?

No. The swap-and-negate pattern is special to size two. The idea behind it still scales, because the inverse is always the adjugate divided by the determinant. For a 3×3 matrix, though, the adjugate is built from nine cofactors, and each cofactor is itself a 2×2 determinant. You also need the determinant of a 3×3 matrix for the denominator, and the same rule holds: determinant zero means no inverse.

In practice, row reduction on [A∣I][A\mid I] is usually quicker for 3×3 and larger. That method works at every size, which is why it is the standard one in textbooks and software. If your 2×2 inverses are solid and you want to build toward the next size, try the 3×3 determinant practice problems first, since every step of a 3×3 inverse depends on getting those determinants right.

Where is the inverse of a 2×2 matrix used?

Graphics and geometry use it to undo a transformation. A rotation by angle θ\theta has matrix [cos⁡θ−sin⁡θsin⁡θcos⁡θ]\begin{bmatrix}\cos\theta&-\sin\theta\\\sin\theta&\cos\theta\end{bmatrix} with determinant cos⁡2θ+sin⁡2θ=1\cos^2\theta+\sin^2\theta=1. Swapping and negating gives [cos⁡θsin⁡θ−sin⁡θcos⁡θ]\begin{bmatrix}\cos\theta&\sin\theta\\-\sin\theta&\cos\theta\end{bmatrix}, which is the rotation by −θ-\theta, exactly the move that undoes the original.

Cryptography uses it too. The Hill cipher encrypts pairs of letters with a 2×2 key matrix, and decrypting needs the key’s inverse. Because letters are numbered 00 to 2525, all arithmetic is mod 2626. For the key [3325]\begin{bmatrix}3&3\\2&5\end{bmatrix} the determinant is 99, and 9⋅3=27≡1(mod26)9\cdot3=27\equiv1\pmod{26}, so 19\frac19 becomes 33. That gives 3[5−3−23]=[15−9−69]≡[1517209](mod26)3\begin{bmatrix}5&-3\\-2&3\end{bmatrix}=\begin{bmatrix}15&-9\\-6&9\end{bmatrix}\equiv\begin{bmatrix}15&17\\20&9\end{bmatrix}\pmod{26}. A determinant sharing a factor with 2626 (like 22 or 1313) would make the key unusable, the same zero-determinant failure in modular form.

Everywhere else, the 2×2 inverse is the quickest route to solving two linear equations exactly, which is why it is the first inverse most students learn.

Practice problems

0 of 5 solved

  1. Find the inverse of [3152]\begin{bmatrix}3&1\\5&2\end{bmatrix}.

  2. Find the inverse of [4235]\begin{bmatrix}4&2\\3&5\end{bmatrix}.

  3. Find the inverse of [−251−3]\begin{bmatrix}-2&5\\1&-3\end{bmatrix}.

  4. For which value of kk does [k236]\begin{bmatrix}k&2\\3&6\end{bmatrix} have no inverse?

  5. Use an inverse matrix to solve 2x+3y=82x+3y=8 and 4x+5y=144x+5y=14.

Common questions

What is the formula for the inverse of a 2×2 matrix?

For a matrix with rows a,ba, b and c,dc, d, swap aa and dd, negate bb and cc, and multiply the result by 1ad−bc\frac{1}{ad-bc}. The formula only works when ad−bcad-bc is not zero.

Can every 2×2 matrix be inverted?

No. A 2×2 matrix has an inverse only when its determinant ad−bcad-bc is nonzero. If the determinant is 00, the rows are proportional, the matrix is called singular, and no inverse exists.

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

Write the matrix next to the 2×2 identity matrix as [A∣I][A \mid I], then use row operations until the left side becomes II. The right side is then the inverse. It gives the same answer as the formula but takes more steps for a 2×2.

Is the inverse of a matrix the same as taking reciprocals of its entries?

No. Taking 1x\frac{1}{x} of every entry does not undo the matrix. The inverse is the matrix that multiplies with the original to give the identity, and for a 2×2 it comes from the swap, negate, divide recipe.

Why do you swap a and d and change the signs of b and c?

That arrangement makes the product with the original matrix equal (ad−bc)I(ad-bc)I, because the off-diagonal terms cancel exactly. Dividing by ad−bcad-bc then turns that product into the identity matrix.

What is the inverse of the identity matrix?

The identity matrix is its own inverse, since I⋅I=II\cdot I=I. The formula agrees: with a=d=1a=d=1 and b=c=0b=c=0 the determinant is 11 and nothing changes.

Up next