MATH 133 Linear Algebra and Geometry • McGill University, Montreal

MATH 133 practice midterm with full solutions (McGill)

This is a practice midterm for MATH 133, Linear Algebra and Geometry, the first-year course at McGill University. It covers the first six chapters of the course, the usual scope of the midterm: systems of linear equations and Gaussian elimination, homogeneous systems and rank, matrix algebra, inverses and elementary matrices, determinants, the adjugate and Cramer's rule. Eight questions, one hundred points, two parts: four short questions worth ten points each, then four long problems worth fifteen.

Sit it as an exam: ninety minutes on a timer, no calculator, no notes, because that is how the real midterm is written. Every number is chosen to be reduced by hand, and every mark goes to the method, so name each row operation and say along which line each determinant is expanded. Not one question repeats an exercise of the fourteen chapter sets of this site: the gestures are the ones the examiners ask for, the matrices and the situations are new, so the paper measures what you can do and not what you remember having read. Each question has its Answers box for a first quick marking, and the full reasoning underneath for the second pass.

The traps named in the solutions: forgetting that x2+y2x^2 + y^2 changes side, counting parameters as unknowns minus equations, cubing the entries of a matrix, calling every elementary matrix a determinant of plus or minus one, dividing a row by a−2a - 2 and losing a whole line of solutions, putting the inverse on the wrong side of XX, writing det⁡(2M−1)=2det⁡M\det(2M^{-1}) = \frac{2}{\det M} for a 4×44 \times 4, using position vectors for an area, and forgetting that the adjugate is a TRANSPOSE.

8 corrected exercises • 100 points • 90 minutes

Every MATH 133 chapter →

Part A: short questions (/40)

Exercise 1: A circle through three measured points

A surveyor marks three points of a circular fountain on a site plan: P(5,5)P(5, 5), Q(−1,5)Q(-1, 5) and R(6,−2)R(6, -2), in metres, as on the figure. Every circle of the plane has an equation of the form x2+y2+Dx+Ey+F=0x^2 + y^2 + Dx + Ey + F = 0, and the task is to find DD, EE and FF.

-3-2-112345678-4-3-2-11234567P(5, 5)Q(-1, 5)R(6, -2)
  • a) Explain why each point gives a LINEAR equation in DD, EE, FF, although the equation of the circle contains squares. Write the three equations.
  • b) Solve the system by Gaussian elimination, naming every row operation, and check the answer in the three equations.
  • c) Give the centre and the radius of the circle. Is the point (0,−3)(0, -3) on the circle, inside it or outside it?
  • d) Show by row reduction that no circle passes through (0,0)(0, 0), (1,1)(1, 1) and (2,2)(2, 2), and explain the result geometrically.
Show the solution

Answers

  • a) 5D+5E+F=−505D + 5E + F = -50, −D+5E+F=−26-D + 5E + F = -26, 6D−2E+F=−406D - 2E + F = -40
  • b) D=−4D = -4, E=−2E = -2, F=−20F = -20
  • c) (x−2)2+(y−1)2=25(x - 2)^2 + (y - 1)^2 = 25: centre (2,1)(2, 1), radius 55; (0,−3)(0, -3) is inside
  • d) the last row reads 0=−40 = -4: the system is inconsistent, and no circle passes through three collinear points

a) The unknowns are DD, EE and FF, not xx and yy. Once a point is fixed, x2+y2x^2 + y^2 is a NUMBER, and it moves to the right-hand side: Dx+Ey+F=−(x2+y2)Dx + Ey + F = -(x^2 + y^2), which is linear in DD, EE, FF. For P(5,5)P(5, 5): 5D+5E+F=−505D + 5E + F = -50. For Q(−1,5)Q(-1, 5): −D+5E+F=−26-D + 5E + F = -26. For R(6,−2)R(6, -2): 6D−2E+F=−406D - 2E + F = -40. The sign is the first trap: x2+y2x^2 + y^2 changes side, so the constants are negative.

b) The augmented matrix is \left(\begin{array}{ccc|c} 5 & 5 & 1 & -50 \\ -1 & 5 & 1 & -26 \\ 6 & -2 & 1 & -40 \end{array}\right). A pivot of 55 would bring fifths into every row, so start with R1↔R2R_1 \leftrightarrow R_2 and R1→−R1R_1 \to -R_1, which gives the row (1,−5,−1∣26)(1, -5, -1 \mid 26). Then R2→R2−5R1R_2 \to R_2 - 5R_1 gives (0,30,6∣−180)(0, 30, 6 \mid -180) and R3→R3−6R1R_3 \to R_3 - 6R_1 gives (0,28,7∣−196)(0, 28, 7 \mid -196). Both rows have a common factor: R2→16R2R_2 \to \frac{1}{6}R_2 gives (0,5,1∣−30)(0, 5, 1 \mid -30) and R3→17R3R_3 \to \frac{1}{7}R_3 gives (0,4,1∣−28)(0, 4, 1 \mid -28). Now R2→R2−R3R_2 \to R_2 - R_3 gives (0,1,0∣−2)(0, 1, 0 \mid -2), and R3→R3−4R2R_3 \to R_3 - 4R_2 gives (0,0,1∣−20)(0, 0, 1 \mid -20). Finally R1→R1+5R2+R3R_1 \to R_1 + 5R_2 + R_3 gives (1,0,0∣26−10−20)=(1,0,0∣−4)(1, 0, 0 \mid 26 - 10 - 20) = (1, 0, 0 \mid -4). So D=−4D = -4, E=−2E = -2, F=−20F = -20.

Check in the ORIGINAL equations, not in a reduced row: 5(−4)+5(−2)−20=−505(-4) + 5(-2) - 20 = -50, 4−10−20=−264 - 10 - 20 = -26 and −24+4−20=−40-24 + 4 - 20 = -40. All three hold. Note that R2→R2−R3R_2 \to R_2 - R_3 is a legal replacement: one row minus another, the row being replaced keeps coefficient 11.

c) Complete the squares in x2+y2−4x−2y−20=0x^2 + y^2 - 4x - 2y - 20 = 0: (x−2)2−4+(y−1)2−1=20(x - 2)^2 - 4 + (y - 1)^2 - 1 = 20, that is (x−2)2+(y−1)2=25(x - 2)^2 + (y - 1)^2 = 25. Centre (2,1)(2, 1), radius 55. For (0,−3)(0, -3): (0−2)2+(−3−1)2=4+16=20<25(0 - 2)^2 + (-3 - 1)^2 = 4 + 16 = 20 < 25, so the point is inside the circle, at distance 20\sqrt{20} from the centre. The corrected figure shows the circle through the three points.

d) The three points give F=0F = 0, D+E+F=−2D + E + F = -2 and 2D+2E+F=−82D + 2E + F = -8. Order them as \left(\begin{array}{ccc|c} 1 & 1 & 1 & -2 \\ 2 & 2 & 1 & -8 \\ 0 & 0 & 1 & 0 \end{array}\right). R2→R2−2R1R_2 \to R_2 - 2R_1 gives (0,0,−1∣−4)(0, 0, -1 \mid -4), then R3→R3+R2R_3 \to R_3 + R_2 gives (0,0,0∣−4)(0, 0, 0 \mid -4): the row 0=−40 = -4 makes the system inconsistent. Geometrically, the three points lie on the line y=xy = x, and a line meets a circle in at most two points, so no circle can pass through all three. The algebra and the picture say the same thing, which is the check.

-4-3-2-112345678-5-4-3-2-11234567PQRcentrer = 5

Exercise 2: Basic solutions, and the right-hand sides that work

Let A=(1−1022−213−112−4)A = \begin{pmatrix} 1 & -1 & 0 & 2 \\ 2 & -2 & 1 & 3 \\ -1 & 1 & 2 & -4 \end{pmatrix}, a 3×43 \times 4 matrix, and write x=(x1,x2,x3,x4)x = (x_1, x_2, x_3, x_4).

  • a) Reduce AA to reduced row echelon form, naming every operation. Give the rank, and the basic solutions of Ax=0Ax = 0.
  • b) Find the condition on b=(b1,b2,b3)b = (b_1, b_2, b_3) for Ax=bAx = b to be consistent. Decide for b=(1,3,0)b = (1, 3, 0) and for b=(1,2,−1)b = (1, 2, -1).
  • c) For the consistent one, write the general solution as a particular solution plus the general solution of Ax=0Ax = 0.
Show the solution

Answers

  • a) rank A=2\text{rank}\,A = 2; basic solutions (1,1,0,0)(1, 1, 0, 0) and (−2,0,1,1)(-2, 0, 1, 1)
  • b) consistent exactly when 5b1−2b2+b3=05b_1 - 2b_2 + b_3 = 0: no for (1,3,0)(1, 3, 0), yes for (1,2,−1)(1, 2, -1)
  • c) x=(1,0,0,0)+s(1,1,0,0)+t(−2,0,1,1)x = (1, 0, 0, 0) + s(1, 1, 0, 0) + t(-2, 0, 1, 1)

a) R2→R2−2R1R_2 \to R_2 - 2R_1 gives (0,0,1,−1)(0, 0, 1, -1), and R3→R3+R1R_3 \to R_3 + R_1 gives (0,0,2,−2)(0, 0, 2, -2). Then R3→R3−2R2R_3 \to R_3 - 2R_2 gives a zero row. The result \begin{pmatrix} 1 & -1 & 0 & 2 \\ 0 & 0 & 1 & -1 \\ 0 & 0 & 0 & 0 \end{pmatrix} is already reduced: the pivots sit in columns 11 and 33, and the entry above the second pivot is already 00. So rank A=2\text{rank}\,A = 2, the leading variables are x1x_1 and x3x_3, and the free variables are x2=sx_2 = s and x4=tx_4 = t. The rows read x3=tx_3 = t and x1=s−2tx_1 = s - 2t, so x=s(1,1,0,0)+t(−2,0,1,1)x = s(1, 1, 0, 0) + t(-2, 0, 1, 1): the basic solutions are (1,1,0,0)(1, 1, 0, 0) and (−2,0,1,1)(-2, 0, 1, 1). Check the second: A(−2,0,1,1)=(−2+2,−4+1+3,2+2−4)=(0,0,0)A(-2, 0, 1, 1) = (-2 + 2, -4 + 1 + 3, 2 + 2 - 4) = (0, 0, 0).

The trap is to count 4−3=14 - 3 = 1 parameter, unknowns minus equations. The number of parameters is unknowns minus RANK, 4−2=24 - 2 = 2, because the third equation is a combination of the first two and brings no new constraint.

b) Carry bb through the same operations. After R2→R2−2R1R_2 \to R_2 - 2R_1 and R3→R3+R1R_3 \to R_3 + R_1, the last column holds b1b_1, b2−2b1b_2 - 2b_1 and b3+b1b_3 + b_1. After R3→R3−2R2R_3 \to R_3 - 2R_2, the zero row carries b3+b1−2(b2−2b1)=5b1−2b2+b3b_3 + b_1 - 2(b_2 - 2b_1) = 5b_1 - 2b_2 + b_3. The system is consistent exactly when this number is 00. For (1,3,0)(1, 3, 0): 5−6+0=−1≠05 - 6 + 0 = -1 \neq 0, inconsistent. For (1,2,−1)(1, 2, -1): 5−4−1=05 - 4 - 1 = 0, consistent. In other words, the columns of AA span only the plane 5b1−2b2+b3=05b_1 - 2b_2 + b_3 = 0 of R3\mathbb{R}^3, and a right-hand side off that plane is not a combination of the columns. Every column must satisfy the condition, which is a free check: column 22, (−1,−2,1)(-1, -2, 1), gives −5+4+1=0-5 + 4 + 1 = 0.

c) With b=(1,2,−1)b = (1, 2, -1) the last column becomes (1,0,0)(1, 0, 0), so the reduced system is x1−x2+2x4=1x_1 - x_2 + 2x_4 = 1 and x3−x4=0x_3 - x_4 = 0. Setting s=t=0s = t = 0 gives p=(1,0,0,0)p = (1, 0, 0, 0), and x=(1,0,0,0)+s(1,1,0,0)+t(−2,0,1,1)x = (1, 0, 0, 0) + s(1, 1, 0, 0) + t(-2, 0, 1, 1). The particular solution could have been seen at once: bb is exactly the first column of AA, so Ae1=bAe_1 = b. The two basic solutions are the same as in a), because the homogeneous part does not depend on bb.

Exercise 3: Two rectangular matrices, two products, one polynomial

Let A=(2−10311)A = \begin{pmatrix} 2 & -1 \\ 0 & 3 \\ 1 & 1 \end{pmatrix} and B=(120−114)B = \begin{pmatrix} 1 & 2 & 0 \\ -1 & 1 & 4 \end{pmatrix}.

  • a) Sizes only: which of ABAB, BABA, A+BTA + B^T, ABTAB^T and ATBTA^TB^T exist? Give the size of each one that does.
  • b) Compute C=BAC = BA.
  • c) Without computing all of ABAB, find tr(AB)\text{tr}(AB) and compare it with tr(C)\text{tr}(C).
  • d) Check that C2=10C−6IC^2 = 10C - 6I. Use this identity to compute C3C^3 with no product of two matrices.
Show the solution

Answers

  • a) ABAB is 3×33 \times 3, BABA is 2×22 \times 2, A+BTA + B^T is 3×23 \times 2, ATBTA^TB^T is 2×22 \times 2; ABTAB^T does not exist
  • b) C=(2528)C = \begin{pmatrix} 2 & 5 \\ 2 & 8 \end{pmatrix}
  • c) diagonal of ABAB: 3,3,43, 3, 4, so tr(AB)=10=tr(BA)\text{tr}(AB) = 10 = \text{tr}(BA)
  • d) C2=(14502074)C^2 = \begin{pmatrix} 14 & 50 \\ 20 & 74 \end{pmatrix} and C3=94C−60I=(128470188692)C^3 = 94C - 60I = \begin{pmatrix} 128 & 470 \\ 188 & 692 \end{pmatrix}

a) AA is 3×23 \times 2 and BB is 2×32 \times 3. ABAB: inner sizes 22 and 22 agree, result 3×33 \times 3. BABA: inner sizes 33 and 33, result 2×22 \times 2. BTB^T is 3×23 \times 2, the same size as AA, so A+BTA + B^T exists and is 3×23 \times 2. ABTAB^T is (3×2)(3×2)(3 \times 2)(3 \times 2): inner sizes 22 and 33 disagree, it does not exist. ATBTA^TB^T is (2×3)(3×2)(2 \times 3)(3 \times 2), a 2×22 \times 2 matrix, and it is (BA)T(BA)^T by the reversal rule, not (AB)T(AB)^T, which is 3×33 \times 3.

b) Row ii of BB times column jj of AA. Row 11, (1,2,0)(1, 2, 0): with column 11, (2,0,1)(2, 0, 1), it gives 22; with column 22, (−1,3,1)(-1, 3, 1), it gives −1+6=5-1 + 6 = 5. Row 22, (−1,1,4)(-1, 1, 4): −2+0+4=2-2 + 0 + 4 = 2 and 1+3+4=81 + 3 + 4 = 8. So C=(2528)C = \begin{pmatrix} 2 & 5 \\ 2 & 8 \end{pmatrix}.

c) The trace only uses the diagonal, so compute three entries and nothing else. (AB)11(AB)_{11} = row 11 of AA times column 11 of BB =(2,−1)⋅(1,−1)=3= (2, -1) \cdot (1, -1) = 3; (AB)22=(0,3)⋅(2,1)=3(AB)_{22} = (0, 3) \cdot (2, 1) = 3; (AB)33=(1,1)⋅(0,4)=4(AB)_{33} = (1, 1) \cdot (0, 4) = 4. So tr(AB)=10\text{tr}(AB) = 10, and tr(C)=2+8=10\text{tr}(C) = 2 + 8 = 10 as well. This is the rule tr(AB)=tr(BA)\text{tr}(AB) = \text{tr}(BA), which holds even here where ABAB and BABA do not have the same size; the matrices themselves are about as different as two matrices can be.

d) C2=(2528)(2528)=(14502074)=(14502074)C^2 = \begin{pmatrix} 2 & 5 \\ 2 & 8 \end{pmatrix}\begin{pmatrix} 2 & 5 \\ 2 & 8 \end{pmatrix} = \begin{pmatrix} 14 & 50 \\ 20 & 74 \end{pmatrix} = \begin{pmatrix} 14 & 50 \\ 20 & 74 \end{pmatrix}, and 10C−6I=(14502074)10C - 6I = \begin{pmatrix} 14 & 50 \\ 20 & 74 \end{pmatrix}, the same matrix. The two numbers are not a coincidence: 1010 is the trace of CC and 6=16−106 = 16 - 10 is det⁡C\det C, and every 2×22 \times 2 matrix satisfies C2=(tr C) C−(det⁡C) IC^2 = (\text{tr}\,C)\,C - (\det C)\,I.

Now multiply the identity by CC: C3=10C2−6C=10(10C−6I)−6C=94C−60I=(128470188692)=(128470188692)C^3 = 10C^2 - 6C = 10(10C - 6I) - 6C = 94C - 60I = \begin{pmatrix} 128 & 470 \\ 188 & 692 \end{pmatrix} = \begin{pmatrix} 128 & 470 \\ 188 & 692 \end{pmatrix}. Check one entry the long way: row 11 of CC times column 11 of C2C^2 is 2(14)+5(20)=1282(14) + 5(20) = 128. The trap is to cube the entries, which would give 88 in the top left corner.

Exercise 4: True or false, justify

Say whether each statement is TRUE or FALSE. A true statement needs a short proof valid for every matrix concerned; a false one needs an explicit counterexample with small numbers, and then the correct statement. All matrices are square unless said otherwise.

  • a) If every row of a 3×33 \times 3 matrix AA adds up to 00, then det⁡A=0\det A = 0.
  • b) If AA is invertible, then ATAA^TA is invertible.
  • c) Every elementary matrix has determinant 11 or −1-1.
  • d) If a system of three linear equations in three unknowns has two different solutions, then the determinant of its coefficient matrix is 00.
  • e) If adj(A)\text{adj}(A) is the zero matrix, then AA is the zero matrix.
Show the solution

Answers

  • a) TRUE: A(1,1,1)=0A(1, 1, 1) = 0 with (1,1,1)≠0(1, 1, 1) \neq 0
  • b) TRUE: det⁡(ATA)=(det⁡A)2≠0\det(A^TA) = (\det A)^2 \neq 0
  • c) FALSE: R2→5R2R_2 \to 5R_2 gives diag(1,5)\text{diag}(1, 5), determinant 55
  • d) TRUE: det⁡A≠0\det A \neq 0 would force the single solution A−1bA^{-1}b
  • e) FALSE: A=diag(1,0,0)A = \text{diag}(1, 0, 0) is not zero and adj(A)=0\text{adj}(A) = 0

a) TRUE. Row ii of AA times the vector u=(1,1,1)u = (1, 1, 1) is the sum of row ii, which is 00, so Au=0Au = 0 with u≠0u \neq 0. A matrix with a nontrivial null vector is not invertible, so det⁡A=0\det A = 0. Second proof, with the determinant rules: the column operation C1→C1+C2+C3C_1 \to C_1 + C_2 + C_3 does not change the determinant and produces a zero column. The size 33 plays no role: the same holds for every nn.

b) TRUE. det⁡(ATA)=det⁡(AT)det⁡A=(det⁡A)2\det(A^TA) = \det(A^T)\det A = (\det A)^2, which is non-zero when det⁡A≠0\det A \neq 0. One can even name the inverse: (ATA)−1=A−1(AT)−1=A−1(A−1)T(A^TA)^{-1} = A^{-1}(A^T)^{-1} = A^{-1}(A^{-1})^T, by the reversal rule. The hypothesis matters for rectangular matrices: for a 3×23 \times 2 matrix AA, the 3×33 \times 3 matrix AATAA^T is never invertible, since its rank is at most 22.

c) FALSE. The operation R2→5R2R_2 \to 5R_2 applied to I2I_2 gives E=(1005)E = \begin{pmatrix} 1 & 0 \\ 0 & 5 \end{pmatrix}, an elementary matrix with det⁡E=5\det E = 5. Correct statement: a swap has determinant −1-1, a scaling by c≠0c \neq 0 has determinant cc, a replacement Ri→Ri+cRjR_i \to R_i + cR_j has determinant 11. What IS true of every elementary matrix is that its determinant is non-zero, which is why every elementary matrix is invertible.

d) TRUE. Write the system Ax=bAx = b. If det⁡A≠0\det A \neq 0, then AA is invertible and x=A−1bx = A^{-1}b is the ONLY solution. Two different solutions therefore force det⁡A=0\det A = 0. In fact the system then has infinitely many solutions: if p≠qp \neq q both work, so does p+t(q−p)p + t(q - p) for every tt.

e) FALSE. Take A=(100000000)A = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{pmatrix}. Each cofactor is plus or minus a 2×22 \times 2 minor, and every 2×22 \times 2 submatrix of AA contains a zero row or a zero column, so all nine cofactors vanish and adj(A)=0\text{adj}(A) = 0, while A≠0A \neq 0. Correct statement: for n≥3n \ge 3, adj(A)=0\text{adj}(A) = 0 happens exactly when every (n−1)×(n−1)(n-1) \times (n-1) minor is zero, which a non-zero matrix of small rank can do. For 2×22 \times 2 matrices the statement is true, since adj(abcd)=(d−b−ca)\text{adj}\begin{pmatrix} a & b \\ c & d \end{pmatrix} = \begin{pmatrix} d & -b \\ -c & a \end{pmatrix} contains every entry of AA up to sign.

Part B: long problems (/60)

Exercise 5: A system whose parameter sits in two places

For every real number aa, consider the system {x+y−z=12x+3y+az=3x+ay+3z=2\begin{cases} x + y - z = 1 \\ 2x + 3y + az = 3 \\ x + ay + 3z = 2 \end{cases} in the unknowns xx, yy, zz.

  • a) Reduce the augmented matrix to row echelon form, naming every operation, without ever dividing by an expression in aa. Write the last row in factored form.
  • b) Find every value of aa for which the system has no solution, exactly one solution, infinitely many solutions.
  • c) Solve the system for the value of aa that gives infinitely many solutions, and check your answer in the third equation.
  • d) Give the unique solution in terms of aa when it exists, and check it for a=0a = 0 in the original system.
  • e) A student divides the last row by a−2a - 2 at once and announces a unique solution for every a≠−3a \neq -3. What does his answer claim for a=2a = 2? Is that point a solution? Is it the only one?
Show the solution

Answers

  • a) last row (0,0,−(a+3)(a−2)∣−(a−2))(0, 0, -(a + 3)(a - 2) \mid -(a - 2))
  • b) no solution for a=−3a = -3; infinitely many for a=2a = 2; exactly one for a≠2a \neq 2 and a≠−3a \neq -3
  • c) a=2a = 2: (x,y,z)=(0,1,0)+t(5,−4,1)(x, y, z) = (0, 1, 0) + t(5, -4, 1)
  • d) x=1x = 1, y=z=1a+3y = z = \frac{1}{a + 3}; for a=0a = 0, (1,13,13)(1, \frac{1}{3}, \frac{1}{3})
  • e) he claims the single point (1,15,15)(1, \frac{1}{5}, \frac{1}{5}); it is a solution (t=15t = \frac{1}{5}), but a whole line of solutions is lost

a) The augmented matrix is \left(\begin{array}{ccc|c} 1 & 1 & -1 & 1 \\ 2 & 3 & a & 3 \\ 1 & a & 3 & 2 \end{array}\right). R2→R2−2R1R_2 \to R_2 - 2R_1 gives (0,1,a+2∣1)(0, 1, a + 2 \mid 1), and R3→R3−R1R_3 \to R_3 - R_1 gives (0,a−1,4∣1)(0, a - 1, 4 \mid 1). The second pivot is the 11 of row 22, a number, so the parameter in row 33 is cleared with R3→R3−(a−1)R2R_3 \to R_3 - (a - 1)R_2. That operation MULTIPLIES by a−1a - 1, it never divides, so it is legal for every aa, including a=1a = 1, where it simply does nothing. It gives (0,0,4−(a−1)(a+2)∣1−(a−1))(0, 0, 4 - (a - 1)(a + 2) \mid 1 - (a - 1)).

Expand and factor: 4−(a2+a−2)=−a2−a+6=−(a2+a−6)=−(a+3)(a−2)4 - (a^2 + a - 2) = -a^2 - a + 6 = -(a^2 + a - 6) = -(a + 3)(a - 2), and 1−(a−1)=2−a=−(a−2)1 - (a - 1) = 2 - a = -(a - 2). The echelon form is \left(\begin{array}{ccc|c} 1 & 1 & -1 & 1 \\ 0 & 1 & a + 2 & 1 \\ 0 & 0 & -(a + 3)(a - 2) & -(a - 2) \end{array}\right). Leaving the last row factored is what makes b) a reading exercise instead of a computation.

b) If a≠2a \neq 2 and a≠−3a \neq -3, the third pivot −(a+3)(a−2)-(a + 3)(a - 2) is non-zero: three pivots for three unknowns, exactly one solution. If a=2a = 2, the last row is (0,0,0∣0)(0, 0, 0 \mid 0): the system is consistent with rank 22, so it has 3−2=13 - 2 = 1 parameter and infinitely many solutions. If a=−3a = -3, the last row is (0,0,0∣5)(0, 0, 0 \mid 5), the equation 0=50 = 5: no solution. Every real aa lands in exactly one of the three cases, which is what the marker checks.

c) For a=2a = 2 the system reduces to x+y−z=1x + y - z = 1 and y+4z=1y + 4z = 1. With z=tz = t free: y=1−4ty = 1 - 4t and x=1−y+z=1−(1−4t)+t=5tx = 1 - y + z = 1 - (1 - 4t) + t = 5t. So (x,y,z)=(5t,1−4t,t)=(0,1,0)+t(5,−4,1)(x, y, z) = (5t, 1 - 4t, t) = (0, 1, 0) + t(5, -4, 1), a line of solutions. Check in the third equation with a=2a = 2: x+2y+3z=5t+2−8t+3t=2x + 2y + 3z = 5t + 2 - 8t + 3t = 2 for every tt.

d) For a≠2,−3a \neq 2, -3, dividing by −(a+3)(a−2)-(a + 3)(a - 2) is now legal: z=a−2(a+3)(a−2)=1a+3z = \frac{a - 2}{(a + 3)(a - 2)} = \frac{1}{a + 3}. Back substitution: y=1−(a+2)z=(a+3)−(a+2)a+3=1a+3y = 1 - (a + 2)z = \frac{(a + 3) - (a + 2)}{a + 3} = \frac{1}{a + 3}, and x=1−y+z=1x = 1 - y + z = 1. For a=0a = 0: (1,13,13)(1, \frac{1}{3}, \frac{1}{3}), and in the original system 1+13−13=11 + \frac{1}{3} - \frac{1}{3} = 1, 2+1+0=32 + 1 + 0 = 3, 1+0+1=21 + 0 + 1 = 2. All three hold.

e) After dividing by a−2a - 2 the last row becomes −(a+3)z=−1-(a + 3)z = -1, so the student announces z=1a+3z = \frac{1}{a + 3} and the formulas of d) for every a≠−3a \neq -3. At a=2a = 2 that claims the single solution (1,15,15)(1, \frac{1}{5}, \frac{1}{5}). It IS a solution: it is the point t=15t = \frac{1}{5} of the line of c). But it is not the only one, and the answer loses every other point of that line. The division was a division by zero exactly at a=2a = 2, which is the one value where something interesting happens; on the exam this costs the whole infinitely many case.

Exercise 6: Inverting a 3 by 3, and using the inverse on the correct side

Let A=(1−122−13−12−2)A = \begin{pmatrix} 1 & -1 & 2 \\ 2 & -1 & 3 \\ -1 & 2 & -2 \end{pmatrix}.

  • a) Find A−1A^{-1} by reducing [A∣I][A \mid I], naming every row operation.
  • b) Check your answer by computing AA−1AA^{-1}.
  • c) Solve Ax=(1,1,1)Ax = (1, 1, 1) using A−1A^{-1}.
  • d) Find the matrix XX such that XA=(100001)XA = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 0 & 1 \end{pmatrix}. Give its size first, and explain why A−1(100001)A^{-1}\begin{pmatrix} 1 & 0 & 0 \\ 0 & 0 & 1 \end{pmatrix} cannot be the answer.
  • e) Let E1E_1 and E2E_2 be the elementary matrices of the first two operations of your reduction. Write them, compute E2E1E_2E_1, check that E2E1AE_2E_1A is the matrix you had after two steps, and give (E2E1)−1(E_2E_1)^{-1}.
Show the solution

Answers

  • a) A−1=(−42−11013−11)A^{-1} = \begin{pmatrix} -4 & 2 & -1 \\ 1 & 0 & 1 \\ 3 & -1 & 1 \end{pmatrix}
  • b) AA−1=IAA^{-1} = I
  • c) x=(−3,2,3)x = (-3, 2, 3)
  • d) XX is 2×32 \times 3, X=(−42−13−11)X = \begin{pmatrix} -4 & 2 & -1 \\ 3 & -1 & 1 \end{pmatrix}
  • e) E2E1=(100−210101)E_2E_1 = \begin{pmatrix} 1 & 0 & 0 \\ -2 & 1 & 0 \\ 1 & 0 & 1 \end{pmatrix}, (E2E1)−1=(100210−101)(E_2E_1)^{-1} = \begin{pmatrix} 1 & 0 & 0 \\ 2 & 1 & 0 \\ -1 & 0 & 1 \end{pmatrix}

a) Start from \left(\begin{array}{ccc|ccc} 1 & -1 & 2 & 1 & 0 & 0 \\ 2 & -1 & 3 & 0 & 1 & 0 \\ -1 & 2 & -2 & 0 & 0 & 1 \end{array}\right). R2→R2−2R1R_2 \to R_2 - 2R_1 gives (0,1,−1∣−2,1,0)(0, 1, -1 \mid -2, 1, 0) and R3→R3+R1R_3 \to R_3 + R_1 gives (0,1,0∣1,0,1)(0, 1, 0 \mid 1, 0, 1). Then R3→R3−R2R_3 \to R_3 - R_2 gives (0,0,1∣3,−1,1)(0, 0, 1 \mid 3, -1, 1): the left block is triangular with pivots 1,1,11, 1, 1, so AA is invertible. Upwards: R2→R2+R3R_2 \to R_2 + R_3 gives (0,1,0∣1,0,1)(0, 1, 0 \mid 1, 0, 1), R1→R1−2R3R_1 \to R_1 - 2R_3 gives (1,−1,0∣−5,2,−2)(1, -1, 0 \mid -5, 2, -2), and R1→R1+R2R_1 \to R_1 + R_2 gives (1,0,0∣−4,2,−1)(1, 0, 0 \mid -4, 2, -1). The right block is A−1=(−42−11013−11)A^{-1} = \begin{pmatrix} -4 & 2 & -1 \\ 1 & 0 & 1 \\ 3 & -1 & 1 \end{pmatrix}. Every entry is an integer, as it must be: the pivots were all 11, so det⁡A=1\det A = 1.

b) Row 11 of AA, (1,−1,2)(1, -1, 2), against the three columns of A−1A^{-1}: −4−1+6=1-4 - 1 + 6 = 1, 2−0−2=02 - 0 - 2 = 0, −1−1+2=0-1 - 1 + 2 = 0. Row 22, (2,−1,3)(2, -1, 3): −8−1+9=0-8 - 1 + 9 = 0, 4−0−3=14 - 0 - 3 = 1, −2−1+3=0-2 - 1 + 3 = 0. Row 33, (−1,2,−2)(-1, 2, -2): 4+2−6=04 + 2 - 6 = 0, −2+0+2=0-2 + 0 + 2 = 0, 1+2−2=11 + 2 - 2 = 1. So AA−1=IAA^{-1} = I. For a square matrix one side is enough: AB=IAB = I forces BA=IBA = I.

c) x=A−1(1,1,1)x = A^{-1}(1, 1, 1), and multiplying by (1,1,1)(1, 1, 1) adds the entries of each row of A−1A^{-1}: x=(−4+2−1,1+0+1,3−1+1)=(−3,2,3)x = (-4 + 2 - 1, 1 + 0 + 1, 3 - 1 + 1) = (-3, 2, 3). Check: A(−3,2,3)=(−3−2+6,−6−2+9,3+4−6)=(1,1,1)A(-3, 2, 3) = (-3 - 2 + 6, -6 - 2 + 9, 3 + 4 - 6) = (1, 1, 1).

d) Call the right-hand side BB; it is 2×32 \times 3. In XA=BXA = B the product XAXA is 2×32 \times 3 only if XX is 2×32 \times 3. The factor AA sits on the RIGHT of XX, so it is removed from the right: XAA−1=BA−1XAA^{-1} = BA^{-1}, that is X=BA−1X = BA^{-1}. Since the rows of BB are e1Te_1^T and e3Te_3^T, the rows of BA−1BA^{-1} are rows 11 and 33 of A−1A^{-1}: X=(−42−13−11)X = \begin{pmatrix} -4 & 2 & -1 \\ 3 & -1 & 1 \end{pmatrix}. Check the first row of XAXA: (−4,2,−1)(-4, 2, -1) against the columns of AA gives −4+4+1=1-4 + 4 + 1 = 1, 4−2−2=04 - 2 - 2 = 0 and −8+6+2=0-8 + 6 + 2 = 0. The product A−1BA^{-1}B is (3×3)(2×3)(3 \times 3)(2 \times 3), whose inner sizes disagree: it does not exist, which settles which side the inverse goes on before any entry is computed.

e) Each elementary matrix is the identity with the operation applied: R2→R2−2R1R_2 \to R_2 - 2R_1 gives E1=(100−210001)E_1 = \begin{pmatrix} 1 & 0 & 0 \\ -2 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix} and R3→R3+R1R_3 \to R_3 + R_1 gives E2=(100010101)E_2 = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 1 & 0 & 1 \end{pmatrix}. Then E2E1=(100−210101)E_2E_1 = \begin{pmatrix} 1 & 0 & 0 \\ -2 & 1 & 0 \\ 1 & 0 & 1 \end{pmatrix}, and E2E1A=(1−1201−1010)E_2E_1A = \begin{pmatrix} 1 & -1 & 2 \\ 0 & 1 & -1 \\ 0 & 1 & 0 \end{pmatrix}, exactly the left block after the first two steps. The inverse undoes the operations in the REVERSE order: (E2E1)−1=E1−1E2−1(E_2E_1)^{-1} = E_1^{-1}E_2^{-1}, with E1−1E_1^{-1} the operation R2→R2+2R1R_2 \to R_2 + 2R_1 and E2−1E_2^{-1} the operation R3→R3−R1R_3 \to R_3 - R_1, which gives \begin{pmatrix} 1 & 0 & 0 \\ 2 & 1 & 0 \\ -1 & 0 & 1 \end{pmatrix}. Multiplying it by E2E1E_2E_1 gives II, which is the check.

Exercise 7: A 4 by 4 determinant, its consequences, and an area on a grid

Let M=(21−134215−20316304)M = \begin{pmatrix} 2 & 1 & -1 & 3 \\ 4 & 2 & 1 & 5 \\ -2 & 0 & 3 & 1 \\ 6 & 3 & 0 & 4 \end{pmatrix}. The figure shows the parallelogram ABCDABCD with A(−1,0)A(-1, 0), B(3,1)B(3, 1), C(4,4)C(4, 4) and D(0,3)D(0, 3).

-4-3-2-1123456-112345A(-1, 0)B(3, 1)CD(0, 3)
  • a) Compute det⁡M\det M. Use row operations to empty the first column, say what each one does to the determinant, then expand.
  • b) Deduce det⁡(−M)\det(-M), det⁡(2M−1)\det(2M^{-1}) and det⁡(M−1MT)\det(M^{-1}M^T).
  • c) Compute the area of the parallelogram ABCDABCD as a 2×22 \times 2 determinant. A student uses the position vectors of BB and DD instead: what does he get, and what has he computed?
  • d) Give the area of triangle ABDABD. For which kk does the point Dk=(k,2)D_k = (k, 2) make triangle ABDkABD_k flat, and what does the figure then show?
Show the solution

Answers

  • a) det⁡M=2×12=24\det M = 2 \times 12 = 24
  • b) det⁡(−M)=24\det(-M) = 24, det⁡(2M−1)=23\det(2M^{-1}) = \frac{2}{3}, det⁡(M−1MT)=1\det(M^{-1}M^T) = 1
  • c) area =∣det⁡(4113)∣=11= |\det\begin{pmatrix} 4 & 1 \\ 1 & 3 \end{pmatrix}| = 11; the student gets 99, the area of the parallelogram built on OO, BB, DD
  • d) 112\frac{11}{2}; k=7k = 7, and D7=(7,2)D_7 = (7, 2) lies on the line ABAB

a) Column 11 has no zero, but its entries are all multiples of the pivot 22. R2→R2−2R1R_2 \to R_2 - 2R_1 gives (0,0,3,−1)(0, 0, 3, -1), R3→R3+R1R_3 \to R_3 + R_1 gives (0,1,2,4)(0, 1, 2, 4) and R4→R4−3R1R_4 \to R_4 - 3R_1 gives (0,0,3,−5)(0, 0, 3, -5). Three replacements: the determinant does not change. Expanding along column 11, only the entry 22 at position (1,1)(1,1) survives, with sign ++: det⁡M=2det⁡(03−112403−5)\det M = 2\det\begin{pmatrix} 0 & 3 & -1 \\ 1 & 2 & 4 \\ 0 & 3 & -5 \end{pmatrix}.

The 3×33 \times 3 has two zeros in its first column. The surviving entry is the 11 at position (2,1)(2,1), whose sign is (−1)2+1=−1(-1)^{2+1} = -1: the determinant is −1⋅det⁡(3−13−5)=−(−15+3)=12-1 \cdot \det\begin{pmatrix} 3 & -1 \\ 3 & -5 \end{pmatrix} = -(-15 + 3) = 12. So det⁡M=2×12=24\det M = 2 \times 12 = 24. Second route for the 3×33 \times 3: R3→R3−R1R_3 \to R_3 - R_1 turns its last row into (0,0,−4)(0, 0, -4), and expanding along that row gives −4⋅det⁡(0312)=−4(−3)=12-4 \cdot \det\begin{pmatrix} 0 & 3 \\ 1 & 2 \end{pmatrix} = -4(-3) = 12. The same number, so the sign of the cofactor was right.

b) MM is 4×44 \times 4, so every scalar factor comes out to the power 44. det⁡(−M)=(−1)4det⁡M=24\det(-M) = (-1)^4 \det M = 24: the sign disappears because the size is even. det⁡(2M−1)=24⋅124=23\det(2M^{-1}) = 2^4 \cdot \frac{1}{24} = \frac{2}{3}. det⁡(M−1MT)=1det⁡M⋅det⁡M=1\det(M^{-1}M^T) = \frac{1}{\det M} \cdot \det M = 1, since det⁡(MT)=det⁡M\det(M^T) = \det M. Writing det⁡(2M−1)=224\det(2M^{-1}) = \frac{2}{24} is the classic loss here: the 22 multiplies each of the four rows.

c) The two edges from the SAME vertex AA are AB→=(4,1)\overrightarrow{AB} = (4, 1) and AD→=(1,3)\overrightarrow{AD} = (1, 3), and the area is ∣det⁡(4113)∣=∣12−1∣=11\left|\det\begin{pmatrix} 4 & 1 \\ 1 & 3 \end{pmatrix}\right| = |12 - 1| = 11. Check against the figure: A+AB→+AD→=(4,4)=CA + \overrightarrow{AB} + \overrightarrow{AD} = (4, 4) = C, so these two edges do build ABCDABCD. The student computes det⁡(3013)=9\det\begin{pmatrix} 3 & 0 \\ 1 & 3 \end{pmatrix} = 9 with the columns OB→=(3,1)\overrightarrow{OB} = (3, 1) and OD→=(0,3)\overrightarrow{OD} = (0, 3): that is the area of the parallelogram with vertices OO, BB, DD and B+DB + D, a different figure, since AA is not the origin.

d) Triangle ABDABD is half of the parallelogram: area 112\frac{11}{2}. With Dk=(k,2)D_k = (k, 2), ADk→=(k+1,2)\overrightarrow{AD_k} = (k + 1, 2) and det⁡(4k+112)=8−(k+1)=7−k\det\begin{pmatrix} 4 & k + 1 \\ 1 & 2 \end{pmatrix} = 8 - (k + 1) = 7 - k. The triangle is flat when this vanishes, at k=7k = 7. Then D7=(7,2)=A+2AB→D_7 = (7, 2) = A + 2\overrightarrow{AB} lies on the line ABAB, as the grid shows: from A(−1,0)A(-1, 0), two steps of (4,1)(4, 1) reach (7,2)(7, 2). A zero determinant means the two columns are parallel, nothing more mysterious.

Exercise 8: Temperatures inside a heated plate: Cramer's rule and the adjugate

A thin metal plate has its four edges held at fixed temperatures: 6060 °C on the top edge, 2020 °C on the bottom edge, 2020 °C on the left edge and 6060 °C on the right edge. A mesh places three interior points t1t_1, t2t_2, t3t_3 in a row, as on the figure. At steady state, the temperature at each interior point is the AVERAGE of the temperatures at its four neighbours on the mesh: up, down, left and right.

t1t2t3top edge held at 60 °Cbottom edge held at 20 °C20 °C60 °C
  • a) Write the three equations, in the form Nt=bNt = b with t=(t1,t2,t3)t = (t_1, t_2, t_3) and integer coefficients.
  • b) Compute det⁡N\det N by cofactor expansion along a row you choose.
  • c) Find t2t_2 alone by Cramer's rule.
  • d) Compute the three cofactors C11C_{11}, C12C_{12}, C13C_{13} of NN. The left edge is warmed by 11 °C: by how much does each interior temperature rise?
  • e) Write adj(N)\text{adj}(N) and N−1N^{-1}, and use them to find t1t_1 and t3t_3. Check the answer with the average rule at t2t_2.
Show the solution

Answers

  • a) 4t1−t2=1004t_1 - t_2 = 100, −t1+4t2−t3=80-t_1 + 4t_2 - t_3 = 80, −t2+4t3=140-t_2 + 4t_3 = 140
  • b) det⁡N=56\det N = 56
  • c) t2=224056=40t_2 = \frac{2240}{56} = 40 °C
  • d) C11=15C_{11} = 15, C12=4C_{12} = 4, C13=1C_{13} = 1; the rises are 1556\frac{15}{56}, 114\frac{1}{14} and 156\frac{1}{56} °C
  • e) N−1=156(154141641415)N^{-1} = \frac{1}{56}\begin{pmatrix} 15 & 4 & 1 \\ 4 & 16 & 4 \\ 1 & 4 & 15 \end{pmatrix}; t=(35,40,45)t = (35, 40, 45) °C

a) The neighbours of t1t_1 are the top edge (6060), the bottom edge (2020), the left edge (2020) and t2t_2: 4t1=60+20+20+t24t_1 = 60 + 20 + 20 + t_2, that is 4t1−t2=1004t_1 - t_2 = 100. For t2t_2: 4t2=60+20+t1+t34t_2 = 60 + 20 + t_1 + t_3, so −t1+4t2−t3=80-t_1 + 4t_2 - t_3 = 80. For t3t_3: 4t3=60+20+t2+604t_3 = 60 + 20 + t_2 + 60, so −t2+4t3=140-t_2 + 4t_3 = 140. Hence N=(4−10−14−10−14)N = \begin{pmatrix} 4 & -1 & 0 \\ -1 & 4 & -1 \\ 0 & -1 & 4 \end{pmatrix} and b=(100,80,140)b = (100, 80, 140). The unknowns go to the left, the known edge temperatures to the right.

b) Row 11 has a zero. det⁡N=4det⁡(4−1−14)−(−1)det⁡(−1−104)+0=4(15)+(−4)=56\det N = 4\det\begin{pmatrix} 4 & -1 \\ -1 & 4 \end{pmatrix} - (-1)\det\begin{pmatrix} -1 & -1 \\ 0 & 4 \end{pmatrix} + 0 = 4(15) + (-4) = 56. Watch the middle term: the entry is −1-1 and its cofactor sign is −-, so it contributes +1×(−4)=−4+1 \times (-4) = -4.

c) Replace column 22 of NN by bb: N2=(41000−180−101404)N_2 = \begin{pmatrix} 4 & 100 & 0 \\ -1 & 80 & -1 \\ 0 & 140 & 4 \end{pmatrix}. Along row 11: 4(80⋅4−(−1)(140))−100((−1)(4)−(−1)(0))+0=4(460)+400=22404(80 \cdot 4 - (-1)(140)) - 100((-1)(4) - (-1)(0)) + 0 = 4(460) + 400 = 2240. So t2=224056=40t_2 = \frac{2240}{56} = 40 °C. Cramer's rule costs two determinants for one unknown, which is exactly what it is for.

d) C11=+det⁡(4−1−14)=15C_{11} = +\det\begin{pmatrix} 4 & -1 \\ -1 & 4 \end{pmatrix} = 15, C12=−det⁡(−1−104)=−(−4)=4C_{12} = -\det\begin{pmatrix} -1 & -1 \\ 0 & 4 \end{pmatrix} = -(-4) = 4, C13=+det⁡(−140−1)=1C_{13} = +\det\begin{pmatrix} -1 & 4 \\ 0 & -1 \end{pmatrix} = 1. Warming the left edge by 11 °C adds 11 to the first equation only, so bb changes by e1e_1 and tt changes by N−1e1N^{-1}e_1, the first COLUMN of N−1N^{-1}. Because the adjugate is the TRANSPOSE of the cofactor matrix, (N−1)i1=C1idet⁡N(N^{-1})_{i1} = \frac{C_{1i}}{\det N}: the first column of N−1N^{-1} is 156(C11,C12,C13)=156(15,4,1)\frac{1}{56}(C_{11}, C_{12}, C_{13}) = \frac{1}{56}(15, 4, 1). The point next to the warmed edge rises by 1556\frac{15}{56} °C, the middle one by 456=114\frac{4}{56} = \frac{1}{14} °C, the far one by only 156\frac{1}{56} °C. The effect fades with distance, as it should.

e) The remaining cofactors: C22=det⁡(4004)=16C_{22} = \det\begin{pmatrix} 4 & 0 \\ 0 & 4 \end{pmatrix} = 16, C21=−det⁡(−10−14)=4C_{21} = -\det\begin{pmatrix} -1 & 0 \\ -1 & 4 \end{pmatrix} = 4, C23=−det⁡(4−10−1)=4C_{23} = -\det\begin{pmatrix} 4 & -1 \\ 0 & -1 \end{pmatrix} = 4, and by the same computations C31=1C_{31} = 1, C32=4C_{32} = 4, C33=15C_{33} = 15. NN is symmetric, so the cofactor matrix is symmetric and equals its transpose: adj(N)=(154141641415)\text{adj}(N) = \begin{pmatrix} 15 & 4 & 1 \\ 4 & 16 & 4 \\ 1 & 4 & 15 \end{pmatrix} and N−1=156adj(N)N^{-1} = \frac{1}{56}\text{adj}(N).

Then t1=15(100)+4(80)+1(140)56=196056=35t_1 = \frac{15(100) + 4(80) + 1(140)}{56} = \frac{1960}{56} = 35 °C, and t3=1(100)+4(80)+15(140)56=252056=45t_3 = \frac{1(100) + 4(80) + 15(140)}{56} = \frac{2520}{56} = 45 °C; the middle row gives 400+1280+56056=40\frac{400 + 1280 + 560}{56} = 40 again, consistent with c). Average rule at t2t_2: its neighbours are 6060, 2020, 3535 and 4545, whose average is 1604=40\frac{160}{4} = 40. The temperatures increase from left to right, as the warmer right edge suggests.

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