MATH 133 Linear Algebra and Geometry • McGill University, Montreal

Corrected exercises: matrix inverses and elementary matrices (MATH 133)

This is the corrected exercise set for the chapter on matrix inverses and elementary matrices of MATH 133, Linear Algebra and Geometry, at McGill University (sections 2.4 and 2.5 of Nicholson). Everything is done by hand, as on the exam: the 2×22 \times 2 inverse by its formula with ad−bcad - bc, every 3×33 \times 3 inverse by row reducing [A∣I][A \mid I] with each operation named, and every answer checked by multiplying back.

The thread running through the whole set: there is no matrix division. An inverse undoes a matrix from ONE side, and the side is the whole answer. It is why the definition asks for AB=IAB = I and BA=IBA = I, why the algorithm works (each row operation is a multiplication on the LEFT), why (AB)−1=B−1A−1(AB)^{-1} = B^{-1}A^{-1}, why AX=BAX = B and XA=BXA = B have different solutions, and why a product of elementary matrices must be read in the right order.

The traps named explicitly in the solutions: inverting entry by entry, reversing nothing in (AB)−1(AB)^{-1}, writing A−1BA^{-1}B for the solution of XA=BXA = B, forgetting the identity in 3I−M3I - M, dividing by a pivot k−5k - 5 before excluding k=5k = 5, declaring a matrix singular because of a zero on its diagonal, inventing a formula for (A+B)−1(A + B)^{-1}, and cancelling a factor of (A−I)(A−2I)=0(A - I)(A - 2I) = 0 as if matrices were numbers.

10 corrected exercises • 100 points • 150 minutes

Revision sheet for this chapter → Every MATH 133 chapter →

Course recap

  • • AA is invertible when some BB satisfies AB=IAB = I AND BA=IBA = I. That BB is unique and is written A−1A^{-1}. For square matrices, one of the two products is enough.
  • • 2×22 \times 2: if ad−bc≠0ad - bc \neq 0, (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}; if ad−bc=0ad - bc = 0, there is no inverse.
  • • Algorithm: row reduce [A∣I][A \mid I]. If the left block becomes II, the right block is A−1A^{-1}. If a row of zeros appears in the left block, AA is not invertible.
  • • (AB)−1=B−1A−1(AB)^{-1} = B^{-1}A^{-1}, (AT)−1=(A−1)T(A^T)^{-1} = (A^{-1})^T, (kA)−1=1kA−1(kA)^{-1} = \frac{1}{k}A^{-1}, (An)−1=(A−1)n(A^n)^{-1} = (A^{-1})^n. There is NO formula for (A+B)−1(A + B)^{-1}.
  • • AX=BAX = B gives X=A−1BX = A^{-1}B; XA=BXA = B gives X=BA−1X = BA^{-1}; Ax=bA\mathbf{x} = \mathbf{b} gives x=A−1b\mathbf{x} = A^{-1}\mathbf{b}.
  • • An elementary matrix is II after one row operation; EAEA performs that operation on AA. If Ek⋯E1A=IE_k \cdots E_1A = I, then A−1=Ek⋯E1A^{-1} = E_k \cdots E_1 and A=E1−1⋯Ek−1A = E_1^{-1} \cdots E_k^{-1}.
  • • For a square AA these are equivalent: AA invertible, Ax=0A\mathbf{x} = \mathbf{0} has only the zero solution, AA reduces to II, AA is a product of elementary matrices.

Part A: the basics (/50)

Exercise 1: What an inverse is, and the 2 by 2 shortcut

A square matrix AA is invertible when there is a matrix BB with AB=IAB = I AND BA=IBA = I. Matrices do not commute, so the definition asks for both products; there is no fraction 1A\frac{1}{A} and no division, only a matrix that undoes AA from the left and from the right.

For a 2×22 \times 2 matrix the number ad−bcad - bc decides everything, and in this chapter it is used as a tool, before the theory of determinants: if ad−bc≠0ad - bc \neq 0, then (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}. The figure shows what that number means for the system Ax=bA\mathbf{x} = \mathbf{b}: two lines that cross, or two lines that never meet.

ad - bc = 2one crossing point2x + y = 34x + 3y = 7ad - bc = 0parallel: no crossing4x + 6y = 62x + 3y = 6
  • a) Show that B=(2−5−13)B = \begin{pmatrix} 2 & -5 \\ -1 & 3 \end{pmatrix} is the inverse of A=(3512)A = \begin{pmatrix} 3 & 5 \\ 1 & 2 \end{pmatrix} by computing BOTH ABAB and BABA.
  • b) Prove that a matrix has at most one inverse: if BB and CC are both inverses of AA, then B=CB = C.
  • c) Compute the inverse of M=(2143)M = \begin{pmatrix} 2 & 1 \\ 4 & 3 \end{pmatrix} with the 2×22 \times 2 formula, then use it to solve 2x+y=32x + y = 3, 4x+3y=74x + 3y = 7. Locate your answer on the left panel of the figure.
  • d) Show, from the definition alone, that P=(4623)P = \begin{pmatrix} 4 & 6 \\ 2 & 3 \end{pmatrix} has no inverse. Link your argument to the right panel.
  • e) A student writes M−1=(1211413)M^{-1} = \begin{pmatrix} \frac{1}{2} & 1 \\ \frac{1}{4} & \frac{1}{3} \end{pmatrix}, taking the reciprocal of every entry. Show in one product that this is wrong.
Show the solution

Answers

  • a) AB=IAB = I and BA=IBA = I, so A−1=BA^{-1} = B.
  • b) B=BI=B(AC)=(BA)C=IC=CB = BI = B(AC) = (BA)C = IC = C.
  • c) M−1=(32−12−21)M^{-1} = \begin{pmatrix} \frac{3}{2} & -\frac{1}{2} \\ -2 & 1 \end{pmatrix}, solution (x,y)=(1,1)(x, y) = (1, 1), the crossing point.
  • d) The first row of PBPB is always twice its second row, so PB≠IPB \neq I for every BB.
  • e) The (1,1)(1,1) entry of the product is 55, not 11.

a) AB=(3512)(2−5−13)=(1001)=IAB = \begin{pmatrix} 3 & 5 \\ 1 & 2 \end{pmatrix}\begin{pmatrix} 2 & -5 \\ -1 & 3 \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} = I, and BA=(2−5−13)(3512)=(1001)=IBA = \begin{pmatrix} 2 & -5 \\ -1 & 3 \end{pmatrix}\begin{pmatrix} 3 & 5 \\ 1 & 2 \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} = I. Both products are the identity, so B=A−1B = A^{-1}. For square matrices a theorem of the chapter says one product is enough, but on a first question the marker expects the definition, and the definition has two sides. Here ad−bc=6−5=1ad - bc = 6 - 5 = 1, which is why the inverse has integer entries: the formula divides by 11.

b) Suppose AB=BA=IAB = BA = I and AC=CA=IAC = CA = I. Then B=BI=B(AC)=(BA)C=IC=CB = BI = B(AC) = (BA)C = IC = C. The proof uses associativity and nothing else, and it uses BA=IBA = I on one side and AC=IAC = I on the other. This is what licenses the notation A−1A^{-1}: the article THE inverse is only allowed once uniqueness is proved. It also means that any matrix you find by any method, formula, algorithm or guess, is THE inverse as soon as it passes the test.

c) ad−bc=2×3−1×4=2ad - bc = 2 \times 3 - 1 \times 4 = 2, so M−1=12(3−1−42)=(32−12−21)M^{-1} = \frac{1}{2}\begin{pmatrix} 3 & -1 \\ -4 & 2 \end{pmatrix} = \begin{pmatrix} \frac{3}{2} & -\frac{1}{2} \\ -2 & 1 \end{pmatrix}. The gesture is: swap the diagonal entries, change the SIGN of the off-diagonal ones, divide by ad−bcad - bc. The system is Mx=bM\mathbf{x} = \mathbf{b} with b=(3,7)\mathbf{b} = (3, 7), and multiplying on the LEFT by M−1M^{-1} gives x=M−1b=(92−72, −6+7)=(1,1)\mathbf{x} = M^{-1}\mathbf{b} = \left(\frac{9}{2} - \frac{7}{2},\ -6 + 7\right) = (1, 1). Check: 2+1=32 + 1 = 3 and 4+3=74 + 3 = 7. This is the crossing point of the two lines on the left panel, and it exists for EVERY right-hand side because M−1M^{-1} exists: change b\mathbf{b}, the lines slide parallel to themselves, and they still cross exactly once.

d) Take any 2×22 \times 2 matrix BB with rows r1\mathbf{r}_1 and r2\mathbf{r}_2. The rows of PBPB are 4r1+6r24\mathbf{r}_1 + 6\mathbf{r}_2 and 2r1+3r22\mathbf{r}_1 + 3\mathbf{r}_2, so the first row of PBPB is ALWAYS twice the second. The identity has rows (1,0)(1, 0) and (0,1)(0, 1), and (1,0)(1, 0) is not twice (0,1)(0, 1). So no BB gives PB=IPB = I and PP has no inverse. Consistently, ad−bc=12−12=0ad - bc = 12 - 12 = 0 and the formula would divide by zero. On the figure the two equations 4x+6y=64x + 6y = 6 and 2x+3y=62x + 3y = 6 are parallel lines: the rows of PP are proportional, the lines have the same slope, and for this right-hand side there is no solution at all. An inverse would have produced one, so it cannot exist.

e) The (1,1)(1,1) entry of the student's matrix times MM is 12×2+1×4=5\frac{1}{2} \times 2 + 1 \times 4 = 5, not 11, so the product is not II and the matrix is not M−1M^{-1}. Inverting a matrix is not inverting its entries: the inverse must undo the whole map, and the formula of part c) shows that every entry of M−1M^{-1} depends on all four entries of MM. Cost on an exam: the whole question, and every part that uses the inverse afterwards.

Exercise 2: The algorithm from [A | I] to [I | A inverse], done cleanly

For a 3×33 \times 3 matrix there is no formula worth memorising in this course. The method is to write AA and II side by side and row reduce the whole block until the LEFT half becomes II: the right half is then A−1A^{-1}.

The figure says why it works. Each row operation is a multiplication on the LEFT by an elementary matrix, applied to both halves at once, so the right half keeps a record of the product of every operation performed.

AIIA⁻¹row operationsEk ... E2 E1 [ A | I ] = [ I | A⁻¹ ]left blockright blockevery row operation multiplies BOTH blocks on the LEFT
  • a) Find A−1A^{-1} for A=(102213112)A = \begin{pmatrix} 1 & 0 & 2 \\ 2 & 1 & 3 \\ 1 & 1 & 2 \end{pmatrix} by reducing [A∣I][A \mid I]. Name every row operation.
  • b) Check your answer by computing AA−1AA^{-1}.
  • c) Use A−1A^{-1} to solve Ax=bA\mathbf{x} = \mathbf{b} for b=(3,5,4)\mathbf{b} = (3, 5, 4) and for b=(1,1,1)\mathbf{b} = (1, 1, 1).
  • d) Explain, with the elementary matrices E1,…,EkE_1, \dots, E_k of your reduction, why the right half ends up equal to A−1A^{-1}.
  • e) Midway through, a student adds column 11 to column 33 to create a zero faster. Explain why the right half is then no longer A−1A^{-1}.
Show the solution

Answers

  • a) A−1=(−12−2−1011−11)A^{-1} = \begin{pmatrix} -1 & 2 & -2 \\ -1 & 0 & 1 \\ 1 & -1 & 1 \end{pmatrix}
  • b) AA−1=IAA^{-1} = I
  • c) x=(−1,1,2)\mathbf{x} = (-1, 1, 2) and x=(−1,0,1)\mathbf{x} = (-1, 0, 1)
  • d) Ek⋯E1A=IE_k \cdots E_1 A = I, so Ek⋯E1=A−1E_k \cdots E_1 = A^{-1}, and that product is exactly what the right half holds.
  • e) A column operation multiplies on the RIGHT, so the two halves no longer record the same product.

a) Start from (102100213010112001)\left(\begin{array}{ccc|ccc} 1 & 0 & 2 & 1 & 0 & 0 \\ 2 & 1 & 3 & 0 & 1 & 0 \\ 1 & 1 & 2 & 0 & 0 & 1 \end{array}\right). R2→R2−2R1R_2 \to R_2 - 2R_1 and R3→R3−R1R_3 \to R_3 - R_1 give (10210001−1−210010−101)\left(\begin{array}{ccc|ccc} 1 & 0 & 2 & 1 & 0 & 0 \\ 0 & 1 & -1 & -2 & 1 & 0 \\ 0 & 1 & 0 & -1 & 0 & 1 \end{array}\right). Then R3→R3−R2R_3 \to R_3 - R_2 gives the third row (0,0,1∣1,−1,1)(0, 0, 1 \mid 1, -1, 1): the left block is now upper triangular with pivots 1,1,11, 1, 1, so the matrix is invertible and the rest is clearing upwards. R2→R2+R3R_2 \to R_2 + R_3 gives (0,1,0∣−1,0,1)(0, 1, 0 \mid -1, 0, 1) and R1→R1−2R3R_1 \to R_1 - 2R_3 gives (1,0,0∣−1,2,−2)(1, 0, 0 \mid -1, 2, -2). The block reads (100−12−2010−1010011−11)\left(\begin{array}{ccc|ccc} 1 & 0 & 0 & -1 & 2 & -2 \\ 0 & 1 & 0 & -1 & 0 & 1 \\ 0 & 0 & 1 & 1 & -1 & 1 \end{array}\right), so A−1=(−12−2−1011−11)A^{-1} = \begin{pmatrix} -1 & 2 & -2 \\ -1 & 0 & 1 \\ 1 & -1 & 1 \end{pmatrix}. Five named operations: that list is where the method marks are.

b) AA−1=(102213112)(−12−2−1011−11)AA^{-1} = \begin{pmatrix} 1 & 0 & 2 \\ 2 & 1 & 3 \\ 1 & 1 & 2 \end{pmatrix}\begin{pmatrix} -1 & 2 & -2 \\ -1 & 0 & 1 \\ 1 & -1 & 1 \end{pmatrix}. Row 11 times the columns: −1+0+2=1-1 + 0 + 2 = 1, 2+0−2=02 + 0 - 2 = 0, −2+0+2=0-2 + 0 + 2 = 0. Row 22: −2−1+3=0-2 - 1 + 3 = 0, 4+0−3=14 + 0 - 3 = 1, −4+1+3=0-4 + 1 + 3 = 0. Row 33: −1−1+2=0-1 - 1 + 2 = 0, 2+0−2=02 + 0 - 2 = 0, −2+1+2=1-2 + 1 + 2 = 1. The product is II. Nine dot products cost about a minute, and a single sign error in the reduction shows up here as a wrong entry, never silently.

c) Multiply Ax=bA\mathbf{x} = \mathbf{b} on the LEFT by A−1A^{-1}: x=A−1b\mathbf{x} = A^{-1}\mathbf{b}. For b=(3,5,4)\mathbf{b} = (3, 5, 4): x=(−3+10−8, −3+0+4, 3−5+4)=(−1,1,2)\mathbf{x} = (-3 + 10 - 8,\ -3 + 0 + 4,\ 3 - 5 + 4) = (-1, 1, 2), and indeed Ax=(−1+4, −2+1+6, −1+1+4)=(3,5,4)A\mathbf{x} = (-1 + 4,\ -2 + 1 + 6,\ -1 + 1 + 4) = (3, 5, 4). For b=(1,1,1)\mathbf{b} = (1, 1, 1): x=(−1+2−2, −1+0+1, 1−1+1)=(−1,0,1)\mathbf{x} = (-1 + 2 - 2,\ -1 + 0 + 1,\ 1 - 1 + 1) = (-1, 0, 1). The inverse pays off when the same AA meets several right-hand sides; for a single system, reducing [A∣b][A \mid \mathbf{b}] is shorter. Note also that A−1bA^{-1}\mathbf{b} and never bA−1\mathbf{b}A^{-1}: a column vector can only be multiplied by A−1A^{-1} on the left, the other product does not even exist.

d) Each operation of part a) is the multiplication on the left by an elementary matrix EiE_i, the matrix obtained by doing that operation to II. Doing all five to the block gives E5E4E3E2E1[A∣I]=[E5⋯E1A∣E5⋯E1]E_5 E_4 E_3 E_2 E_1 [A \mid I] = [E_5 \cdots E_1 A \mid E_5 \cdots E_1], because multiplying a block matrix on the left multiplies each block. The left half is II, so E5⋯E1A=IE_5 \cdots E_1 A = I, which says that E5⋯E1E_5 \cdots E_1 is the inverse of AA (for square matrices, one side suffices). The right half is exactly that product. The identity on the right was only a blank page on which the operations wrote their own product.

e) A column operation is a multiplication on the RIGHT: adding column 11 to column 33 replaces the left block by (current block)F(\text{current block})F for an elementary matrix FF, while the right half is untouched. Suppose the student then finishes with row operations only. The left block reaches II, but what it holds is EAF=IE A F = I, where EE is the product of the row operations, and the right half holds EE alone. From EAF=IEAF = I we get A−1=FEA^{-1} = FE, not EE: the right half is wrong by a factor FF sitting on the LEFT of it, and the answer copied from the page is not the inverse. The algorithm is a statement about left multiplication only. Mixing sides is the thread of this whole chapter: an inverse undoes a matrix from one side, and a computation that switches sides halfway computes something else.

Exercise 3: When the algorithm stops: a matrix with no inverse

The same algorithm also decides whether an inverse exists. You do not need to know in advance: start reducing [A∣I][A \mid I], and if a whole row of the LEFT block becomes zero, stop. The matrix is not invertible, and the right half of that row still has something to say.

Look at the matrix below before reducing: no row is a multiple of another. Keep that in mind for part b).

  • a) Reduce [A∣I][A \mid I] for A=(12−1251370)A = \begin{pmatrix} 1 & 2 & -1 \\ 2 & 5 & 1 \\ 3 & 7 & 0 \end{pmatrix}, naming every operation, until you can stop.
  • b) Read the right half of the zero row as a relation between the rows of AA, and check it.
  • c) Explain why a zero row in the left block proves that AA has no inverse.
  • d) Using part b), give a vector b\mathbf{b} for which Ax=bA\mathbf{x} = \mathbf{b} has no solution, and one for which it has a solution.
  • e) Find a non-zero x\mathbf{x} with Ax=0A\mathbf{x} = \mathbf{0}, and use it to give a second proof that A−1A^{-1} cannot exist.
Show the solution

Answers

  • a) After R2−2R1R_2 - 2R_1, R3−3R1R_3 - 3R_1, R3−R2R_3 - R_2: third row (0,0,0∣−1,−1,1)(0, 0, 0 \mid -1, -1, 1). Stop.
  • b) −R1−R2+R3=0-R_1 - R_2 + R_3 = \mathbf{0}, that is R3=R1+R2R_3 = R_1 + R_2.
  • c) EAEA has a zero row with EE invertible, so no BB gives AB=IAB = I.
  • d) b=(1,1,1)\mathbf{b} = (1, 1, 1): none. b=(1,1,2)\mathbf{b} = (1, 1, 2): solutions exist.
  • e) x=(7,−3,1)\mathbf{x} = (7, -3, 1); if A−1A^{-1} existed, x=A−10=0\mathbf{x} = A^{-1}\mathbf{0} = \mathbf{0}.

a) From (12−1100251010370001)\left(\begin{array}{ccc|ccc} 1 & 2 & -1 & 1 & 0 & 0 \\ 2 & 5 & 1 & 0 & 1 & 0 \\ 3 & 7 & 0 & 0 & 0 & 1 \end{array}\right): R2→R2−2R1R_2 \to R_2 - 2R_1 gives (0,1,3∣−2,1,0)(0, 1, 3 \mid -2, 1, 0) and R3→R3−3R1R_3 \to R_3 - 3R_1 gives (0,1,3∣−3,0,1)(0, 1, 3 \mid -3, 0, 1). Then R3→R3−R2R_3 \to R_3 - R_2 gives (0,0,0∣−1,−1,1)(0, 0, 0 \mid -1, -1, 1). The left block has a zero row and no further operation can create a pivot there, since every other row already has its pivot in an earlier column. The algorithm stops: AA is not invertible. Continuing to clear upwards would earn nothing, and dividing by a zero pivot is the one move that is never allowed.

b) The right half records which combination of the ORIGINAL rows produced the zero row: −R1−R2+R3=0-R_1 - R_2 + R_3 = \mathbf{0}, that is R3=R1+R2R_3 = R_1 + R_2. Check: (1,2,−1)+(2,5,1)=(3,7,0)(1, 2, -1) + (2, 5, 1) = (3, 7, 0). No two rows are proportional, yet the three rows are dependent: dependence is a relation among ALL the rows, and scanning pairs for multiples misses it. This is the use of the right half that students forget: even when the algorithm fails, it hands you the reason.

c) Let E=E3E2E1E = E_3E_2E_1 be the product of the three operations, so EAEA has a zero third row. If some BB satisfied AB=IAB = I, then (EA)B=E(EA)B = E. The third row of (EA)B(EA)B is (zero row)⋅B=0\cdot B = \mathbf{0}, while EE is invertible, a product of invertible elementary matrices, so it cannot have a zero row. Contradiction: no such BB exists. The argument is general: once a zero row appears on the left, no later operation can turn the left block into II.

d) Apply the same three operations to [A∣b][A \mid \mathbf{b}]: the last row becomes (0,0,0∣−b1−b2+b3)(0, 0, 0 \mid -b_1 - b_2 + b_3). The system is consistent exactly when b3=b1+b2b_3 = b_1 + b_2. So b=(1,1,1)\mathbf{b} = (1, 1, 1) gives 0=−10 = -1, no solution, while b=(1,1,2)\mathbf{b} = (1, 1, 2) gives 0=00 = 0 and has solutions (infinitely many, one free variable). An invertible matrix would solve Ax=bA\mathbf{x} = \mathbf{b} for every b\mathbf{b}, by x=A−1b\mathbf{x} = A^{-1}\mathbf{b}, so the first vector is already a proof that A−1A^{-1} does not exist.

e) Continue on the left block only: from x2+3x3=0x_2 + 3x_3 = 0 and x1+2x2−x3=0x_1 + 2x_2 - x_3 = 0, take x3=1x_3 = 1, then x2=−3x_2 = -3, x1=7x_1 = 7. So x=(7,−3,1)\mathbf{x} = (7, -3, 1), and Ax=(7−6−1, 14−15+1, 21−21+0)=0A\mathbf{x} = (7 - 6 - 1,\ 14 - 15 + 1,\ 21 - 21 + 0) = \mathbf{0}. If A−1A^{-1} existed, multiplying Ax=0A\mathbf{x} = \mathbf{0} on the left by A−1A^{-1} would give x=A−10=0\mathbf{x} = A^{-1}\mathbf{0} = \mathbf{0}, which is false. A matrix that sends a non-zero vector to zero has lost information, and nothing can undo a loss.

Exercise 4: A parameter in the matrix: for which k is there an inverse?

When a matrix contains a letter, the algorithm still works, with one extra duty: a pivot that depends on the letter may be zero for some values, and you are only allowed to divide by it once you have said which values are excluded.

Throughout, Ak=(11112313k)A_k = \begin{pmatrix} 1 & 1 & 1 \\ 1 & 2 & 3 \\ 1 & 3 & k \end{pmatrix}.

  • a) Reduce the left block of [Ak∣I][A_k \mid I] to echelon form, naming every operation, and give the third pivot as a function of kk.
  • b) For which values of kk is AkA_k invertible? Justify both directions.
  • c) Compute A6−1A_6^{-1} by finishing the algorithm for k=6k = 6, and check one row of the product.
  • d) Give the third row of Ak−1A_k^{-1} for every admissible kk, and check it against c).
  • e) For the excluded value, give a non-zero x\mathbf{x} with Akx=0A_k\mathbf{x} = \mathbf{0}.
Show the solution

Answers

  • a) R2−R1R_2 - R_1, R3−R1R_3 - R_1, R3−2R2R_3 - 2R_2: third row (0,0,k−5∣1,−2,1)(0, 0, k - 5 \mid 1, -2, 1), pivot k−5k - 5.
  • b) Invertible if and only if k≠5k \neq 5.
  • c) A6−1=(3−31−35−21−21)A_6^{-1} = \begin{pmatrix} 3 & -3 & 1 \\ -3 & 5 & -2 \\ 1 & -2 & 1 \end{pmatrix}
  • d) 1k−5(1,−2,1)\frac{1}{k - 5}(1, -2, 1); for k=6k = 6 it is (1,−2,1)(1, -2, 1).
  • e) k=5k = 5, x=(1,−2,1)\mathbf{x} = (1, -2, 1).

a) R2→R2−R1R_2 \to R_2 - R_1 gives (0,1,2∣−1,1,0)(0, 1, 2 \mid -1, 1, 0) and R3→R3−R1R_3 \to R_3 - R_1 gives (0,2,k−1∣−1,0,1)(0, 2, k - 1 \mid -1, 0, 1). Then R3→R3−2R2R_3 \to R_3 - 2R_2 gives (0,0,k−5∣1,−2,1)(0, 0, k - 5 \mid 1, -2, 1). The letter only ever sat in the last column, so it only reaches the last pivot, which is k−5k - 5. The right half of that row, (1,−2,1)(1, -2, 1), does not depend on kk at all: it records the operations, and the operations were the same for every kk.

b) If k≠5k \neq 5, the pivot k−5k - 5 is non-zero, R3→1k−5R3R_3 \to \frac{1}{k-5}R_3 is a legal operation, and clearing upwards turns the left block into II: AkA_k is invertible. If k=5k = 5, the third row of the left block is zero and the algorithm stops, exactly as in the previous exercise: A5A_5 is not invertible. Both directions are needed, and the step that is lost most often is the sentence before the division: writing R3→1k−5R3R_3 \to \frac{1}{k-5}R_3 without first setting k=5k = 5 aside divides by zero for one value and costs the case analysis, usually half the question.

c) With k=6k = 6 the third row is already (0,0,1∣1,−2,1)(0, 0, 1 \mid 1, -2, 1). R2→R2−2R3R_2 \to R_2 - 2R_3 gives (0,1,0∣−3,5,−2)(0, 1, 0 \mid -3, 5, -2). R1→R1−R3R_1 \to R_1 - R_3 gives (1,1,0∣0,2,−1)(1, 1, 0 \mid 0, 2, -1), then R1→R1−R2R_1 \to R_1 - R_2 gives (1,0,0∣3,−3,1)(1, 0, 0 \mid 3, -3, 1). So A6−1=(3−31−35−21−21)A_6^{-1} = \begin{pmatrix} 3 & -3 & 1 \\ -3 & 5 & -2 \\ 1 & -2 & 1 \end{pmatrix}. Check the third row of A6A6−1A_6A_6^{-1}: (1,3,6)(1, 3, 6) against the three columns gives 3−9+6=03 - 9 + 6 = 0, −3+15−12=0-3 + 15 - 12 = 0, 1−6+6=11 - 6 + 6 = 1, the third row of II. The inverse happens to be symmetric, like A6A_6 itself: the inverse of a symmetric matrix is always symmetric, because (A−1)T=(AT)−1(A^{-1})^T = (A^T)^{-1}.

d) For k≠5k \neq 5, the operation R3→1k−5R3R_3 \to \frac{1}{k-5}R_3 turns the third row into (0,0,1∣1k−5,−2k−5,1k−5)\left(0, 0, 1 \mid \frac{1}{k-5}, \frac{-2}{k-5}, \frac{1}{k-5}\right), and the later operations only change rows 11 and 22. So the third row of Ak−1A_k^{-1} is 1k−5(1,−2,1)\frac{1}{k-5}(1, -2, 1). For k=6k = 6 this is (1,−2,1)(1, -2, 1), the third row found in c). The formula also shows what happens near the excluded value: for k=5.01k = 5.01 the entries are 100,−200,100100, -200, 100. The inverse does not fade out gracefully as k→5k \to 5, it blows up.

e) At k=5k = 5, A5xA_5\mathbf{x} for x=(1,−2,1)\mathbf{x} = (1, -2, 1) is (1−2+1, 1−4+3, 1−6+5)=(0,0,0)(1 - 2 + 1,\ 1 - 4 + 3,\ 1 - 6 + 5) = (0, 0, 0). A non-zero vector sent to zero means A5A_5 cannot be undone, which confirms b) from the other side. For this symmetric matrix the same triple (1,−2,1)(1, -2, 1) is also the relation between the rows recorded in a): R1−2R2+R3=0R_1 - 2R_2 + R_3 = \mathbf{0} when k=5k = 5.

Exercise 5: Properties of the inverse: order, transpose, scalar, powers, and a sum with no rule

Four rules let you invert a matrix built from others without starting over: (AB)−1=B−1A−1(AB)^{-1} = B^{-1}A^{-1}, (AT)−1=(A−1)T(A^T)^{-1} = (A^{-1})^T, (kA)−1=1kA−1(kA)^{-1} = \frac{1}{k}A^{-1} for k≠0k \neq 0, and (An)−1=(A−1)n(A^n)^{-1} = (A^{-1})^n. The fifth expression that looks as if it belonged to the list, (A+B)−1(A + B)^{-1}, has no rule at all.

Throughout, A=(2111)A = \begin{pmatrix} 2 & 1 \\ 1 & 1 \end{pmatrix} and B=(1201)B = \begin{pmatrix} 1 & 2 \\ 0 & 1 \end{pmatrix}.

  • a) Compute A−1A^{-1} and B−1B^{-1}, then (AB)−1(AB)^{-1} from them WITHOUT inverting ABAB. Compare with A−1B−1A^{-1}B^{-1}, and confirm with the 2×22 \times 2 formula.
  • b) Prove that if AA is invertible then so is ATA^T, with (AT)−1=(A−1)T(A^T)^{-1} = (A^{-1})^T.
  • c) Give (3A)−1(3A)^{-1} and (A2)−1(A^2)^{-1} in terms of A−1A^{-1} and compute both.
  • d) Show on these AA and BB that (A+B)−1≠A−1+B−1(A + B)^{-1} \neq A^{-1} + B^{-1}, and give two invertible matrices whose sum has no inverse.
  • e) Find the matrix CC such that (CT−2I)−1=(21−10)(C^T - 2I)^{-1} = \begin{pmatrix} 2 & 1 \\ -1 & 0 \end{pmatrix}.
Show the solution

Answers

  • a) (AB)−1=B−1A−1=(3−5−12)(AB)^{-1} = B^{-1}A^{-1} = \begin{pmatrix} 3 & -5 \\ -1 & 2 \end{pmatrix}, while A−1B−1=(1−3−14)A^{-1}B^{-1} = \begin{pmatrix} 1 & -3 \\ -1 & 4 \end{pmatrix} is wrong.
  • b) AT(A−1)T=(A−1A)T=IA^T(A^{-1})^T = (A^{-1}A)^T = I and (A−1)TAT=(AA−1)T=I(A^{-1})^TA^T = (AA^{-1})^T = I.
  • c) (3A)−1=13A−1(3A)^{-1} = \frac{1}{3}A^{-1}, (A2)−1=(A−1)2=(2−3−35)(A^2)^{-1} = (A^{-1})^2 = \begin{pmatrix} 2 & -3 \\ -3 & 5 \end{pmatrix}
  • d) (A+B)−1=13(2−3−13)(A+B)^{-1} = \frac{1}{3}\begin{pmatrix} 2 & -3 \\ -1 & 3 \end{pmatrix}, a third of A−1+B−1A^{-1} + B^{-1}; I+(−I)=0I + (-I) = 0.
  • e) C=(21−14)C = \begin{pmatrix} 2 & 1 \\ -1 & 4 \end{pmatrix}

a) Both have ad−bc=1ad - bc = 1: A−1=(1−1−12)A^{-1} = \begin{pmatrix} 1 & -1 \\ -1 & 2 \end{pmatrix} and B−1=(1−201)B^{-1} = \begin{pmatrix} 1 & -2 \\ 0 & 1 \end{pmatrix}. Undoing ABAB means undoing AA LAST, since it acted last: (AB)−1=B−1A−1=(1−201)(1−1−12)=(3−5−12)(AB)^{-1} = B^{-1}A^{-1} = \begin{pmatrix} 1 & -2 \\ 0 & 1 \end{pmatrix}\begin{pmatrix} 1 & -1 \\ -1 & 2 \end{pmatrix} = \begin{pmatrix} 3 & -5 \\ -1 & 2 \end{pmatrix}. The other order gives A−1B−1=(1−3−14)A^{-1}B^{-1} = \begin{pmatrix} 1 & -3 \\ -1 & 4 \end{pmatrix}, a different matrix. Confirmation: AB=(2513)AB = \begin{pmatrix} 2 & 5 \\ 1 & 3 \end{pmatrix}, with ad−bc=6−5=1ad - bc = 6 - 5 = 1, so the formula gives (3−5−12)\begin{pmatrix} 3 & -5 \\ -1 & 2 \end{pmatrix}, the first answer. The rule saves real work on larger matrices: two known inverses and one product replace a whole new reduction.

b) Candidate: (A−1)T(A^{-1})^T. Using (XY)T=YTXT(XY)^T = Y^TX^T, AT(A−1)T=(A−1A)T=IT=IA^T(A^{-1})^T = (A^{-1}A)^T = I^T = I and (A−1)TAT=(AA−1)T=IT=I(A^{-1})^TA^T = (AA^{-1})^T = I^T = I. Both products are II, so ATA^T is invertible and, by uniqueness of the inverse, (AT)−1=(A−1)T(A^T)^{-1} = (A^{-1})^T. Note the pattern of the proof, which is the only one this chapter uses: name a candidate, multiply on both sides, conclude by uniqueness. Transposing also reverses order, which is why the two reversals cancel into a clean statement.

c) (3A)(13A−1)=33AA−1=I(3A)\left(\frac{1}{3}A^{-1}\right) = \frac{3}{3}AA^{-1} = I, and the same on the other side, so (3A)−1=13A−1=(13−13−1323)(3A)^{-1} = \frac{1}{3}A^{-1} = \begin{pmatrix} \frac{1}{3} & -\frac{1}{3} \\ -\frac{1}{3} & \frac{2}{3} \end{pmatrix}. The classic slip is 3A−13A^{-1}: the scalar must be inverted too. For the square, A2(A−1)2=A(AA−1)A−1=AA−1=IA^2(A^{-1})^2 = A(AA^{-1})A^{-1} = AA^{-1} = I, so (A2)−1=(A−1)2=(1−1−12)2=(2−3−35)(A^2)^{-1} = (A^{-1})^2 = \begin{pmatrix} 1 & -1 \\ -1 & 2 \end{pmatrix}^2 = \begin{pmatrix} 2 & -3 \\ -3 & 5 \end{pmatrix}. Check: A2=(5332)A^2 = \begin{pmatrix} 5 & 3 \\ 3 & 2 \end{pmatrix}, ad−bc=10−9=1ad - bc = 10 - 9 = 1, and the formula returns (2−3−35)\begin{pmatrix} 2 & -3 \\ -3 & 5 \end{pmatrix}.

d) A+B=(3312)A + B = \begin{pmatrix} 3 & 3 \\ 1 & 2 \end{pmatrix}, with ad−bc=6−3=3ad - bc = 6 - 3 = 3, so (A+B)−1=13(2−3−13)(A + B)^{-1} = \frac{1}{3}\begin{pmatrix} 2 & -3 \\ -1 & 3 \end{pmatrix}. But A−1+B−1=(2−3−13)A^{-1} + B^{-1} = \begin{pmatrix} 2 & -3 \\ -1 & 3 \end{pmatrix}, three times too large: (A+B)(A−1+B−1)=3I(A + B)(A^{-1} + B^{-1}) = 3I, not II. Worse, the sum of two invertible matrices need not be invertible at all: II and −I-I are both invertible and I+(−I)=0I + (-I) = 0. There is no formula for (A+B)−1(A + B)^{-1}; the only method is to add first, then invert the sum.

e) Invert both sides: CT−2I=(21−10)−1C^T - 2I = \begin{pmatrix} 2 & 1 \\ -1 & 0 \end{pmatrix}^{-1}. Here ad−bc=0+1=1ad - bc = 0 + 1 = 1, so CT−2I=(0−112)C^T - 2I = \begin{pmatrix} 0 & -1 \\ 1 & 2 \end{pmatrix}, hence CT=(2−114)C^T = \begin{pmatrix} 2 & -1 \\ 1 & 4 \end{pmatrix} and C=(21−14)C = \begin{pmatrix} 2 & 1 \\ -1 & 4 \end{pmatrix}. Check: CT−2I=(0−112)C^T - 2I = \begin{pmatrix} 0 & -1 \\ 1 & 2 \end{pmatrix} and (0−112)(21−10)=I\begin{pmatrix} 0 & -1 \\ 1 & 2 \end{pmatrix}\begin{pmatrix} 2 & 1 \\ -1 & 0 \end{pmatrix} = I. The order of the peeling matters: the inverse is the outermost operation, so it goes first, then the 2I2I, then the transpose.

Part B: problems and reasoning (/50)

Exercise 6: Elementary matrices: writing A and its inverse as products

An elementary matrix is what you get by performing ONE row operation on the identity: a swap, a scaling by a non-zero number, or the addition of a multiple of one row to another. Multiplying a matrix on the left by an elementary matrix performs that operation on it. Every elementary matrix is invertible, and its inverse is the elementary matrix of the operation that undoes it.

The figure shows the three operations that take A=(0213)A = \begin{pmatrix} 0 & 2 \\ 1 & 3 \end{pmatrix} to II.

AE1 AE2 E1 AIR1 ↔ R2E1R2 → R2 / 2E2R1 → R1 - 3R2E3going back from I to A: the LAST operation is undone FIRST
  • a) Say which operation each matrix performs and give its inverse: F1=(001010100)F_1 = \begin{pmatrix} 0 & 0 & 1 \\ 0 & 1 & 0 \\ 1 & 0 & 0 \end{pmatrix}, F2=(1000−50001)F_2 = \begin{pmatrix} 1 & 0 & 0 \\ 0 & -5 & 0 \\ 0 & 0 & 1 \end{pmatrix}, F3=(100010041)F_3 = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 4 & 1 \end{pmatrix}.
  • b) Write the elementary matrices E1E_1, E2E_2, E3E_3 of the figure and check that E1AE_1A is the second matrix of the chain.
  • c) Deduce A−1A^{-1} as a product of elementary matrices, in the right order, and multiply it out.
  • d) Write AA itself as a product of elementary matrices.
  • e) A student writes A=E1E2E3A = E_1E_2E_3. Compute this product and say what went wrong.
Show the solution

Answers

  • a) F1F_1: R1↔R3R_1 \leftrightarrow R_3, F1−1=F1F_1^{-1} = F_1. F2F_2: R2→−5R2R_2 \to -5R_2, inverse scales by −15-\frac{1}{5}. F3F_3: R3→R3+4R2R_3 \to R_3 + 4R_2, inverse R3→R3−4R2R_3 \to R_3 - 4R_2.
  • b) E1=(0110)E_1 = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}, E2=(10012)E_2 = \begin{pmatrix} 1 & 0 \\ 0 & \frac{1}{2} \end{pmatrix}, E3=(1−301)E_3 = \begin{pmatrix} 1 & -3 \\ 0 & 1 \end{pmatrix}; E1A=(1302)E_1A = \begin{pmatrix} 1 & 3 \\ 0 & 2 \end{pmatrix}.
  • c) A−1=E3E2E1=(−321120)A^{-1} = E_3E_2E_1 = \begin{pmatrix} -\frac{3}{2} & 1 \\ \frac{1}{2} & 0 \end{pmatrix}
  • d) A=E1−1E2−1E3−1=(0110)(1002)(1301)A = E_1^{-1}E_2^{-1}E_3^{-1} = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}\begin{pmatrix} 1 & 0 \\ 0 & 2 \end{pmatrix}\begin{pmatrix} 1 & 3 \\ 0 & 1 \end{pmatrix}
  • e) E1E2E3=(0121−3)≠AE_1E_2E_3 = \begin{pmatrix} 0 & \frac{1}{2} \\ 1 & -3 \end{pmatrix} \neq A: wrong order AND not inverted.

a) To recognise an elementary matrix, compare it with II. F1F_1 has rows 11 and 33 of II exchanged: it swaps R1R_1 and R3R_3, and doing the swap twice restores everything, so F1−1=F1F_1^{-1} = F_1. F2F_2 is II with row 22 multiplied by −5-5: it performs R2→−5R2R_2 \to -5R_2, undone by R2→−15R2R_2 \to -\frac{1}{5}R_2, so F2−1=(1000−150001)F_2^{-1} = \begin{pmatrix} 1 & 0 & 0 \\ 0 & -\frac{1}{5} & 0 \\ 0 & 0 & 1 \end{pmatrix}. F3F_3 is II with 44 times row 22 added to row 33: it performs R3→R3+4R2R_3 \to R_3 + 4R_2, undone by R3→R3−4R2R_3 \to R_3 - 4R_2, so F3−1F_3^{-1} is II with −4-4 in position (3,2)(3, 2). Scaling by 00 never appears in this list: it cannot be undone, which is exactly why it is not an elementary operation.

b) Apply each operation to II: E1=(0110)E_1 = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}, E2=(10012)E_2 = \begin{pmatrix} 1 & 0 \\ 0 & \frac{1}{2} \end{pmatrix}, E3=(1−301)E_3 = \begin{pmatrix} 1 & -3 \\ 0 & 1 \end{pmatrix}. Check: E1A=(0110)(0213)=(1302)E_1A = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}\begin{pmatrix} 0 & 2 \\ 1 & 3 \end{pmatrix} = \begin{pmatrix} 1 & 3 \\ 0 & 2 \end{pmatrix}, which is AA with its rows swapped, as the figure says. Then E2E1A=(1301)E_2E_1A = \begin{pmatrix} 1 & 3 \\ 0 & 1 \end{pmatrix} and E3E2E1A=IE_3E_2E_1A = I. The swap was forced: AA has a 00 in the pivot position of row 11, and a zero there calls for a swap, never for the conclusion that AA is singular.

c) From E3E2E1A=IE_3E_2E_1A = I, the matrix E3E2E1E_3E_2E_1 is A−1A^{-1}: the first operation performed is the one written CLOSEST to AA, so it sits on the right of the product. E2E1=(01120)E_2E_1 = \begin{pmatrix} 0 & 1 \\ \frac{1}{2} & 0 \end{pmatrix} and E3(E2E1)=(1−301)(01120)=(−321120)E_3(E_2E_1) = \begin{pmatrix} 1 & -3 \\ 0 & 1 \end{pmatrix}\begin{pmatrix} 0 & 1 \\ \frac{1}{2} & 0 \end{pmatrix} = \begin{pmatrix} -\frac{3}{2} & 1 \\ \frac{1}{2} & 0 \end{pmatrix}. Check with the 2×22 \times 2 formula: ad−bc=0−2=−2ad - bc = 0 - 2 = -2 and 1−2(3−2−10)=(−321120)\frac{1}{-2}\begin{pmatrix} 3 & -2 \\ -1 & 0 \end{pmatrix} = \begin{pmatrix} -\frac{3}{2} & 1 \\ \frac{1}{2} & 0 \end{pmatrix}. Same matrix.

d) Multiply E3E2E1A=IE_3E_2E_1A = I on the left by E3−1E_3^{-1}, then E2−1E_2^{-1}, then E1−1E_1^{-1}, peeling from the outside in: A=E1−1E2−1E3−1A = E_1^{-1}E_2^{-1}E_3^{-1}. The inverses are the undoing operations, E1−1=E1E_1^{-1} = E_1 (swap), E2−1=(1002)E_2^{-1} = \begin{pmatrix} 1 & 0 \\ 0 & 2 \end{pmatrix} (double row 22), E3−1=(1301)E_3^{-1} = \begin{pmatrix} 1 & 3 \\ 0 & 1 \end{pmatrix} (add 3R23R_2 to R1R_1). Check: (0110)(1002)=(0210)\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}\begin{pmatrix} 1 & 0 \\ 0 & 2 \end{pmatrix} = \begin{pmatrix} 0 & 2 \\ 1 & 0 \end{pmatrix} and (0210)(1301)=(0213)\begin{pmatrix} 0 & 2 \\ 1 & 0 \end{pmatrix}\begin{pmatrix} 1 & 3 \\ 0 & 1 \end{pmatrix} = \begin{pmatrix} 0 & 2 \\ 1 & 3 \end{pmatrix}. This proves on an example what the theory states in general: a square matrix is invertible exactly when it is a product of elementary matrices.

e) E1E2=(01210)E_1E_2 = \begin{pmatrix} 0 & \frac{1}{2} \\ 1 & 0 \end{pmatrix} and E1E2E3=(0121−3)E_1E_2E_3 = \begin{pmatrix} 0 & \frac{1}{2} \\ 1 & -3 \end{pmatrix}, which is not AA. Two errors stack up. The factors must be the INVERSES Ei−1E_i^{-1}, since going from II back to AA means undoing the operations; and the order is reversed, the last operation performed being the first one undone, which is what the arrow at the bottom of the figure says. This is the same reversal as (AB)−1=B−1A−1(AB)^{-1} = B^{-1}A^{-1}, applied to three factors. Expect to lose the whole part for it: a product in the wrong order is simply another matrix.

Exercise 7: Matrix equations: isolate X on the correct side

An equation between matrices is solved like an equation between numbers, with one change that decides everything: you cannot divide, you can only multiply both sides by an inverse, and you must multiply both sides on the SAME side. A factor sitting on the left of XX is removed from the left, a factor on the right from the right.

The figure shows the peeling of PXQ=RPXQ = R. Throughout, A=(2153)A = \begin{pmatrix} 2 & 1 \\ 5 & 3 \end{pmatrix}.

PXQR=P⁻¹ enters on the LEFTQ⁻¹ enters on the RIGHT(of both sides)(of both sides)P⁻¹RQ⁻¹X =
  • a) Solve AX=BAX = B for B=(102111)B = \begin{pmatrix} 1 & 0 & 2 \\ 1 & 1 & 1 \end{pmatrix}, and check.
  • b) Solve YA=CYA = C for C=(1102)C = \begin{pmatrix} 1 & 1 \\ 0 & 2 \end{pmatrix}, and compare with A−1CA^{-1}C. Why can the equation XA=BXA = B, with the BB of part a), not even be written?
  • c) Solve 3X−MX=D3X - MX = D for M=(1112)M = \begin{pmatrix} 1 & 1 \\ 1 & 2 \end{pmatrix} and D=(34)D = \begin{pmatrix} 3 \\ 4 \end{pmatrix}.
  • d) NN is invertible and (AX)−1=N(AX)^{-1} = N. Express XX, first with two inverses, then with one.
  • e) Solve AXA−1=(1002)AXA^{-1} = \begin{pmatrix} 1 & 0 \\ 0 & 2 \end{pmatrix}, and check.
Show the solution

Answers

  • a) X=A−1B=(2−15−32−8)X = A^{-1}B = \begin{pmatrix} 2 & -1 & 5 \\ -3 & 2 & -8 \end{pmatrix}
  • b) Y=CA−1=(−21−104)Y = CA^{-1} = \begin{pmatrix} -2 & 1 \\ -10 & 4 \end{pmatrix}, while A−1C=(31−5−1)A^{-1}C = \begin{pmatrix} 3 & 1 \\ -5 & -1 \end{pmatrix}. XAXA always has 22 columns, BB has 33.
  • c) (3I−M)X=D(3I - M)X = D, X=(711)X = \begin{pmatrix} 7 \\ 11 \end{pmatrix}
  • d) X=A−1N−1=(NA)−1X = A^{-1}N^{-1} = (NA)^{-1}
  • e) X=A−1(1002)A=(−4−3107)X = A^{-1}\begin{pmatrix} 1 & 0 \\ 0 & 2 \end{pmatrix}A = \begin{pmatrix} -4 & -3 \\ 10 & 7 \end{pmatrix}

a) ad−bc=6−5=1ad - bc = 6 - 5 = 1, so A−1=(3−1−52)A^{-1} = \begin{pmatrix} 3 & -1 \\ -5 & 2 \end{pmatrix}. AA sits on the LEFT of XX, so multiply both sides on the left: A−1AX=A−1BA^{-1}AX = A^{-1}B, that is X=A−1B=(3−1−52)(102111)=(2−15−32−8)X = A^{-1}B = \begin{pmatrix} 3 & -1 \\ -5 & 2 \end{pmatrix}\begin{pmatrix} 1 & 0 & 2 \\ 1 & 1 & 1 \end{pmatrix} = \begin{pmatrix} 2 & -1 & 5 \\ -3 & 2 & -8 \end{pmatrix}. Check: AX=(102111)=BAX = \begin{pmatrix} 1 & 0 & 2 \\ 1 & 1 & 1 \end{pmatrix} = B. Note the sizes: XX is 2×32 \times 3, like BB, which the product A−1BA^{-1}B produces automatically.

b) Here AA sits on the RIGHT of YY, so multiply on the right: YAA−1=CA−1YAA^{-1} = CA^{-1}, that is Y=CA−1=(1102)(3−1−52)=(−21−104)Y = CA^{-1} = \begin{pmatrix} 1 & 1 \\ 0 & 2 \end{pmatrix}\begin{pmatrix} 3 & -1 \\ -5 & 2 \end{pmatrix} = \begin{pmatrix} -2 & 1 \\ -10 & 4 \end{pmatrix}. Check: YA=(1102)=CYA = \begin{pmatrix} 1 & 1 \\ 0 & 2 \end{pmatrix} = C. The other product, A−1C=(31−5−1)A^{-1}C = \begin{pmatrix} 3 & 1 \\ -5 & -1 \end{pmatrix}, is a different matrix and does not solve the equation. As for XA=BXA = B: whatever the size of XX, the product XAXA has as many columns as AA, that is 22, while BB has 33. The equation has no solution of any size, and writing X=A−1BX = A^{-1}B for it would be answering another question. Checking sizes before computing catches most side errors in two seconds.

c) Factor XX out ON THE RIGHT of both terms: 3X−MX=(3I−M)X3X - MX = (3I - M)X. The identity is essential, since 3−M3 - M means nothing, a number minus a matrix. 3I−M=(2−1−11)3I - M = \begin{pmatrix} 2 & -1 \\ -1 & 1 \end{pmatrix}, with ad−bc=2−1=1ad - bc = 2 - 1 = 1, so (3I−M)−1=(1112)(3I - M)^{-1} = \begin{pmatrix} 1 & 1 \\ 1 & 2 \end{pmatrix} and X=(3I−M)−1D=(1112)(34)=(711)X = (3I - M)^{-1}D = \begin{pmatrix} 1 & 1 \\ 1 & 2 \end{pmatrix}\begin{pmatrix} 3 \\ 4 \end{pmatrix} = \begin{pmatrix} 7 \\ 11 \end{pmatrix}. Check: MX=(1829)MX = \begin{pmatrix} 18 \\ 29 \end{pmatrix} and 3X−MX=(34)=D3X - MX = \begin{pmatrix} 3 \\ 4 \end{pmatrix} = D.

d) Invert both sides: AX=N−1AX = N^{-1}. Then AA is on the left of XX: X=A−1N−1X = A^{-1}N^{-1}. By the product rule read backwards, A−1N−1=(NA)−1A^{-1}N^{-1} = (NA)^{-1}, a single inverse. The order is the whole content: (AN)−1=N−1A−1(AN)^{-1} = N^{-1}A^{-1} would be a different matrix. A good test is to substitute back: AX=AA−1N−1=N−1AX = AA^{-1}N^{-1} = N^{-1}, whose inverse is NN, as required.

e) Peel from the outside, as on the figure: AA on the left goes by multiplying on the left by A−1A^{-1}, A−1A^{-1} on the right goes by multiplying on the right by AA. So X=A−1(1002)AX = A^{-1}\begin{pmatrix} 1 & 0 \\ 0 & 2 \end{pmatrix}A. First A−1(1002)=(3−2−54)A^{-1}\begin{pmatrix} 1 & 0 \\ 0 & 2 \end{pmatrix} = \begin{pmatrix} 3 & -2 \\ -5 & 4 \end{pmatrix}, then times AA: X=(−4−3107)=(−4−3107)X = \begin{pmatrix} -4 & -3 \\ 10 & 7 \end{pmatrix} = \begin{pmatrix} -4 & -3 \\ 10 & 7 \end{pmatrix}. Check: AX=(21106)AX = \begin{pmatrix} 2 & 1 \\ 10 & 6 \end{pmatrix} and (21106)A−1=(1002)=(1002)\begin{pmatrix} 2 & 1 \\ 10 & 6 \end{pmatrix}A^{-1} = \begin{pmatrix} 1 & 0 \\ 0 & 2 \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & 2 \end{pmatrix}. The tempting shortcut, cancelling AA with A−1A^{-1} to get X=(1002)X = \begin{pmatrix} 1 & 0 \\ 0 & 2 \end{pmatrix}, is exactly the commutation that matrices refuse: AA and A−1A^{-1} are separated by XX and cannot meet.

Exercise 8: Five statements to correct

Each statement below was written by a student revising this chapter, and each is false. Say what is wrong, give the smallest counterexample that settles it, and write the correct statement.

  • a) “If AA is invertible, then A+IA + I is invertible too.”
  • b) “A matrix with a zero on its main diagonal cannot be invertible.”
  • c) “If neither AA nor BB is invertible, then A+BA + B is not invertible either.”
  • d) “A product of elementary matrices is an elementary matrix.”
  • e) “While reducing [A∣I][A \mid I], if a zero lands on the diagonal of the left block, AA is not invertible.”
Show the solution

Answers

  • a) False: A=−IA = -I is invertible and A+I=0A + I = 0 is not.
  • b) False: (0110)\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} is its own inverse. True for TRIANGULAR matrices.
  • c) False: (1000)+(0001)=I\begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix} + \begin{pmatrix} 0 & 0 \\ 0 & 1 \end{pmatrix} = I.
  • d) False: (1021)(1301)=(1327)\begin{pmatrix} 1 & 0 \\ 2 & 1 \end{pmatrix}\begin{pmatrix} 1 & 3 \\ 0 & 1 \end{pmatrix} = \begin{pmatrix} 1 & 3 \\ 2 & 7 \end{pmatrix} is not elementary; the product is INVERTIBLE.
  • e) False: (0111)\begin{pmatrix} 0 & 1 \\ 1 & 1 \end{pmatrix} needs a swap and has inverse (−1110)\begin{pmatrix} -1 & 1 \\ 1 & 0 \end{pmatrix}. Only a zero ROW on the left proves it.

a) FALSE. Invertibility does not survive addition. Take A=−IA = -I: it is invertible, being its own inverse since (−I)(−I)=I(-I)(-I) = I, yet A+I=0A + I = 0 has no inverse. Correct statement: there is no rule for the sum. Whether A+IA + I is invertible has to be decided for that matrix, by reducing it; nothing about A−1A^{-1} settles it.

b) FALSE. P=(0110)P = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} has zeros all along its diagonal, and P2=IP^2 = I, so PP is invertible and equal to its own inverse. The student confused the diagonal with the PIVOTS. Correct statement: a TRIANGULAR matrix is invertible exactly when all its diagonal entries are non-zero, because for a triangular matrix the diagonal entries are the pivots. For a general matrix, the diagonal says nothing until the matrix has been reduced.

c) FALSE. A=(1000)A = \begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix} and B=(0001)B = \begin{pmatrix} 0 & 0 \\ 0 & 1 \end{pmatrix} each have a zero row, so neither is invertible, and A+B=IA + B = I is. Singularity does not survive addition any more than invertibility does in a). Correct statement: products behave well, sums do not. If AA or BB is singular, then ABAB is singular; about A+BA + B, nothing can be said in general.

d) FALSE. E=(1021)E = \begin{pmatrix} 1 & 0 \\ 2 & 1 \end{pmatrix} adds 2R12R_1 to R2R_2 and F=(1301)F = \begin{pmatrix} 1 & 3 \\ 0 & 1 \end{pmatrix} adds 3R23R_2 to R1R_1; both are elementary. Their product EF=(1327)EF = \begin{pmatrix} 1 & 3 \\ 2 & 7 \end{pmatrix} differs from II in two off-diagonal entries and has a diagonal entry 77 with no row swapped or scaled: it is not one row operation applied to II. Correct statement: a product of elementary matrices is INVERTIBLE, and conversely every invertible matrix is such a product. That converse is the useful direction, and it is what the previous exercise built.

e) FALSE. Take A=(0111)A = \begin{pmatrix} 0 & 1 \\ 1 & 1 \end{pmatrix}: the first pivot position holds 00, but R1↔R2R_1 \leftrightarrow R_2 brings a 11 there and the reduction continues to II, giving A−1=(−1110)A^{-1} = \begin{pmatrix} -1 & 1 \\ 1 & 0 \end{pmatrix}. Check: AA−1=(1001)=IAA^{-1} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} = I. A zero in a pivot position is an instruction to look BELOW it for a non-zero entry and swap. Correct statement: AA is not invertible exactly when the reduction of the left block produces a row of zeros, which happens when a pivot column has only zeros at and below the pivot position.

Exercise 9: A matrix code: encoding with K, decoding with its inverse

The idea behind the Hill cipher, simplified: turn a message into numbers (A=1A = 1, B=2B = 2, ..., Z=26Z = 26), cut it into pairs, and send each pair x\mathbf{x} as the pair y=Kx\mathbf{y} = K\mathbf{x}, for a 2×22 \times 2 key matrix KK that both sides know. The receiver must undo KK, which is possible exactly when KK is invertible.

The key here is K=(2312)K = \begin{pmatrix} 2 & 3 \\ 1 & 2 \end{pmatrix}. Choosing ad−bc=1ad - bc = 1 is deliberate, as part d) explains.

textpairs xcode ypairs xA = 1, ..., Z = 26y = Kxx = K⁻¹ysender multiplies on the LEFT by Kreceiver
  • a) Encode the word MATH.
  • b) Find K−1K^{-1} and decode the message 39,20,61,3639, 20, 61, 36.
  • c) An agent proposes the key K′=(2412)K' = \begin{pmatrix} 2 & 4 \\ 1 & 2 \end{pmatrix}. Find two different pairs of letters that it encodes identically, and explain why no receiver could ever decode it.
  • d) Put the two received pairs of part b) as the COLUMNS of a matrix YY. Show that the single product K−1YK^{-1}Y decodes the whole message, and say why a key with integer entries and ad−bc=±1ad - bc = \pm 1 is the practical choice.
  • e) A second office stores its pairs as the ROWS of a matrix PP and sends Z=PKZ = PK. For the word MATH, compute ZZ and decode it. Explain why computing K−1ZK^{-1}Z produces nonsense.
Show the solution

Answers

  • a) 29,15,64,3629, 15, 64, 36
  • b) K−1=(2−3−12)K^{-1} = \begin{pmatrix} 2 & -3 \\ -1 & 2 \end{pmatrix}; pairs (18,1)(18, 1) and (14,11)(14, 11): RANK.
  • c) CA =(3,1)= (3, 1) and AB =(1,2)= (1, 2) both give (10,5)(10, 5); K′K' has no inverse.
  • d) K−1Y=(1814111)K^{-1}Y = \begin{pmatrix} 18 & 14 \\ 1 & 11 \end{pmatrix}; ad−bc=±1ad - bc = \pm 1 keeps K−1K^{-1} in integers.
  • e) Z=(27414876)Z = \begin{pmatrix} 27 & 41 \\ 48 & 76 \end{pmatrix}, P=ZK−1=(131208)P = ZK^{-1} = \begin{pmatrix} 13 & 1 \\ 20 & 8 \end{pmatrix}; K−1ZK^{-1}Z acts on the wrong side.

a) M, A, T, H are 13,1,20,813, 1, 20, 8, so the pairs are (13,1)(13, 1) and (20,8)(20, 8). Then K(131)=(2915)=(2915)K\begin{pmatrix} 13 \\ 1 \end{pmatrix} = \begin{pmatrix} 29 \\ 15 \end{pmatrix} = \begin{pmatrix} 29 \\ 15 \end{pmatrix} and K(208)=(6436)=(6436)K\begin{pmatrix} 20 \\ 8 \end{pmatrix} = \begin{pmatrix} 64 \\ 36 \end{pmatrix} = \begin{pmatrix} 64 \\ 36 \end{pmatrix}. The message sent is 29,15,64,3629, 15, 64, 36. Each code number mixes two letters, so the same letter is no longer always sent as the same number: that is the point of the matrix.

b) ad−bc=4−3=1ad - bc = 4 - 3 = 1, so K−1=(2−3−12)K^{-1} = \begin{pmatrix} 2 & -3 \\ -1 & 2 \end{pmatrix}. Decoding is x=K−1y\mathbf{x} = K^{-1}\mathbf{y}, on the LEFT, because encoding was y=Kx\mathbf{y} = K\mathbf{x} with KK on the left. K−1(3920)=(181)=(181)K^{-1}\begin{pmatrix} 39 \\ 20 \end{pmatrix} = \begin{pmatrix} 18 \\ 1 \end{pmatrix} = \begin{pmatrix} 18 \\ 1 \end{pmatrix} and K−1(6136)=(1411)=(1411)K^{-1}\begin{pmatrix} 61 \\ 36 \end{pmatrix} = \begin{pmatrix} 14 \\ 11 \end{pmatrix} = \begin{pmatrix} 14 \\ 11 \end{pmatrix}. The numbers 18,1,14,1118, 1, 14, 11 spell RANK. A decoded number outside 11 to 2626, or a fraction, would have been the sign of an arithmetic slip.

c) K′K' has ad−bc=4−4=0ad - bc = 4 - 4 = 0 and its columns are proportional. The vector (2,−1)(2, -1) is sent to zero, since K′(2−1)=(00)K'\begin{pmatrix} 2 \\ -1 \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \end{pmatrix}, so any two pairs that differ by (2,−1)(2, -1) are encoded identically. CA is (3,1)(3, 1) and AB is (1,2)(1, 2), which differ by exactly (2,−1)(2, -1): K′(31)=(105)K'\begin{pmatrix} 3 \\ 1 \end{pmatrix} = \begin{pmatrix} 10 \\ 5 \end{pmatrix} and K′(12)=(105)=(105)K'\begin{pmatrix} 1 \\ 2 \end{pmatrix} = \begin{pmatrix} 10 \\ 5 \end{pmatrix} = \begin{pmatrix} 10 \\ 5 \end{pmatrix}. A receiver who gets (10,5)(10, 5) cannot tell which was sent. If K′−1K'^{-1} existed, x=K′−1y\mathbf{x} = K'^{-1}\mathbf{y} would recover a unique pair from every code, so the collision itself proves that K′K' has no inverse: an invertible map never sends two different inputs to the same output.

d) Y=(39612036)Y = \begin{pmatrix} 39 & 61 \\ 20 & 36 \end{pmatrix}, and multiplying a matrix on the left by K−1K^{-1} acts on each column separately, so K−1Y=(2−3−12)(39612036)=(1814111)K^{-1}Y = \begin{pmatrix} 2 & -3 \\ -1 & 2 \end{pmatrix}\begin{pmatrix} 39 & 61 \\ 20 & 36 \end{pmatrix} = \begin{pmatrix} 18 & 14 \\ 1 & 11 \end{pmatrix}, whose columns are the two pairs of b). It is the same computation done once for the whole message. As for the key: with integer entries and ad−bc=±1ad - bc = \pm 1, the formula K−1=1ad−bc(d−b−ca)K^{-1} = \frac{1}{ad - bc}\begin{pmatrix} d & -b \\ -c & a \end{pmatrix} has integer entries too, so decoding never leaves the integers. With ad−bc=2ad - bc = 2, for instance, the inverse has halves in it; decoding still works in exact arithmetic, but any error in transmission produces fractions instead of letters.

e) P=(131208)P = \begin{pmatrix} 13 & 1 \\ 20 & 8 \end{pmatrix} (MA and TH as rows) and Z=PK=(27414876)=(27414876)Z = PK = \begin{pmatrix} 27 & 41 \\ 48 & 76 \end{pmatrix} = \begin{pmatrix} 27 & 41 \\ 48 & 76 \end{pmatrix}. Here KK sits on the RIGHT of PP, so decoding multiplies on the right: P=ZK−1=(27414876)(2−3−12)=(131208)=(131208)P = ZK^{-1} = \begin{pmatrix} 27 & 41 \\ 48 & 76 \end{pmatrix}\begin{pmatrix} 2 & -3 \\ -1 & 2 \end{pmatrix} = \begin{pmatrix} 13 & 1 \\ 20 & 8 \end{pmatrix} = \begin{pmatrix} 13 & 1 \\ 20 & 8 \end{pmatrix}, which reads MATH. The other product, K−1Z=(−90−14669111)K^{-1}Z = \begin{pmatrix} -90 & -146 \\ 69 & 111 \end{pmatrix}, is garbage with negative numbers: it undoes KK from the wrong side, and since PK≠KPPK \neq KP in general, the wrong side undoes nothing. The two offices use the same key and need two different decoding rules, which is the thread of the chapter in one line.

Exercise 10: When an identity hands you the inverse: exam-style proofs

A classic final-exam question gives a polynomial identity satisfied by a matrix and asks you to prove that some matrix is invertible and to name its inverse. The method never divides: it rewrites the identity as (a matrix) times (another matrix) =I= I, and uniqueness of the inverse does the rest.

Powers of the same matrix commute with each other, A2⋅A=A⋅A2A^2 \cdot A = A \cdot A^2, which is what makes such rewritings legitimate on both sides.

  • a) AA is square and A2−3A+2I=0A^2 - 3A + 2I = 0. Prove that AA is invertible and that A−1=12(3I−A)A^{-1} = \frac{1}{2}(3I - A).
  • b) Check that A=(1102)A = \begin{pmatrix} 1 & 1 \\ 0 & 2 \end{pmatrix} satisfies the identity of a), and verify the formula for A−1A^{-1} on it.
  • c) Prove that if N2=0N^2 = 0, then I−NI - N is invertible with inverse I+NI + N. State and prove the analogue when N3=0N^3 = 0.
  • d) Use c) to invert M=(1−2301−4001)M = \begin{pmatrix} 1 & -2 & 3 \\ 0 & 1 & -4 \\ 0 & 0 & 1 \end{pmatrix} without any row reduction.
  • e) A student factors a) as (A−I)(A−2I)=0(A - I)(A - 2I) = 0 and concludes A=IA = I or A=2IA = 2I. Show that this is false, and say which property of numbers failed.
Show the solution

Answers

  • a) A⋅12(3I−A)=12(3I−A)⋅A=IA \cdot \frac{1}{2}(3I - A) = \frac{1}{2}(3I - A) \cdot A = I.
  • b) A2=(1304)A^2 = \begin{pmatrix} 1 & 3 \\ 0 & 4 \end{pmatrix}, identity holds; A−1=(1−12012)A^{-1} = \begin{pmatrix} 1 & -\frac{1}{2} \\ 0 & \frac{1}{2} \end{pmatrix}
  • c) (I−N)(I+N)=I−N2=I(I - N)(I + N) = I - N^2 = I; if N3=0N^3 = 0, (I−N)−1=I+N+N2(I - N)^{-1} = I + N + N^2.
  • d) M−1=(125014001)M^{-1} = \begin{pmatrix} 1 & 2 & 5 \\ 0 & 1 & 4 \\ 0 & 0 & 1 \end{pmatrix}
  • e) The AA of b) is neither II nor 2I2I; a product of non-zero matrices can be zero.

a) Move the 2I2I across and factor AA out on the LEFT: A2−3A=−2IA^2 - 3A = -2I gives A(A−3I)=−2IA(A - 3I) = -2I, that is A⋅12(3I−A)=IA \cdot \frac{1}{2}(3I - A) = I. Factoring on the RIGHT instead gives (A−3I)A=−2I(A - 3I)A = -2I, that is 12(3I−A)⋅A=I\frac{1}{2}(3I - A) \cdot A = I. Both products are II, so AA is invertible and, by uniqueness, A−1=12(3I−A)A^{-1} = \frac{1}{2}(3I - A). Never write A=−2IA−3IA = \frac{-2I}{A - 3I}: there is no such fraction, and the whole proof consists of avoiding it. For square matrices one of the two products would suffice by a theorem of the chapter, but writing both costs one line and closes the argument by the definition itself.

b) A2=(1102)2=(1304)A^2 = \begin{pmatrix} 1 & 1 \\ 0 & 2 \end{pmatrix}^2 = \begin{pmatrix} 1 & 3 \\ 0 & 4 \end{pmatrix}, and A2−3A+2I=(0000)=0A^2 - 3A + 2I = \begin{pmatrix} 0 & 0 \\ 0 & 0 \end{pmatrix} = 0. The formula gives A−1=12(2−101)=(1−12012)A^{-1} = \frac{1}{2}\begin{pmatrix} 2 & -1 \\ 0 & 1 \end{pmatrix} = \begin{pmatrix} 1 & -\frac{1}{2} \\ 0 & \frac{1}{2} \end{pmatrix}, and indeed AA−1=(1001)=IAA^{-1} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} = I. The 2×22 \times 2 formula agrees: ad−bc=2ad - bc = 2 and 12(2−101)\frac{1}{2}\begin{pmatrix} 2 & -1 \\ 0 & 1 \end{pmatrix} is the same matrix.

c) (I−N)(I+N)=I+N−N−N2=I−N2=I(I - N)(I + N) = I + N - N - N^2 = I - N^2 = I, and (I+N)(I−N)=I−N2=I(I + N)(I - N) = I - N^2 = I as well, so (I−N)−1=I+N(I - N)^{-1} = I + N. If N3=0N^3 = 0: (I−N)(I+N+N2)=I+N+N2−N−N2−N3=I−N3=I(I - N)(I + N + N^2) = I + N + N^2 - N - N^2 - N^3 = I - N^3 = I, and the same expansion on the other side, so (I−N)−1=I+N+N2(I - N)^{-1} = I + N + N^2. This is the matrix version of 11−x=1+x+x2+…\frac{1}{1 - x} = 1 + x + x^2 + \dots, except that here the series STOPS because a power of NN is zero, so no question of convergence ever arises.

d) Write M=I−NM = I - N with N=(02−3004000)N = \begin{pmatrix} 0 & 2 & -3 \\ 0 & 0 & 4 \\ 0 & 0 & 0 \end{pmatrix}. Then N2=(008000000)N^2 = \begin{pmatrix} 0 & 0 & 8 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{pmatrix} and N3=0N^3 = 0, as for every strictly upper triangular 3×33 \times 3 matrix. By c), M−1=I+N+N2=(125014001)=(125014001)M^{-1} = I + N + N^2 = \begin{pmatrix} 1 & 2 & 5 \\ 0 & 1 & 4 \\ 0 & 0 & 1 \end{pmatrix} = \begin{pmatrix} 1 & 2 & 5 \\ 0 & 1 & 4 \\ 0 & 0 & 1 \end{pmatrix}. Check the only non-obvious entry of MM−1MM^{-1}, row 11 against column 33: 5−8+3=05 - 8 + 3 = 0. The trap is the (1,3)(1, 3) entry: forgetting N2N^2 gives −3-3 instead of 55, and the check fails immediately.

e) The AA of b) satisfies (A−I)(A−2I)=0(A - I)(A - 2I) = 0, yet it is neither II nor 2I2I. Indeed A−I=(0101)A - I = \begin{pmatrix} 0 & 1 \\ 0 & 1 \end{pmatrix} and A−2I=(−1100)A - 2I = \begin{pmatrix} -1 & 1 \\ 0 & 0 \end{pmatrix} are both non-zero, and their product is (0000)\begin{pmatrix} 0 & 0 \\ 0 & 0 \end{pmatrix}. The property that failed is the one behind every factor-and-solve in school algebra: for numbers, ab=0ab = 0 forces a=0a = 0 or b=0b = 0. For matrices a product of two non-zero factors can vanish, as soon as neither factor is invertible. Cancelling a factor is legal only once that factor is known to be invertible, which is exactly the hypothesis the student never checked.

See also

Looking for a tutor in Montreal?

Get in touch for a first session. We work on problems set at the real level of Montreal assessments.

Site by Studio Squalli