If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Finding inverses of 2x2 matrices

Sal gives an example of how to find the inverse of a given 2x2 matrix. Created by Sal Khan.

Want to join the conversation?

  • leaf green style avatar for user HH539
    What if the determinant is 0? Is the answer undefined?
    (70 votes)
    Default Khan Academy avatar avatar for user
  • purple pi purple style avatar for user Shawn Malekifar
    Shouldn't A and A' be separeted from each other when writing the equations? Cause A couldn't be equal to its inverse...?
    (19 votes)
    Default Khan Academy avatar avatar for user
    • duskpin ultimate style avatar for user Katharine
      You are right. After he wrote A=, he should have started a new line and wrote A'=....and then continued with everything he does. However, it's clear what Sal is doing if you listen to what he is saying, but it would get confusing if you were just looking at the equations.
      Applied mathematicians (physicists, computer scientists, engineers etc) are often sloppy with mathematical notation. The emphasis is often on getting the result rather than on the rigorous proof of each step. If you search elsewhere online, you will find that there is a lot of criticism for Khan Academy for its inconsistant use of proper mathematical notation. (But imperfect as it may be, it still is making math accessible to lots of people)
      (56 votes)
  • blobby green style avatar for user sethdorwinedwards
    Inverse of a 3x3 matrix
    (12 votes)
    Default Khan Academy avatar avatar for user
    • piceratops ultimate style avatar for user Mina
      What Sal introduced here in this video, is a method that was 'woven' specially for finding inverse of a 2x2 matrix but it comes from a more general formula for determining inverse of any nxn matrix A which is:
      A⁻¹ = 1/det(A) * adj(A)
      where adj(A) - adjugate of A - is just the transpose of cofactor matrix Cᵀ.
      Cofactor matrix C of matrix A is also nxn matrix whose each entry (Cᵢ,ⱼ for example) is the determinant of the submatrix formed by deleting the i-th row and j-th column from our original matrix A multiplied by (-1)^(i+j).

      Saying all of that, let's try it on 3x3 matrix. Suppose we have a matrix B
      ⌈a b c⌉
      | d e f |
      ⌊g h i ⌋

      the first thing is to find determinant of B:
      det(B) = a(ei - fh) - b(di - fg) + c(dh - eg)

      second thing is to find the cofactor matrix C of B (which takes a lot of effort):
      ⌈C₁,₁ = (-1)² * (ei - fh) C₁,₂ = (-1)³ * (di - fg) C₁,₃ = (-1)⁴ * (dh - eg) ⌉
      |C₂,₁ = (-1)³ * (bi - ch) C₂,₂ = (-1)⁴ * (ai - cg) C₂,₃ = (-1)⁵ * (ah - bg)|
      ⌊C₃,₁ = (-1)⁴ * (bf - ec) C₃,₂ = (-1)⁵ * (af - cd) C₃,₃ = (-1)⁶ * (ea - bd)⌋

      finally, we transpose our last matrix C to get the adjugate of B:
      ⌈(ei - fh) (-bi + ch) (bf - ec) ⌉
      |(-di + fg) (ai - cg) (-af + cd)|
      ⌊(dh - eg) (-ah + bg) (ea - bd)⌋

      so B⁻¹ = 1/det(B) * adj(B)
      usually, you let the computer calculate the inverses for you.
      (17 votes)
  • spunky sam blue style avatar for user drbabitaschopra
    how does inversing a matrix help?
    (10 votes)
    Default Khan Academy avatar avatar for user
    • aqualine tree style avatar for user Ted Fischer
      You can add, subtract, and multiply matrices. Division, however, is not defined. Thus to undo matrix multiplication, you need to multiply by the inverse matrix. It is thus a pretty fundamental operation.

      One early application for inverse matrices is to solve systems of linear equations. You can express the system as a matrix equation AX=B, then solve it by multiplying by the inverse of the coefficient matrix to get X = A^(-1)*B
      (19 votes)
  • piceratops ultimate style avatar for user Mohammad Zaman
    How can we verify the answer?
    (9 votes)
    Default Khan Academy avatar avatar for user
    • leaf blue style avatar for user Stefen
      You can check your work by multiplying the inverse you calculated by the original matrix. If the result IS NOT an identity matrix, then your inverse is incorrect.
      If A is the matrix you want to find the inverse, and B is the the inverse you calculated from A, then B is the inverse of A if and only if AB = BA = I
      (9 votes)
  • orange juice squid orange style avatar for user Sofia
    What are some of the practical applications for this?
    (4 votes)
    Default Khan Academy avatar avatar for user
    • leaf blue style avatar for user Stefen
      Do you like Pixar films?
      Matrix math is used intensively in making 2D and 3D graphics - they have developed special chips just to do this type of math as fast as possible. Back when the original Toy Story came out, it took 24 hours just to do the math (using matrices) to render one frame of animation.
      Matrices are also a great way to solve simultaneous systems of linear equations. These are used in as many different fields as you can think of, from medicine and all its applications, finances, forecasting, trend analysis, system optimization and on and on.
      Since there is no direct way to do matrix division, we take the inverse of a matrix and then multiply the matrix we want to divide by the inverse, just like 3÷2 = 3×½.
      (18 votes)
  • female robot grace style avatar for user lthanedar
    Is there a video on Khan Academy where Sal proves the inverse matrix equation? If there is, I'd like to know.
    (10 votes)
    Default Khan Academy avatar avatar for user
  • aqualine seedling style avatar for user Dipesh Chaudhary
    Can calculators work out matrices?
    (8 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Mel
    why do we have to take the adjugate (sp?) of A to find the inverse? How does this come about?
    Is there a video where this is explained someone could direct me to?
    (8 votes)
    Default Khan Academy avatar avatar for user
  • spunky sam blue style avatar for user Yves Wheeler
    Just applied this method to the question the video was attached to, told me I was wrong and should of used the Gaussian Elimination method. How do I determine which method to use?
    (4 votes)
    Default Khan Academy avatar avatar for user

Video transcript

Let's attempt to take the inverse of this 2 by 2 matrix. And you'll see the 2 by 2 matrices are about the only size of matrices that it's somewhat pleasant to take the inverse of. Anything larger than that, it becomes very unpleasant. So the inverse of a 2 by 2 matrix is going to be equal to 1 over the determinant of the matrix times the adjugate of the matrix, which sounds like a very fancy word. But we'll see for by a 2 by 2 matrix, it's not too involved. So first let's think about what the determinant of this matrix is. Well, we've seen this before. We just look along the two diagonals. It's 3 times 2 minus negative 7 times 5. So this is going to be equal to 1 over 3 times 2 minus negative 7 times 5. And then the adjugate of A-- and here I'm really just teaching you the mechanics of it. And it's a little unfortunate that in a typical algebra II class you kind of just go into the mechanics of it. But at least this will get us to where we need to go. So the adjugate of A, you literally just need to swap the two elements on this diagonal. So put the 2 where the 3 is and the 3 where the 2 is. So this element right over here, this 3 will go right over there. This 2 will go right over here. And then these two elements, you just take the negative of them. So the negative-- let me do a new color. Actually, I'm running out of colors. The negative of that is negative 5. The negative of that is positive 7. So we are left with-- this is going to be equal to 1 over-- 3 times 2 is 6. Negative 7 times 5 is negative 35. But then we have this positive over here. So this whole thing becomes plus 35. So 6 plus 35 is 41. So the determinant of our matrix is 41. We're going to take 1 over the determinant and multiply it times our adjugate, times 2, negative 5, 7, and 3. So we get -- so this is the drum roll part -- 2 over 41, negative 5 over 41. I'm just multiplying each of these elements times 1 over 41. 7 over 41, and 3 over 41. And we are done.