Class 12 Maths, Worked in Full Past papersGet updates
Chapter 4 · Determinants

Miscellaneous · Q3: Find (AB)−1(AB)^{-1} from A−1A^{-1} and BB

Miscellaneous ExerciseInverse of a matrix · Section 4.5
The question

If

A−1=[3−11−156−55−22]A^{-1} = \begin{bmatrix} 3 & -1 & 1 \\ -15 & 6 & -5 \\ 5 & -2 & 2 \end{bmatrix}

and

B=[12−2−1300−21],B = \begin{bmatrix} 1 & 2 & -2 \\ -1 & 3 & 0 \\ 0 & -2 & 1 \end{bmatrix},

find (AB)−1(AB)^{-1}⁠.

Exam answer

Expanding along R3R_3⁠:

∣B∣=0∣2−230∣−(−2)∣1−2−10∣+1∣12−13∣=0(6)+2(−2)+1(5)=1\begin{aligned} |B| &= 0\begin{vmatrix} 2 & -2 \\ 3 & 0 \end{vmatrix} - (-2)\begin{vmatrix} 1 & -2 \\ -1 & 0 \end{vmatrix} \\ &\quad + 1\begin{vmatrix} 1 & 2 \\ -1 & 3 \end{vmatrix} \\ &= 0(6) + 2(-2) + 1(5) \\ &= 1 \end{aligned}

∣B∣=1≠0|B| = 1 \ne 0⁠. So B−1B^{-1} exists.

Cofactors of BB⁠:

B11=∣30−21∣=3B12=−∣−1001∣=1B13=∣−130−2∣=2\begin{aligned} B_{11} &= \begin{vmatrix} 3 & 0 \\ -2 & 1 \end{vmatrix} = 3 \\ B_{12} &= -\begin{vmatrix} -1 & 0 \\ 0 & 1 \end{vmatrix} = 1 \\ B_{13} &= \begin{vmatrix} -1 & 3 \\ 0 & -2 \end{vmatrix} = 2 \end{aligned} B21=−∣2−2−21∣=2B22=∣1−201∣=1B23=−∣120−2∣=2\begin{aligned} B_{21} &= -\begin{vmatrix} 2 & -2 \\ -2 & 1 \end{vmatrix} = 2 \\ B_{22} &= \begin{vmatrix} 1 & -2 \\ 0 & 1 \end{vmatrix} = 1 \\ B_{23} &= -\begin{vmatrix} 1 & 2 \\ 0 & -2 \end{vmatrix} = 2 \end{aligned} B31=∣2−230∣=6B32=−∣1−2−10∣=2B33=∣12−13∣=5\begin{aligned} B_{31} &= \begin{vmatrix} 2 & -2 \\ 3 & 0 \end{vmatrix} = 6 \\ B_{32} &= -\begin{vmatrix} 1 & -2 \\ -1 & 0 \end{vmatrix} = 2 \\ B_{33} &= \begin{vmatrix} 1 & 2 \\ -1 & 3 \end{vmatrix} = 5 \end{aligned} adj⁡B=[326112225]B−1=1∣B∣adj⁡B=[326112225]\begin{aligned} \operatorname{adj}B &= \begin{bmatrix} 3 & 2 & 6 \\ 1 & 1 & 2 \\ 2 & 2 & 5 \end{bmatrix} \\ B^{-1} &= \frac{1}{|B|}\operatorname{adj}B \\ &= \begin{bmatrix} 3 & 2 & 6 \\ 1 & 1 & 2 \\ 2 & 2 & 5 \end{bmatrix} \end{aligned}

As AA and BB are both invertible, (AB)−1=B−1A−1(AB)^{-1} = B^{-1}A^{-1}⁠, where

B−1A−1=[326112225][3−11−156−55−22]\begin{aligned} &B^{-1}A^{-1} \\ &= \begin{bmatrix} 3 & 2 & 6 \\ 1 & 1 & 2 \\ 2 & 2 & 5 \end{bmatrix}\begin{bmatrix} 3 & -1 & 1 \\ -15 & 6 & -5 \\ 5 & -2 & 2 \end{bmatrix} \end{aligned}

Its entries cijc_{ij} (row ii of B−1B^{-1} times column jj of A−1A^{-1}⁠):

c11=9−30+30=9c12=−3+12−12=−3c13=3−10+12=5c21=3−15+10=−2c22=−1+6−4=1c23=1−5+4=0c31=6−30+25=1c32=−2+12−10=0c33=2−10+10=2\begin{aligned} c_{11} &= 9 - 30 + 30 = 9 \\ c_{12} &= -3 + 12 - 12 = -3 \\ c_{13} &= 3 - 10 + 12 = 5 \\ c_{21} &= 3 - 15 + 10 = -2 \\ c_{22} &= -1 + 6 - 4 = 1 \\ c_{23} &= 1 - 5 + 4 = 0 \\ c_{31} &= 6 - 30 + 25 = 1 \\ c_{32} &= -2 + 12 - 10 = 0 \\ c_{33} &= 2 - 10 + 10 = 2 \end{aligned}

∴ (AB)−1=[9−35−210102]\therefore\ (AB)^{-1} = \begin{bmatrix} 9 & -3 & 5 \\ -2 & 1 & 0 \\ 1 & 0 & 2 \end{bmatrix}⁠.

Want the reason behind every step, the basics and the checks?

The one idea this problem is built on

We are not given A, only its inverse. Rather than recovering A, forming AB and inverting a new matrix, use the reversal rule (AB)−1=B−1A−1(AB)^{-1} = B^{-1}A^{-1}. Then the only inverse we have to compute is B−1B^{-1}⁠, and one matrix product finishes the job. The order is reversed, like taking off socks and shoes: what was put on last comes off first.

Given, to find, and the plan
Given
The 3×33\times3 matrices A−1A^{-1} and BB above.
To find
(AB)−1(AB)^{-1}⁠.
Plan
(1) Justify (AB)−1=B−1A−1(AB)^{-1} = B^{-1}A^{-1}⁠. (2) Compute ∣B∣|B|⁠. (3) Find all nine cofactors of B, then adj B and B−1B^{-1}⁠. (4) Check BB−1=IBB^{-1} = I⁠. (5) Multiply B−1A−1B^{-1}A^{-1} entry by entry. (6) Check the answer.

Basics you need

1Minors and cofactors

MijM_{ij} is the 2×22\times2 determinant left after deleting row ii and column jj⁠; the cofactor is Aij=(−1)i+jMijA_{ij} = (-1)^{i+j}M_{ij}⁠. Basics: the + − + sign pattern

2Adjoint and inverse

adj B is the transpose of the matrix of cofactors. If ∣B∣≠0|B| \ne 0⁠, then B−1=1∣B∣adj⁡BB^{-1} = \frac{1}{|B|}\operatorname{adj}B⁠. Basics: why the inverse divides by |A|

3Row times column

The (i,j)(i, j) entry of a product is row ii of the first factor times column jj of the second: multiply in pairs and add. Basics: matrix facts the chapter uses

4Transpose

The transpose turns rows into columns: the (i,j)(i, j) entry becomes the (j,i)(j, i) entry. Basics: transpose and identity

Solution

  1. Why (AB)−1=B−1A−1(AB)^{-1} = B^{-1}A^{-1}

    A has an inverse (we are given it), so A is invertible. If B is also invertible (Step 2 shows ∣B∣≠0|B| \ne 0⁠), then both are invertible 3×33\times3 matrices and

    (AB)(B−1A−1)=A(BB−1)A−1=AIA−1=AA−1=I,\begin{aligned} (AB)(B^{-1}A^{-1}) &= A(BB^{-1})A^{-1} \\ &= AIA^{-1} = AA^{-1} = I, \end{aligned} (B−1A−1)(AB)=B−1(A−1A)B=B−1IB=B−1B=I.\begin{aligned} (B^{-1}A^{-1})(AB) &= B^{-1}(A^{-1}A)B \\ &= B^{-1}IB = B^{-1}B = I. \end{aligned}

    So B−1A−1B^{-1}A^{-1} is the inverse of AB.

    A matrix that multiplies AB to give I on both sides is, by definition, the inverse of AB, and the inverse is unique. The two lines above use only the associative law and BB−1=IBB^{-1} = I⁠, A−1A=IA^{-1}A = I⁠. The order matters: A−1B−1A^{-1}B^{-1} would leave AB A−1B−1AB\,A^{-1}B^{-1}⁠, in which B and A−1A^{-1} are not next to each other, so nothing cancels.
    Chapter 3, Theorem 4: (AB)−1=B−1A−1(AB)^{-1} = B^{-1}A^{-1}⁠; also verified in Example 14. Lesson: inverse of a matrix
  2. The determinant of B

    Row 3 of B is (0,−2,1)(0, -2, 1) and contains a zero, so expand along R3R_3⁠, with signs +,−,++, -, +⁠:

    ∣B∣=0⋅M31−(−2) M32+1⋅M33.|B| = 0\cdot M_{31} - (-2)\,M_{32} + 1\cdot M_{33}. M32=∣1−2−10∣=0−2=−2M_{32} = \begin{vmatrix} 1 & -2 \\ -1 & 0 \end{vmatrix} = 0 - 2 = -2 M33=∣12−13∣=3−(−2)=5M_{33} = \begin{vmatrix} 1 & 2 \\ -1 & 3 \end{vmatrix} = 3 - (-2) = 5 ∣B∣=0+2(−2)+5=1.|B| = 0 + 2(-2) + 5 = 1.

    Since ∣B∣=1≠0|B| = 1 \ne 0⁠, B is non-singular and B−1B^{-1} exists.

    The zero in position (3,1)(3, 1) removes one term. In M32M_{32} the products are 1⋅0=01\cdot0 = 0 and (−2)(−1)=2(-2)(-1) = 2⁠, so M32=0−2M_{32} = 0 - 2⁠. In M33M_{33} they are 1⋅3=31\cdot3 = 3 and 2⋅(−1)=−22\cdot(-1) = -2⁠. A square matrix is invertible exactly when its determinant is not zero.
    Section 4.5, Theorem 4: A is invertible if and only if A is non-singular. Lesson: expanding a 3 × 3 determinant
  3. All nine cofactors of B

    The rows of B are (1,2,−2)(1, 2, -2)⁠, (−1,3,0)(-1, 3, 0)⁠, (0,−2,1)(0, -2, 1)⁠. For each position, delete its row and column, evaluate the 2×22\times2 minor, and attach the sign (−1)i+j(-1)^{i+j}⁠:

    M11=∣30−21∣=3,A11=3M12=∣−1001∣=−1,A12=1M13=∣−130−2∣=2,A13=2\begin{aligned} M_{11} &= \begin{vmatrix} 3 & 0 \\ -2 & 1 \end{vmatrix} = 3, & A_{11} &= 3 \\ M_{12} &= \begin{vmatrix} -1 & 0 \\ 0 & 1 \end{vmatrix} = -1, & A_{12} &= 1 \\ M_{13} &= \begin{vmatrix} -1 & 3 \\ 0 & -2 \end{vmatrix} = 2, & A_{13} &= 2 \end{aligned} M21=∣2−2−21∣=−2,A21=2M22=∣1−201∣=1,A22=1M23=∣120−2∣=−2,A23=2\begin{aligned} M_{21} &= \begin{vmatrix} 2 & -2 \\ -2 & 1 \end{vmatrix} = -2, & A_{21} &= 2 \\ M_{22} &= \begin{vmatrix} 1 & -2 \\ 0 & 1 \end{vmatrix} = 1, & A_{22} &= 1 \\ M_{23} &= \begin{vmatrix} 1 & 2 \\ 0 & -2 \end{vmatrix} = -2, & A_{23} &= 2 \end{aligned} M31=∣2−230∣=6,A31=6M32=∣1−2−10∣=−2,A32=2M33=∣12−13∣=5,A33=5\begin{aligned} M_{31} &= \begin{vmatrix} 2 & -2 \\ 3 & 0 \end{vmatrix} = 6, & A_{31} &= 6 \\ M_{32} &= \begin{vmatrix} 1 & -2 \\ -1 & 0 \end{vmatrix} = -2, & A_{32} &= 2 \\ M_{33} &= \begin{vmatrix} 1 & 2 \\ -1 & 3 \end{vmatrix} = 5, & A_{33} &= 5 \end{aligned}
    The positions with i+ji + j odd, namely (1,2)(1,2)⁠, (2,1)(2,1)⁠, (2,3)(2,3)⁠, (3,2)(3,2)⁠, change sign; the others keep it. For instance M21=2⋅1−(−2)(−2)M_{21} = 2\cdot1 - (-2)(-2) =2−4=−2= 2 - 4 = -2⁠, so A21=(−1)3(−2)=2A_{21} = (-1)^3(-2) = 2⁠, and M31=2⋅0−(−2)⋅3=6M_{31} = 2\cdot0 - (-2)\cdot3 = 6⁠. A quick consistency test: row 1 of B times its own cofactors must give ∣B∣|B|⁠: 1⋅3+2⋅1+(−2)⋅2=11\cdot3 + 2\cdot1 + (-2)\cdot2 = 1 ✓.
    Section 4.4, Definitions 1 and 2: Aij=(−1)i+jMijA_{ij} = (-1)^{i+j}M_{ij}⁠. Lesson: minors and cofactors
  4. adj B and B−1B^{-1}

    Place the cofactors in their positions, then transpose:

    [Aij]=[312212625],adj⁡B=[326112225].[A_{ij}] = \begin{bmatrix} 3 & 1 & 2 \\ 2 & 1 & 2 \\ 6 & 2 & 5 \end{bmatrix}, \quad \operatorname{adj}B = \begin{bmatrix} 3 & 2 & 6 \\ 1 & 1 & 2 \\ 2 & 2 & 5 \end{bmatrix}.

    Since ∣B∣=1|B| = 1⁠,

    B−1=11adj⁡B=[326112225].B^{-1} = \frac{1}{1}\operatorname{adj}B = \begin{bmatrix} 3 & 2 & 6 \\ 1 & 1 & 2 \\ 2 & 2 & 5 \end{bmatrix}.
    The adjoint is the transpose of the cofactor matrix: row 1 of adj B is (A11,A21,A31)=(3,2,6)(A_{11}, A_{21}, A_{31}) = (3, 2, 6)⁠, the cofactors of column 1 of B. Forgetting the transpose is the most common error in this kind of question. Because ∣B∣=1|B| = 1⁠, dividing by ∣B∣|B| changes nothing.
    Section 4.5.1, Definition 3 (adjoint); Theorem 4: B−1=1∣B∣adj⁡BB^{-1} = \frac{1}{|B|}\operatorname{adj}B⁠. Lesson: the adjoint
  5. Check that BB−1=IBB^{-1} = I

    Rows of B: (1,2,−2)(1, 2, -2)⁠, (−1,3,0)(-1, 3, 0)⁠, (0,−2,1)(0, -2, 1)⁠. Columns of B−1B^{-1}⁠: (3,1,2)(3, 1, 2)⁠, (2,1,2)(2, 1, 2)⁠, (6,2,5)(6, 2, 5)⁠.

    (1,1):3+2−4=1(1,2):2+2−4=0(1,3):6+4−10=0(2,1):−3+3+0=0(2,2):−2+3+0=1(2,3):−6+6+0=0(3,1):0−2+2=0(3,2):0−2+2=0(3,3):0−4+5=1\begin{aligned} (1,1)&: 3 + 2 - 4 = 1 \\ (1,2)&: 2 + 2 - 4 = 0 \\ (1,3)&: 6 + 4 - 10 = 0 \\ (2,1)&: -3 + 3 + 0 = 0 \\ (2,2)&: -2 + 3 + 0 = 1 \\ (2,3)&: -6 + 6 + 0 = 0 \\ (3,1)&: 0 - 2 + 2 = 0 \\ (3,2)&: 0 - 2 + 2 = 0 \\ (3,3)&: 0 - 4 + 5 = 1 \end{aligned}

    So BB−1=IBB^{-1} = I ✓.

    A single slip in one cofactor would show up here as a wrong entry. For example, entry (1,3)(1,3) is 1⋅6+2⋅2+(−2)⋅5=6+4−101\cdot6 + 2\cdot2 + (-2)\cdot5 = 6 + 4 - 10⁠. Checking now prevents carrying an error into the final product.
  6. Multiply B−1A−1B^{-1}A^{-1}

    Both factors are 3×33\times3⁠, so the product is defined and is 3×33\times3⁠. Rows of B−1B^{-1}⁠: (3,2,6)(3, 2, 6)⁠, (1,1,2)(1, 1, 2)⁠, (2,2,5)(2, 2, 5)⁠. Columns of A−1A^{-1}⁠: (3,−15,5)(3, -15, 5)⁠, (−1,6,−2)(-1, 6, -2)⁠, (1,−5,2)(1, -5, 2)⁠.

    c11=9−30+30=9c12=−3+12−12=−3c13=3−10+12=5\begin{aligned} c_{11} &= 9 - 30 + 30 = 9 \\ c_{12} &= -3 + 12 - 12 = -3 \\ c_{13} &= 3 - 10 + 12 = 5 \end{aligned} c21=3−15+10=−2c22=−1+6−4=1c23=1−5+4=0\begin{aligned} c_{21} &= 3 - 15 + 10 = -2 \\ c_{22} &= -1 + 6 - 4 = 1 \\ c_{23} &= 1 - 5 + 4 = 0 \end{aligned} c31=6−30+25=1c32=−2+12−10=0c33=2−10+10=2\begin{aligned} c_{31} &= 6 - 30 + 25 = 1 \\ c_{32} &= -2 + 12 - 10 = 0 \\ c_{33} &= 2 - 10 + 10 = 2 \end{aligned} (AB)−1=B−1A−1=[9−35−210102].(AB)^{-1} = B^{-1}A^{-1} = \begin{bmatrix} 9 & -3 & 5 \\ -2 & 1 & 0 \\ 1 & 0 & 2 \end{bmatrix}.
    Each entry is a row of B−1B^{-1} times a column of A−1A^{-1}⁠. In full, c11=3⋅3+2⋅(−15)+6⋅5c_{11} = 3\cdot3 + 2\cdot(-15) + 6\cdot5 and c31=2⋅3+2⋅(−15)+5⋅5c_{31} = 2\cdot3 + 2\cdot(-15) + 5\cdot5⁠; the other entries follow the same pattern, with the products listed in order.
    Product entry formula (Chapter 3, Section 3.4.5). Basics: matrix facts the chapter uses
Result (AB)−1=[9−35−210102](AB)^{-1} = \begin{bmatrix} 9 & -3 & 5 \\ -2 & 1 & 0 \\ 1 & 0 & 2 \end{bmatrix}

(Textbook answer: the same matrix.)

Check it with numbers

Go the long way round. Inverting A−1A^{-1} (its determinant is 1) gives A itself, with rows (2,0,−1)(2, 0, -1)⁠, (5,1,0)(5, 1, 0)⁠, (0,1,3)(0, 1, 3)⁠; indeed row 1 of A times the columns of A−1A^{-1} gives 6+0−5=16 + 0 - 5 = 1⁠, −2+0+2=0-2 + 0 + 2 = 0⁠, 2+0−2=02 + 0 - 2 = 0⁠. Then AB has rows (2,6,−5)(2, 6, -5)⁠, (4,13,−10)(4, 13, -10)⁠, (−1,−3,3)(-1, -3, 3)⁠. Multiplying AB by our answer, row by row:

row 1:18−12−5=1,−6+6=0,10−10=0row 2:36−26−10=0,−12+13=1,20−20=0row 3:−9+6+3=0,3−3=0,−5+6=1\begin{aligned} \text{row 1}&: 18 - 12 - 5 = 1,\quad -6 + 6 = 0,\quad 10 - 10 = 0 \\ \text{row 2}&: 36 - 26 - 10 = 0,\quad -12 + 13 = 1,\quad 20 - 20 = 0 \\ \text{row 3}&: -9 + 6 + 3 = 0,\quad 3 - 3 = 0,\quad -5 + 6 = 1 \end{aligned}

So (AB)⋅(answer)=I(AB)\cdot(\text{answer}) = I ✓. (Terms that are zero, from the 0 entries of the answer, are left out.)

Common mistakes
  1. Wrong order: A−1B−1A^{-1}B^{-1} is a different matrix. Its (1,1)(1,1) entry is 3⋅3+(−1)⋅1+1⋅2=103\cdot3 + (-1)\cdot1 + 1\cdot2 = 10⁠, not 9.
  2. Forgetting to transpose the cofactor matrix when forming adj B.
  3. Sign errors in cofactors at the odd positions (1,2)(1,2)⁠, (2,1)(2,1)⁠, (2,3)(2,3)⁠, (3,2)(3,2)⁠.
  4. Skipping the check ∣B∣≠0|B| \ne 0. The formula B−1=1∣B∣adj⁡BB^{-1} = \frac{1}{|B|}\operatorname{adj}B needs it, and so does the rule (AB)−1=B−1A−1(AB)^{-1} = B^{-1}A^{-1}⁠.
What to take away
  1. The inverse of a product is the product of the inverses in reverse order: (AB)−1=B−1A−1(AB)^{-1} = B^{-1}A^{-1}⁠.
  2. Given an inverse, use it directly; do not undo it unless you have to.
  3. The routine for B−1B^{-1}⁠: determinant, nine cofactors, transpose, divide, then check BB−1=IBB^{-1} = I⁠.

Every fact used, and where it comes from

FactUsed inSource
(AB)−1=B−1A−1(AB)^{-1} = B^{-1}A^{-1} for invertible A, B of the same orderStep 1Chapter 3, Section 3.7, Theorem 4; illustrated in Example 14
Expansion of a 3×33\times3 determinant along a row with a zeroStep 2Section 4.2.3, Remark (i) (Lesson: expanding a 3 × 3 determinant)
Minors and cofactors; a row times its own cofactors gives the determinantStep 3Section 4.4, Definitions 1, 2 (Lesson: minors and cofactors)
Adjoint = transpose of the cofactor matrixStep 4Section 4.5.1, Definition 3 (Lesson: the adjoint)
Invertible ⇔ non-singular; B−1=1∣B∣adj⁡BB^{-1} = \frac{1}{|B|}\operatorname{adj}BSteps 2, 4Section 4.5, Theorem 4 (Lesson: inverse of a matrix)
All cofactors, matrices and productsSteps 2–6, CheckRecomputed with sympy (and parsed from this page) in the site's verification script
Found an error, or want more?

Tell us if something on this page is wrong or unclear, or if you would like a fuller explanation, another method or a new feature. Send feedback on this problem →