Linear Algebra and Vector Geometry 201-SN4-RE • CEGEP, Montreal

Corrected exercises: linear systems, Gauss and Gauss-Jordan (201-SN4-RE)

This is the corrected exercise set on systems of linear equations for Linear Algebra and Vector Geometry, 201-SN4-RE (formerly 201-NYC), the linear algebra course of CEGEP science programs. Part A covers the basics: the augmented matrix, elementary row operations and Gaussian elimination with back substitution (exercise 1), the reduced row echelon form by Gauss-Jordan elimination (exercise 2), the three possible cases with a parametric solution (exercise 3), inverting a matrix by Gauss-Jordan (exercise 4), rank and the Rouché-Capelli consistency theorem (exercise 5). Part B moves up to exam level: homogeneous systems (exercise 6), the full discussion of a system with two parameters (exercise 7), the structure of the solution set (exercise 8), fitting a parabola with the Vandermonde determinant (exercise 9) and balancing a chemical equation (exercise 10). Part C goes through the classics: a zero pivot and a row interchange, a system of four equations, the LU decomposition, the equilibrium temperature of a plate and an ill-conditioned system (exercises 11 to 15).

Exercise 0.1 opens the set with eight systems to solve directly by Gaussian elimination, as in textbook drill lists, from a system that is already triangular to an inconsistent one that ends on the row 0=20=2, by way of a zero pivot and infinitely many solutions with one parameter. Every value is checked as you type it.

This is the heaviest chapter of the semester in sheer amount of computation, and yet it is the one where students lose the most marks on questions that require none. A linear system is not only solved, it is DISCUSSED: how many solutions, why, and under which conditions. A student who row reduces perfectly but concludes “no solution” where there are infinitely many loses the whole question. It is the rank, not the number of equations, that decides (exercise 5), and a discussion with parameters is lost by dividing by an expression that can be zero (exercise 7).

The reflex to build: never mix elementary operations on ROWS with manipulations of columns, and write down the operation used at every step. The three allowed operations are interchanging two rows, multiplying a row by a nonzero scalar, and adding a multiple of one row to another row. Any other manipulation changes the solution set, and the error then becomes impossible to trace in a two-page solution.

16 corrected exercises • 160 points • 225 minutes

This chapter is part of 201-SN4-RE, every chapter with its set and sheet Before you start Revision sheet: the traps and the method for this chapter

Self-checking set Type your answers and check them question by question: the page tells you right or wrong before you open the solution. With an account, every answer right on the first try earns points, and your right answers stay filled in when you come back.

Course recap

  • • Augmented matrix: for the system AX=BAX=B, it is the matrix [A ∣ B][A\,|\,B] obtained by placing the column of constants next to the coefficient matrix. The vertical bar plays no role in the computation; it simply separates the coefficients from the right-hand side.
  • • Elementary row operations, the only three allowed: interchange two rows (Ri↔RjR_{i}\leftrightarrow R_{j}); multiply a row by a NONZERO scalar (Ri→kRiR_{i}\to kR_{i}, k≠0k\neq 0); add a multiple of another row to a row (Ri→Ri+kRjR_{i}\to R_{i}+kR_{j}). Each one turns the system into an EQUIVALENT system, that is, one with exactly the same solution set.
  • • Row echelon form (Gaussian elimination): in each nonzero row, the first nonzero entry, called the pivot (or leading entry), lies strictly to the right of the pivot of the row above, and any rows of zeros are at the bottom. The system is then solved by BACK SUBSTITUTION, from the last equation up to the first.
  • • Reduced row echelon form (Gauss-Jordan elimination): on top of the conditions above, every pivot equals 11 and is the ONLY nonzero entry in its column, so there are also zeros ABOVE each pivot. The solution is then read off directly, with no back substitution at all.
  • • The three possible cases for a linear system, and there are never any others. A unique solution: as many pivots as unknowns. No solution (inconsistent system): a row of the form [0 0 … 0 ∣ c][0\ 0\ \dots\ 0\,|\,c] with c≠0c\neq 0 appears, which stands for the impossible equation 0=c0=c. Infinitely many solutions: the system is consistent and has fewer pivots than unknowns, the unknowns without a pivot becoming free parameters.
  • • Number of free parameters == number of unknowns −- number of pivots. This count is what decides, never the number of equations you started with.
  • • Inversion by Gauss-Jordan: form the matrix [A ∣ I][A\,|\,I] and apply elementary row operations until you reach [I ∣ A−1][I\,|\,A^{-1}]. If at some point a row of the left block becomes entirely zero, then AA is not invertible and the procedure stops.
  • • Homogeneous system: a system AX=0AX=0, whose right-hand side is zero. It ALWAYS has the trivial solution X=0X=0, so it is never inconsistent. It has nontrivial solutions if and only if det⁡(A)=0\det(A)=0.

Calculations: systems to solve

Exercise 0.1: Solve by Gaussian elimination: eight direct calculations

For each system, write the augmented matrix, reduce it to row echelon form by Gaussian elimination, then conclude: give the unknowns asked for, or the nature of the solution set when there is no unique solution.

Only three operations on the rows: interchange two rows, multiply a row by a nonzero number, add a multiple of another row to a row. Clear the first column below the first pivot, then the second column below the second pivot, and read the last row: a pivot everywhere gives a unique solution by back substitution, a row 0=c0=c with c≠0c\neq 0 gives none, a row 0=00=0 leaves a free unknown, which you take as a parameter. The rank is the number of pivots.

  • a) {3x−2y=115x+4y=−11\begin{cases} 3x-2y=11 \\ 5x+4y=-11 \end{cases}: give xx and yy.
  • b) {2x−y+3z=94y−z=−63z=6\begin{cases} 2x-y+3z=9 \\ 4y-z=-6 \\ 3z=6 \end{cases}, already triangular: solve by back substitution, then give yy and xx.
  • c) {x−y+2z=52x+y−z=3x+2y+z=6\begin{cases} x-y+2z=5 \\ 2x+y-z=3 \\ x+2y+z=6 \end{cases}: give xx and zz.
  • d) {3y+z=5x+2y−z=−12x+y+3z=5\begin{cases} 3y+z=5 \\ x+2y-z=-1 \\ 2x+y+3z=5 \end{cases}: give xx and zz.
  • e) {x−2y+z=32x+y−3z=14x−3y−z=9\begin{cases} x-2y+z=3 \\ 2x+y-3z=1 \\ 4x-3y-z=9 \end{cases}: state the nature of the solution set and give the rank of the coefficient matrix.
  • f) {x+y−z=22x+3y+z=93x+4y=11\begin{cases} x+y-z=2 \\ 2x+3y+z=9 \\ 3x+4y=11 \end{cases}: state the nature of the solution set, then give the value of xx when z=2z=2.
  • g) {x+2y+3z=42x+5y+4z=3\begin{cases} x+2y+3z=4 \\ 2x+5y+4z=3 \end{cases}: solve with z=tz=t as the parameter, then give xx for t=0t=0 and the coefficient of tt in yy.
  • h) Give the rank of the matrix (1−12321104−156)\begin{pmatrix} 1 & -1 & 2 & 3 \\ 2 & 1 & 1 & 0 \\ 4 & -1 & 5 & 6 \end{pmatrix}.

Type your answers, the page tells you right or wrong 0/15

a)
b)
c)
d)
e)
f)
g)
h)
Show the solution

Answers

  • a) x=1x=1, y=−4y=-4
  • b) z=2z=2, y=−1y=-1, x=1x=1
  • c) (2,1,2)(2, 1, 2)
  • d) interchange R1↔R2R_{1}\leftrightarrow R_{2}; (−1,1,2)(-1, 1, 2)
  • e) row 0=20=2: no solution; rank 22
  • f) infinitely many solutions, (−3+4t,5−3t,t)(-3+4t, 5-3t, t); x=5x=5
  • g) (14−7t,−5+2t,t)(14-7t, -5+2t, t); 1414 and 22
  • h) R3=2R1+R2R_{3}=2R_{1}+R_{2}; rank 22

The move that decides everything: read the LAST row of the echelon form before concluding. A nonzero pivot, a row 0=c0=c with c≠0c\neq 0, a row 0=00=0: these three readings alone tell you whether there is one solution, none or infinitely many, whatever the number of equations.

a)

Augmented matrix [3−21154−11]\left[\begin{array}{cc|c} 3 & -2 & 11 \\ 5 & 4 & -11 \end{array}\right]. R2→3R2−5R1R_{2}\to 3R_{2}-5R_{1} gives (0  22 ∣ −33−55)=(0  22 ∣ −88)(0\ \ 22\,|\,-33-55)=(0\ \ 22\,|\,-88), so y=−4y=-4; then 3x−2×(−4)=113x-2\times(-4)=11, 3x=33x=3 and x=1x=1. Pitfall: 3×(−11)−5×11=−883\times(-11)-5\times 11=-88, two signs to carry.

b)

Back substitute from the last row: z=63=2z=\frac{6}{3}=2; 4y−2=−64y-2=-6, so y=−1y=-1; 2x−(−1)+3×2=92x-(-1)+3\times 2=9, so 2x=22x=2 and x=1x=1. Pitfall: −y-y with y=−1y=-1 is +1+1.

c)

R2→R2−2R1R_{2}\to R_{2}-2R_{1}: (0  3  −5 ∣ −7)(0\ \ 3\ \ -5\,|\,-7); R3→R3−R1R_{3}\to R_{3}-R_{1}: (0  3  −1 ∣ 1)(0\ \ 3\ \ -1\,|\,1); R3→R3−R2R_{3}\to R_{3}-R_{2}: (0  0  4 ∣ 8)(0\ \ 0\ \ 4\,|\,8). Back substitution: z=2z=2, then 3y−10=−73y-10=-7 and y=1y=1, then x=5+y−2z=5+1−4=2x=5+y-2z=5+1-4=2.

d)

The first pivot is zero: interchange R1R_{1} and R2R_{2}, which gives the rows (1  2  −1 ∣ −1)(1\ \ 2\ \ -1\,|\,-1), (0  3  1 ∣ 5)(0\ \ 3\ \ 1\,|\,5) and (2  1  3 ∣ 5)(2\ \ 1\ \ 3\,|\,5). R3→R3−2R1R_{3}\to R_{3}-2R_{1}: (0  −3  5 ∣ 7)(0\ \ -3\ \ 5\,|\,7); R3→R3+R2R_{3}\to R_{3}+R_{2}: (0  0  6 ∣ 12)(0\ \ 0\ \ 6\,|\,12). Back substitution: z=2z=2, 3y+2=53y+2=5 so y=1y=1, x=−1−2y+z=−1−2+2=−1x=-1-2y+z=-1-2+2=-1. Pitfall: interchanging COLUMNS instead of rows, which permutes the unknowns.

e)

R2→R2−2R1R_{2}\to R_{2}-2R_{1}: (0  5  −5 ∣ −5)(0\ \ 5\ \ -5\,|\,-5); R3→R3−4R1R_{3}\to R_{3}-4R_{1}: (0  5  −5 ∣ −3)(0\ \ 5\ \ -5\,|\,-3); R3→R3−R2R_{3}\to R_{3}-R_{2}: (0  0  0 ∣ 2)(0\ \ 0\ \ 0\,|\,2). The last row says 0=20=2: no solution. The coefficient matrix has two pivots, so rank 22, and the augmented matrix has rank 33. Pitfall: concluding that there are infinitely many solutions because the coefficients of the last row vanish; it is the nonzero right-hand side that decides.

f)

R2→R2−2R1R_{2}\to R_{2}-2R_{1}: (0  1  3 ∣ 5)(0\ \ 1\ \ 3\,|\,5); R3→R3−3R1R_{3}\to R_{3}-3R_{1}: (0  1  3 ∣ 5)(0\ \ 1\ \ 3\,|\,5); R3→R3−R2R_{3}\to R_{3}-R_{2}: (0  0  0 ∣ 0)(0\ \ 0\ \ 0\,|\,0). A row 0=00=0: rank 22 for three unknowns, infinitely many solutions with one parameter. With z=tz=t: y=5−3ty=5-3t and x=2−y+z=2−5+3t+t=−3+4tx=2-y+z=2-5+3t+t=-3+4t. For z=2z=2: y=−1y=-1 and x=5x=5. Pitfall: writing x=2−y−zx=2-y-z, when −z-z moves to the other side with a plus sign.

g)

Two equations for three unknowns: at least one parameter remains. R2→R2−2R1R_{2}\to R_{2}-2R_{1}: (0  1  −2 ∣ −5)(0\ \ 1\ \ -2\,|\,-5). With z=tz=t: y=−5+2ty=-5+2t, then x=4−2y−3z=4+10−4t−3t=14−7tx=4-2y-3z=4+10-4t-3t=14-7t. For t=0t=0: x=14x=14; the coefficient of tt in yy is 22. Check with t=0t=0, (14,−5,0)(14, -5, 0): 14−10=414-10=4 and 28−25=328-25=3.

h)

R2→R2−2R1R_{2}\to R_{2}-2R_{1}: (0  3  −3  −6)(0\ \ 3\ \ -3\ \ -6); R3→R3−4R1R_{3}\to R_{3}-4R_{1}: (0  3  −3  −6)(0\ \ 3\ \ -3\ \ -6); R3→R3−R2R_{3}\to R_{3}-R_{2}: a zero row. Two pivots, so rank 22: the third row was 2R1+R22R_{1}+R_{2}. Pitfall: answering 33 because there are three rows; the rank counts the INDEPENDENT rows.

Check: a solution you find goes back into ALL the original equations, not only into the echelon form. For infinitely many solutions, check the parametric form for two values of the parameter; for no solution, find the combination of rows that contradicts the right-hand side, here R3=2R1+R2R_{3}=2R_{1}+R_{2} on the left but 9≠2×3+19\neq 2\times 3+1 on the right.

Tick the exercises you have done or want to review: a free account, no password, keeps your ticks and your right answers from one visit to the next, tells you which chapter to tackle next and lets you ask for the exercise you are missing. Create your space, an email is enough.

Part A: the basics (/50)

Exercise 1: Augmented matrix, elementary row operations and Gaussian elimination

Consider the system {x+2y−z=22x+5y+z=153x+4y−7z=−10\begin{cases} x+2y-z=2 \\ 2x+5y+z=15 \\ 3x+4y-7z=-10 \end{cases}.

  • a) Write the augmented matrix [A ∣ B][A\,|\,B] of this system.
  • b) Perform the operations R2→R2−2R1R_{2}\to R_{2}-2R_{1} and R3→R3−3R1R_{3}\to R_{3}-3R_{1}, and write the resulting matrix.
  • c) Finish the reduction to obtain a row echelon form, stating the operation used.
  • d) Solve the system by back substitution, then check your solution in the three original equations.

Type your answers, the page tells you right or wrong 0/6

b)
c)
d)
Show the solution

Answers

  • a) Augmented matrix 3×43\times 4
  • b) (0,1,3 ∣ 11)(0, 1, 3\,|\,11) and (0,−2,−4 ∣ −16)(0, -2, -4\,|\,-16)
  • c) R3→R3+2R2R_3\to R_3+2R_2: (0,0,2 ∣ 6)(0, 0, 2\,|\,6)
  • d) (1,2,3)(1, 2, 3)
a)

[A ∣ B]=[12−122511534−7−10][A\,|\,B]=\left[\begin{array}{ccc|c} 1 & 2 & -1 & 2 \\ 2 & 5 & 1 & 15 \\ 3 & 4 & -7 & -10 \end{array}\right]. The top-left entry is 11, which makes it an ideal pivot: no fraction will be introduced at the first step.

b)

R2→R2−2R1R_{2}\to R_{2}-2R_{1} gives (2−2,5−4,1+2 ∣ 15−4)=(0,1,3 ∣ 11)(2-2, 5-4, 1+2\,|\,15-4)=(0, 1, 3\,|\,11). Then R3→R3−3R1R_{3}\to R_{3}-3R_{1} gives (3−3,4−6,−7+3 ∣ −10−6)=(0,−2,−4 ∣ −16)(3-3, 4-6, -7+3\,|\,-10-6)=(0, -2, -4\,|\,-16).

The matrix becomes [12−12013110−2−4−16]\left[\begin{array}{ccc|c} 1 & 2 & -1 & 2 \\ 0 & 1 & 3 & 11 \\ 0 & -2 & -4 & -16 \end{array}\right]. Watch the sign in the third column of R2R_{2}: 1−2(−1)=1+2=31-2(-1)=1+2=3. Subtracting a multiple of a negative entry produces an addition, and that is where most row reduction errors creep in.

c)

The pivot of the second row is 11; use it to clear the −2-2 below it: R3→R3+2R2R_{3}\to R_{3}+2R_{2} gives (0,−2+2,−4+6 ∣ −16+22)=(0,0,2 ∣ 6)(0, -2+2, -4+6\,|\,-16+22)=(0, 0, 2\,|\,6).

The row echelon form is [12−12013110026]\left[\begin{array}{ccc|c} 1 & 2 & -1 & 2 \\ 0 & 1 & 3 & 11 \\ 0 & 0 & 2 & 6 \end{array}\right]. The three pivots are 11, 11 and 22, each strictly to the right of the one above: the form is indeed echelon. Three pivots for three unknowns already announce a unique solution, before it is even computed.

d)

Work from the last row up to the first. Third row: 2z=62z=6, so z=3z=3. Second row: y+3z=11y+3z=11, that is y+9=11y+9=11, so y=2y=2. First row: x+2y−z=2x+2y-z=2, that is x+4−3=2x+4-3=2, so x=1x=1.

Check in the three original equations, not in the echelon rows, which could carry a propagated error. Equation 1: 1+2(2)−3=1+4−3=21+2(2)-3=1+4-3=2, correct. Equation 2: 2(1)+5(2)+3=2+10+3=152(1)+5(2)+3=2+10+3=15, correct. Equation 3: 3(1)+4(2)−7(3)=3+8−21=−103(1)+4(2)-7(3)=3+8-21=-10, correct. The solution is (x,y,z)=(1,2,3)(x, y, z)=(1, 2, 3).

Exercise 2: From Gauss to Gauss-Jordan: the reduced row echelon form

Take the row echelon form obtained in the previous exercise: [12−12013110026]\left[\begin{array}{ccc|c} 1 & 2 & -1 & 2 \\ 0 & 1 & 3 & 11 \\ 0 & 0 & 2 & 6 \end{array}\right].

  • a) State the two extra conditions that a REDUCED row echelon form must satisfy, and say which ones are missing here.
  • b) Continue the elimination up to the reduced row echelon form, stating each operation.
  • c) Read the solution of the system off the matrix you obtain.
  • d) When is Gaussian elimination enough, and when is Gauss-Jordan clearly better? Justify by the work actually saved.

Type your answers, the page tells you right or wrong 0/6

a)
b)
c)
d)
Show the solution

Answers

  • a) Pivots equal to 1 and zeros above
  • b) [I ∣ (1,2,3)][I\,|\,(1, 2, 3)]
  • c) x=1x=1, y=2y=2, z=3z=3
  • d) Gauss for one system; Gauss-Jordan to invert or to parametrize
a)

A reduced row echelon form requires two more conditions: every pivot must be exactly 11, and every pivot must be the ONLY nonzero entry of its column, so there must also be zeros above the pivots.

Here both conditions are missing. The pivot of the third row is 22, not 11. And nonzero entries remain above the pivots: the 22 in position (1,2)(1, 2) above the pivot of the second column, and the −1-1 and the 33 above the pivot of the third column.

b)

First normalize the last pivot: R3→12R3R_{3}\to\dfrac{1}{2}R_{3} gives (0,0,1 ∣ 3)(0, 0, 1\,|\,3).

Then work upward, column by column. R2→R2−3R3R_{2}\to R_{2}-3R_{3} gives (0,1,3−3 ∣ 11−9)=(0,1,0 ∣ 2)(0, 1, 3-3\,|\,11-9)=(0, 1, 0\,|\,2). Then R1→R1+R3R_{1}\to R_{1}+R_{3} gives (1,2,−1+1 ∣ 2+3)=(1,2,0 ∣ 5)(1, 2, -1+1\,|\,2+3)=(1, 2, 0\,|\,5).

It remains to clear the second column: R1→R1−2R2R_{1}\to R_{1}-2R_{2} gives (1,2−2,0 ∣ 5−4)=(1,0,0 ∣ 1)(1, 2-2, 0\,|\,5-4)=(1, 0, 0\,|\,1).

The reduced row echelon form is [100101020013]\left[\begin{array}{ccc|c} 1 & 0 & 0 & 1 \\ 0 & 1 & 0 & 2 \\ 0 & 0 & 1 & 3 \end{array}\right]. The order of work to remember: clear the columns from RIGHT to LEFT, starting from the last pivot. Each row you use to clear upward then has zeros everywhere except its pivot and its right-hand side, so each operation changes a single entry of the left block and the numbers stay small. Working from left to right also reaches the reduced form, but it carries larger intermediate entries along the way.

c)

The reading is immediate: the first row says x=1x=1, the second y=2y=2, the third z=3z=3. No back substitution is needed, the matrix IS the solution. We do get (1,2,3)(1, 2, 3) again, which confirms the previous exercise by a different route.

d)

Gauss is plenty when you want the solution of a single system with a unique solution: back substitution is quick, and pushing on to the reduced form adds work for no gain. It is in fact the most efficient method under exam time pressure on an ordinary 3×33\times 3 system.

Gauss-Jordan becomes clearly better in three situations. First, when a matrix has to be inverted, since the procedure [A ∣ I]→[I ∣ A−1][A\,|\,I]\to[I\,|\,A^{-1}] requires the reduced form. Next, when the system has infinitely many solutions: the reduced form directly gives each leading unknown in terms of the free parameters, where back substitution forces a tedious substitution that invites sign errors. Finally, when the same system must be solved for several right-hand sides, which can be handled at once by attaching several columns.

In other words, the extra cost of Gauss-Jordan is an investment: it only pays off when you need the full structure of the solution, not just a triple of numbers.

Exercise 3: The three cases: unique solution, no solution, infinitely many

A linear system only ever has three possible outcomes. This exercise brings out all three, and each time asks you to recognize them ON the row echelon form.

  • a) Solve {x+2y+z=32x+4y+2z=7\begin{cases} x+2y+z=3 \\ 2x+4y+2z=7 \end{cases} and conclude.
  • b) Solve {x+y+z=6x+2y+3z=142x+3y+4z=20\begin{cases} x+y+z=6 \\ x+2y+3z=14 \\ 2x+3y+4z=20 \end{cases} and give the solution set in parametric form.
  • c) In case b), check your parametric form for two different values of the parameter.
  • d) Interpret geometrically the three possible cases for a system of three equations in three unknowns.

Type your answers, the page tells you right or wrong 0/6

a)
b)
c)
d)
Show the solution

Answers

  • a) 0=10=1: no solution
  • b) (t−2,8−2t,t)(t-2, 8-2t, t)
  • c) t=3t=3: (1,2,3)(1, 2, 3); t=0t=0: (−2,8,0)(-2, 8, 0)
  • d) A point, nothing, a line or a plane
a)

Augmented matrix [12132427]\left[\begin{array}{ccc|c} 1 & 2 & 1 & 3 \\ 2 & 4 & 2 & 7 \end{array}\right]. Apply R2→R2−2R1R_{2}\to R_{2}-2R_{1}: (2−2,4−4,2−2 ∣ 7−6)=(0,0,0 ∣ 1)(2-2, 4-4, 2-2\,|\,7-6)=(0, 0, 0\,|\,1).

The second row reads 0x+0y+0z=10x+0y+0z=1, that is 0=10=1, which is impossible. The system is INCONSISTENT: it has NO solution.

The signal to recognize: a row whose left part is entirely zero but whose right-hand side is not. Note that the left side of the second equation is exactly twice that of the first, while 7≠2×37\neq 2\times 3: the two equations contradict each other.

b)

Augmented matrix [11161231423420]\left[\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 1 & 2 & 3 & 14 \\ 2 & 3 & 4 & 20 \end{array}\right]. Apply R2→R2−R1R_{2}\to R_{2}-R_{1}, which gives (0,1,2 ∣ 8)(0, 1, 2\,|\,8), then R3→R3−2R1R_{3}\to R_{3}-2R_{1}, which gives (0,1,2 ∣ 8)(0, 1, 2\,|\,8).

The two new rows are identical, so R3→R3−R2R_{3}\to R_{3}-R_{2} gives (0,0,0 ∣ 0)(0, 0, 0\,|\,0). The row echelon form is [111601280000]\left[\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 0 & 1 & 2 & 8 \\ 0 & 0 & 0 & 0 \end{array}\right].

Here the zero row has a ZERO right-hand side, which expresses no contradiction at all: it is the equation 0=00=0, always true, which simply signals a redundant equation. The system is consistent. It has two pivots (columns of xx and yy) for three unknowns, so 3−2=13-2=1 free parameter. The unknown zz, whose column carries no pivot, becomes the parameter.

Set z=tz=t. The second row gives y+2t=8y+2t=8, so y=8−2ty=8-2t. The first gives x+(8−2t)+t=6x+(8-2t)+t=6, that is x=6−8+2t−t=t−2x=6-8+2t-t=t-2.

The solution set is {(t−2,8−2t,t) : t∈R}\{(t-2, 8-2t, t)\ :\ t\in\mathbb{R}\}, INFINITELY many solutions. The whole set must be given: answering with a single particular solution, even a correct one, does not earn the marks.

c)

For t=3t=3: (1,2,3)(1, 2, 3). Check: 1+2+3=61+2+3=6, correct; 1+4+9=141+4+9=14, correct; 2+6+12=202+6+12=20, correct.

For t=0t=0: (−2,8,0)(-2, 8, 0). Check: −2+8+0=6-2+8+0=6, correct; −2+16+0=14-2+16+0=14, correct; −4+24+0=20-4+24+0=20, correct. Two different values of the parameter give two different solutions, both valid: the parametric form is right.

d)

Each linear equation in three unknowns represents a PLANE in space, and solving the system amounts to finding the intersection of the three planes.

Unique solution: the three planes meet in a single POINT, like two walls and a ceiling in the corner of a room. No solution: the planes have no point common to all three, either because two of them are distinct parallel planes, or because they form a prism, each pair meeting along a line but the three lines staying distinct. That is case a), where the two planes are parallel and distinct. Infinitely many solutions: the three planes meet along a common LINE, which is case b), the solution parametrized by tt being precisely a parametric equation of that line. Infinitely many can also occur if the three planes coincide, in which case the solution set is a whole plane, with two parameters.

This bridge with geometry is not decoration: recognizing that the solution of b) is a line with direction vector (1,−2,1)(1, -2, 1), read directly off the coefficients of tt, ties this chapter to the one on lines and planes in space.

unique solutioninfinitely manyno solution

Exercise 4: Inverting a matrix by Gauss-Jordan elimination

Consider the matrix A=(111012124)A=\begin{pmatrix} 1 & 1 & 1 \\ 0 & 1 & 2 \\ 1 & 2 & 4 \end{pmatrix}.

Recall the principle: form [A ∣ I][A\,|\,I] and apply elementary row operations until the left block becomes II; the right block is then A−1A^{-1}.

  • a) Write the matrix [A ∣ I][A\,|\,I].
  • b) Apply Gauss-Jordan elimination to obtain [I ∣ A−1][I\,|\,A^{-1}].
  • c) Check your result by computing A A−1A\,A^{-1}.
  • d) Use A−1A^{-1} to solve the system AX=BAX=B with B=(6817)B=\begin{pmatrix} 6 \\ 8 \\ 17 \end{pmatrix}.

Type your answers, the page tells you right or wrong 0/7

b)
d)
Show the solution

Answers

  • a) [A ∣ I][A\,|\,I]
  • b) A−1=(0−2123−2−1−11)A^{-1}=\begin{pmatrix}0&-2&1\\2&3&-2\\-1&-1&1\end{pmatrix}
  • c) AA−1=I3AA^{-1}=I_3
  • d) X=(1,2,3)X=(1, 2, 3)
a)

[A ∣ I]=[111100012010124001][A\,|\,I]=\left[\begin{array}{ccc|ccc} 1 & 1 & 1 & 1 & 0 & 0 \\ 0 & 1 & 2 & 0 & 1 & 0 \\ 1 & 2 & 4 & 0 & 0 & 1 \end{array}\right]. Every operation that follows acts on WHOLE rows, right block included: forgetting to apply an operation on the right is the error that ruins the computation.

b)

Clear below the first pivot. R3→R3−R1R_{3}\to R_{3}-R_{1} gives (0,1,3 ∣ −1,0,1)(0, 1, 3\,|\,-1, 0, 1), which produces [111100012010013−101]\left[\begin{array}{ccc|ccc} 1 & 1 & 1 & 1 & 0 & 0 \\ 0 & 1 & 2 & 0 & 1 & 0 \\ 0 & 1 & 3 & -1 & 0 & 1 \end{array}\right].

Clear below the second pivot: R3→R3−R2R_{3}\to R_{3}-R_{2} gives (0,0,1 ∣ −1,−1,1)(0, 0, 1\,|\,-1, -1, 1). The left block is now in echelon form with three pivots, which already guarantees that AA is invertible.

Work upward. R2→R2−2R3R_{2}\to R_{2}-2R_{3} gives (0,1,0 ∣ 0+2,1+2,0−2)=(0,1,0 ∣ 2,3,−2)(0, 1, 0\,|\,0+2, 1+2, 0-2)=(0, 1, 0\,|\,2, 3, -2). Then R1→R1−R3R_{1}\to R_{1}-R_{3} gives (1,1,0 ∣ 1+1,0+1,0−1)=(1,1,0 ∣ 2,1,−1)(1, 1, 0\,|\,1+1, 0+1, 0-1)=(1, 1, 0\,|\,2, 1, -1).

Finally R1→R1−R2R_{1}\to R_{1}-R_{2} gives (1,0,0 ∣ 2−2,1−3,−1+2)=(1,0,0 ∣ 0,−2,1)(1, 0, 0\,|\,2-2, 1-3, -1+2)=(1, 0, 0\,|\,0, -2, 1).

The final array is [1000−2101023−2001−1−11]\left[\begin{array}{ccc|ccc} 1 & 0 & 0 & 0 & -2 & 1 \\ 0 & 1 & 0 & 2 & 3 & -2 \\ 0 & 0 & 1 & -1 & -1 & 1 \end{array}\right], so A−1=(0−2123−2−1−11)A^{-1}=\begin{pmatrix} 0 & -2 & 1 \\ 2 & 3 & -2 \\ -1 & -1 & 1 \end{pmatrix}.

c)

First row of A A−1A\,A^{-1}: (1,1,1)(1, 1, 1) against the first column (0,2,−1)(0, 2, -1) gives 0+2−1=10+2-1=1; against the second column (−2,3,−1)(-2, 3, -1) gives −2+3−1=0-2+3-1=0; against the third (1,−2,1)(1, -2, 1) gives 1−2+1=01-2+1=0. We get (1,0,0)(1, 0, 0).

Second row (0,1,2)(0, 1, 2): 0+2−2=00+2-2=0, then 0+3−2=10+3-2=1, then 0−2+2=00-2+2=0, that is (0,1,0)(0, 1, 0). Third row (1,2,4)(1, 2, 4): 0+4−4=00+4-4=0, then −2+6−4=0-2+6-4=0, then 1−4+4=11-4+4=1, that is (0,0,1)(0, 0, 1). The product is I3I_{3}: the inverse is confirmed.

d)

The solution is X=A−1BX=A^{-1}B, not BA−1BA^{-1}: the order of the factors is not free, and the product BA−1BA^{-1} is not even defined for sizes 3×13\times 1 and 3×33\times 3.

X=(0−2123−2−1−11)(6817)X=\begin{pmatrix} 0 & -2 & 1 \\ 2 & 3 & -2 \\ -1 & -1 & 1 \end{pmatrix}\begin{pmatrix} 6 \\ 8 \\ 17 \end{pmatrix}. First component: 0(6)−2(8)+1(17)=−16+17=10(6)-2(8)+1(17)=-16+17=1. Second: 2(6)+3(8)−2(17)=12+24−34=22(6)+3(8)-2(17)=12+24-34=2. Third: −1(6)−1(8)+1(17)=−6−8+17=3-1(6)-1(8)+1(17)=-6-8+17=3. So X=(123)X=\begin{pmatrix} 1 \\ 2 \\ 3 \end{pmatrix}.

Direct check in the system: 1+2+3=61+2+3=6, correct; 0+2+6=80+2+6=8, correct; 1+4+12=171+4+12=17, correct.

A remark on method: to solve ONE system, computing the inverse is a costly detour, and Gauss remains faster. The inverse pays off when several right-hand sides BB must be handled with the same matrix AA, since each one then takes a single matrix product.

Exercise 5: Rank and the consistency theorem

The RANK of a matrix is the number of pivots in its row echelon form, that is, the number of truly independent equations. This single quantity decides on its own how many solutions a system has, and a theorem sums it up.

  • a) Find the rank of the coefficient matrix of the system {x+2y−z=22x+5y+z=153x+4y−7z=−10\begin{cases} x+2y-z=2 \\ 2x+5y+z=15 \\ 3x+4y-7z=-10 \end{cases}, and conclude on the number of solutions without computing them.
  • b) State the consistency theorem (Rouché-Capelli): a system AX=BAX=B is consistent if and only if rank⁡(A)=rank⁡([A ∣ B])\operatorname{rank}(A)=\operatorname{rank}([A\,|\,B]). Illustrate the inconsistent case on {x+2y+z=32x+4y+2z=7\begin{cases} x+2y+z=3 \\ 2x+4y+2z=7 \end{cases} by comparing the two ranks.
  • c) For a consistent system in nn unknowns, express the number of free parameters in terms of the rank, and deduce the criterion for a unique solution.
  • d) Can a system of 55 equations in 33 unknowns have a unique solution? Infinitely many? None? Discuss each case using the rank, stressing that it is the rank, not the number of equations, that decides.

Type your answers, the page tells you right or wrong 0/5

a)
b)
c)
d)
Show the solution

Answers

  • a) Rank 3: unique solution
  • b) Ranks 1 and 2: inconsistent
  • c) n−rank⁡(A)n-\operatorname{rank}(A) parameters
  • d) All three cases are possible
a)

Row reduce the coefficient matrix. With R2→R2−2R1R_{2}\to R_{2}-2R_{1} and R3→R3−3R1R_{3}\to R_{3}-3R_{1}, then R3→R3+2R2R_{3}\to R_{3}+2R_{2}, we obtain the row echelon form [12−1013002]\left[\begin{array}{ccc} 1 & 2 & -1 \\ 0 & 1 & 3 \\ 0 & 0 & 2 \end{array}\right] (the computation is that of exercise 1). It has three pivots, so rank⁡(A)=3\operatorname{rank}(A)=3. Since the rank equals the number of unknowns, the system has a UNIQUE SOLUTION, and this is known before it is even computed. The determinant confirms it: det⁡(A)=2≠0\det(A)=2\neq 0, in agreement with the rank, since a nonzero determinant always signals full rank.

b)

The consistency theorem states that a system AX=BAX=B has at least one solution if and only if the rank of the coefficient matrix AA equals the rank of the augmented matrix [A ∣ B][A\,|\,B]. In other words, attaching the column of constants must not create an extra pivot. For the given system, the augmented matrix is [12132427]\left[\begin{array}{ccc|c} 1 & 2 & 1 & 3 \\ 2 & 4 & 2 & 7 \end{array}\right]. The operation R2→R2−2R1R_{2}\to R_{2}-2R_{1} gives [0 0 0 ∣ 1][0\ 0\ 0\,|\,1]. The left part then has a single pivot, so rank⁡(A)=1\operatorname{rank}(A)=1, while the augmented matrix has a pivot in the column of constants, so rank⁡([A ∣ B])=2\operatorname{rank}([A\,|\,B])=2. The two ranks differ, so the system is INCONSISTENT: this is the impossible row 0=10=1, stated in terms of rank. The theorem formalizes exactly the signal you spot during row reduction.

c)

For a consistent system in nn unknowns, the number of free parameters is n−rank⁡(A)n-\operatorname{rank}(A): each pivot fixes a leading unknown, and the remaining unknowns, n−rank⁡(A)n-\operatorname{rank}(A) of them, become free. The criterion for a unique solution follows at once: the solution is unique when there is NO free parameter, that is, when rank⁡(A)=n\operatorname{rank}(A)=n. In short, a consistent system has a unique solution if rank⁡(A)=n\operatorname{rank}(A)=n, and infinitely many if rank⁡(A)<n\operatorname{rank}(A)<n, the infinite family having dimension n−rank⁡(A)n-\operatorname{rank}(A).

d)

All three cases are possible, and the rank is what separates them, never the number of equations. The rank of a 5×35\times 3 matrix cannot exceed 33, the smaller of the numbers of rows and columns. Unique solution: if rank⁡(A)=rank⁡([A ∣ B])=3\operatorname{rank}(A)=\operatorname{rank}([A\,|\,B])=3, the five equations reduce to three independent equations that determine the three unknowns; the two extra equations are consequences of the others, so redundant but consistent. Infinitely many: if the two ranks are equal but less than 33, say 22, then 3−2=13-2=1 free parameter remains. No solution: if rank⁡(A)<rank⁡([A ∣ B])\operatorname{rank}(A)<\operatorname{rank}([A\,|\,B]), which happens as soon as one equation contradicts the others, the system is inconsistent, the most common situation when five constraints are imposed on only three unknowns. That is the moral of the chapter: having more equations than unknowns guarantees nothing, and having fewer equations does not rule out inconsistency; only the rank settles it.

three equations in two unknowns: one too manyCONSISTENTone common pointINCONSISTENTthree distinct intersections

Part B: exam level (/50)

Exercise 6: Homogeneous systems and nontrivial solutions

A homogeneous system is a system AX=0AX=0, in which every constant term is zero. This exercise establishes its properties, then applies them.

  • a) Prove that a homogeneous system is never inconsistent, and state what is called its trivial solution.
  • b) State and justify the condition on det⁡(A)\det(A) that guarantees the existence of NONTRIVIAL solutions.
  • c) Find all the values of kk for which the system {kx+y+z=0x+ky+z=0x+y+kz=0\begin{cases} kx+y+z=0 \\ x+ky+z=0 \\ x+y+kz=0 \end{cases} has nontrivial solutions.
  • d) For each of the values found in c), give the solution set in parametric form.
  • e) Prove that if a system AX=BAX=B has two distinct solutions, then it has infinitely many.

Type your answers, the page tells you right or wrong 0/6

a)
b)
c)
d)
Show the solution

Answers

  • a) X=0X=0 is always a solution
  • b) Nontrivial if det⁡A=0\det A=0
  • c) k=1k=1 or k=−2k=-2
  • d) k=1k=1: plane; k=−2k=-2: line t(1,1,1)t(1, 1, 1)
  • e) X1+λ(X2−X1)X_1+\lambda(X_2-X_1): infinitely many
a)

Whatever AA is, the zero vector satisfies A⋅0=0A\cdot 0=0. A homogeneous system therefore always has at least the solution X=0X=0, that is x=y=z=0x=y=z=0, called the TRIVIAL solution. A homogeneous system can thus never be inconsistent: the three general cases shrink to two here, either the trivial solution is the only one, or there are infinitely many.

Reading it on the row reduction: the column of constants is zero at the start, and it stays zero through every elementary operation, since any combination of zeros is zero. A row of the form [0 0 0 ∣ c][0\ 0\ 0\,|\,c] with c≠0c\neq 0 can therefore never appear.

b)

The homogeneous system has nontrivial solutions if and only if det⁡(A)=0\det(A)=0.

Justification. If det⁡(A)≠0\det(A)\neq 0, then AA is invertible, and AX=0AX=0 can be multiplied by A−1A^{-1}: X=A−1⋅0=0X=A^{-1}\cdot 0=0. The trivial solution is then the ONLY one. Conversely, if det⁡(A)=0\det(A)=0, the matrix is not invertible, row reduction produces fewer pivots than unknowns, so at least one free parameter appears; giving this parameter a nonzero value yields a nontrivial solution.

An equivalent reading in terms of sets of vectors: det⁡(A)=0\det(A)=0 means that the columns of AA are linearly dependent, and a dependence relation among the columns is exactly a nontrivial solution of AX=0AX=0. The two chapters say the same thing.

c)

Compute the determinant by cofactor expansion along the first row: det⁡=k(k2−1)−1(k−1)+1(1−k)=k3−k−k+1+1−k=k3−3k+2\det=k(k^{2}-1)-1(k-1)+1(1-k)=k^{3}-k-k+1+1-k=k^{3}-3k+2.

Look for an obvious root: for k=1k=1, 1−3+2=01-3+2=0. So factor out k−1k-1: k3−3k+2=(k−1)(k2+k−2)=(k−1)(k−1)(k+2)=(k−1)2(k+2)k^{3}-3k+2=(k-1)(k^{2}+k-2)=(k-1)(k-1)(k+2)=(k-1)^{2}(k+2).

The determinant vanishes for k=1k=1 (double root) and k=−2k=-2. These are the only two values that give nontrivial solutions.

d)

For k=1k=1, the three equations become identical and reduce to x+y+z=0x+y+z=0. A single pivot remains for three unknowns, so 3−1=23-1=2 free parameters. Setting y=sy=s and z=tz=t gives x=−s−tx=-s-t, and the solution set is {(−s−t,s,t) : s,t∈R}\{(-s-t, s, t)\ :\ s,t\in\mathbb{R}\}. Geometrically, it is a PLANE through the origin. The double root of the determinant shows up here as the loss of two pivots instead of one.

For k=−2k=-2, the system reads {−2x+y+z=0x−2y+z=0x+y−2z=0\begin{cases} -2x+y+z=0 \\ x-2y+z=0 \\ x+y-2z=0 \end{cases}. Subtracting the second equation from the first: −3x+3y=0-3x+3y=0, so x=yx=y. Subtracting the third from the second: −3y+3z=0-3y+3z=0, so y=zy=z. Hence x=y=zx=y=z, and setting z=tz=t gives {(t,t,t) : t∈R}\{(t, t, t)\ :\ t\in\mathbb{R}\}, with a single parameter. Check on the first equation: −2t+t+t=0-2t+t+t=0, correct. Geometrically, it is a LINE through the origin, with direction vector (1,1,1)(1, 1, 1).

A point to remember: in both cases, the solution set contains the origin. That is a feature of homogeneous systems, and it sets them apart from general systems, whose solution set is a line or a plane that does not necessarily pass through the origin.

e)

Let X1X_{1} and X2X_{2} be two distinct solutions, so AX1=BAX_{1}=B and AX2=BAX_{2}=B with X1≠X2X_{1}\neq X_{2}. For any real number λ\lambda, set Xλ=X1+λ(X2−X1)X_{\lambda}=X_{1}+\lambda(X_{2}-X_{1}).

Compute: AXλ=AX1+λ(AX2−AX1)=B+λ(B−B)=B+λ⋅0=BAX_{\lambda}=AX_{1}+\lambda\big(AX_{2}-AX_{1}\big)=B+\lambda(B-B)=B+\lambda\cdot 0=B. So XλX_{\lambda} is a solution for EVERY real number λ\lambda.

Moreover, these solutions are pairwise distinct: if Xλ=XμX_{\lambda}=X_{\mu}, then (λ−μ)(X2−X1)=0(\lambda-\mu)(X_{2}-X_{1})=0, and since X2−X1≠0X_{2}-X_{1}\neq 0 by hypothesis, we must have λ=μ\lambda=\mu. Each real number λ\lambda therefore gives a different solution: the system has infinitely many.

Along the way, this result proves that there can never be exactly two, or exactly three, solutions. The number of solutions of a linear system is always 00, 11 or infinite, and this proof explains why any case in between is impossible. Geometrically, the formula X1+λ(X2−X1)X_{1}+\lambda(X_{2}-X_{1}) is the parametric equation of the line through the two solutions: as soon as two solutions exist, the whole line joining them is made of solutions.

Exercise 7: Problem: full discussion of a system with two parameters

For real numbers aa and bb, consider the system {x+2y+z=12x+5y+3z=43x+7y+az=b\begin{cases} x+2y+z=1 \\ 2x+5y+3z=4 \\ 3x+7y+az=b \end{cases}.

The goal is to determine, according to the values of aa and bb, the number of solutions of the system, then to compute them in each case. It is the most common exercise format at the end of the chapter, and the one where the most marks are lost by forgetting a case.

  • a) Write the augmented matrix and row reduce it in terms of aa and bb. Be careful never to divide by an expression that can be zero.
  • b) For which values of aa and bb does the system have a unique solution?
  • c) For which values does the system have no solution? Interpret geometrically.
  • d) For which values does it have infinitely many solutions? Give the solution set in parametric form.
  • e) Solve the system completely for a=5a=5 and b=7b=7.
  • f) Compute the determinant of the coefficient matrix in terms of aa, and explain why it gives back exactly the condition found in b).

Type your answers, the page tells you right or wrong 0/8

b)
c)
d)
e)
f)
Show the solution

Answers

  • a) Last row (0,0,a−4 ∣ b−5)(0, 0, a-4\,|\,b-5)
  • b) a≠4a\neq 4
  • c) a=4a=4, b≠5b\neq 5
  • d) a=4a=4, b=5b=5: (t−3,2−t,t)(t-3, 2-t, t)
  • e) (−1,0,2)(-1, 0, 2)
  • f) det⁡A=a−4\det A=a-4
a)

Augmented matrix: [1211253437ab]\left[\begin{array}{ccc|c} 1 & 2 & 1 & 1 \\ 2 & 5 & 3 & 4 \\ 3 & 7 & a & b \end{array}\right]. The top-left pivot is 11 and depends on no parameter, so it can be used without precaution.

R2→R2−2R1R_{2}\to R_{2}-2R_{1} gives (0,1,1 ∣ 2)(0, 1, 1\,|\,2). R3→R3−3R1R_{3}\to R_{3}-3R_{1} gives (0,1,a−3 ∣ b−3)(0, 1, a-3\,|\,b-3).

The second pivot is 11, and it does not depend on the parameters either. R3→R3−R2R_{3}\to R_{3}-R_{2} gives (0,0,a−3−1 ∣ b−3−2)=(0,0,a−4 ∣ b−5)(0, 0, a-3-1\,|\,b-3-2)=(0, 0, a-4\,|\,b-5).

The row echelon form is [1211011200a−4b−5]\left[\begin{array}{ccc|c} 1 & 2 & 1 & 1 \\ 0 & 1 & 1 & 2 \\ 0 & 0 & a-4 & b-5 \end{array}\right]. The whole discussion now plays out on the last row, which reads (a−4)z=b−5(a-4)z=b-5. A key point of method: we never divided by a−4a-4, we only subtracted. Dividing a row by a parametric expression without discussing whether it is zero is the error that costs the whole question, because it silently assumes a≠4a\neq 4 and skips the most interesting case.

b)

If a−4≠0a-4\neq 0, that is a≠4a\neq 4, we may divide and get z=b−5a−4z=\dfrac{b-5}{a-4}. There are then three pivots for three unknowns, so a UNIQUE SOLUTION, whatever the value of bb.

Work upward to get it in general. The second row gives y=2−zy=2-z. The first gives x=1−2y−z=1−2(2−z)−z=1−4+2z−z=z−3x=1-2y-z=1-2(2-z)-z=1-4+2z-z=z-3. The unique solution is therefore (b−5a−4−3,2−b−5a−4,b−5a−4)\left(\dfrac{b-5}{a-4}-3, 2-\dfrac{b-5}{a-4}, \dfrac{b-5}{a-4}\right).

c)

If a=4a=4, the last row becomes 0z=b−50z=b-5. When b≠5b\neq 5, this equation reads 0=b−50=b-5 with b−5≠0b-5\neq 0: it is impossible. The system has NO solution for a=4a=4 and b≠5b\neq 5.

Geometric interpretation: the three planes have no point common to all three. Here the first two planes do meet along a line, but the third plane is parallel to that line without containing it. The configuration is a prism: the planes meet pairwise along three distinct parallel lines, with no point common to all three.

d)

If a=4a=4 AND b=5b=5, the last row becomes 0=00=0, an equation that is always true and carries no information. The system is consistent with two pivots for three unknowns, so 3−2=13-2=1 free parameter: it has INFINITELY many solutions.

Set z=tz=t. The second row gives y+t=2y+t=2, so y=2−ty=2-t. The first gives x+2(2−t)+t=1x+2(2-t)+t=1, that is x+4−2t+t=1x+4-2t+t=1, so x=t−3x=t-3. The solution set is {(t−3,2−t,t) : t∈R}\{(t-3, 2-t, t)\ :\ t\in\mathbb{R}\}.

Check for t=0t=0, that is (−3,2,0)(-3, 2, 0): equation 1, −3+4+0=1-3+4+0=1, correct; equation 2, −6+10+0=4-6+10+0=4, correct; equation 3 with a=4a=4, −9+14+0=5=b-9+14+0=5=b, correct. Geometrically, the three planes meet along a line with direction vector (1,−1,1)(1, -1, 1), read off the coefficients of tt.

e)

For a=5a=5 and b=7b=7, we are in the case a≠4a\neq 4, so there is a unique solution. The last row gives (5−4)z=7−5(5-4)z=7-5, that is z=2z=2. Then y=2−z=0y=2-z=0, and x=z−3=−1x=z-3=-1.

Check in the original system: equation 1, −1+0+2=1-1+0+2=1, correct; equation 2, −2+0+6=4-2+0+6=4, correct; equation 3, 3(−1)+7(0)+5(2)=−3+10=73(-1)+7(0)+5(2)=-3+10=7, correct. The solution is (−1,0,2)(-1, 0, 2).

f)

det⁡(A)=∣12125337a∣=1(5a−21)−2(2a−9)+1(14−15)=5a−21−4a+18−1=a−4\det(A)=\begin{vmatrix} 1 & 2 & 1 \\ 2 & 5 & 3 \\ 3 & 7 & a \end{vmatrix}=1(5a-21)-2(2a-9)+1(14-15)=5a-21-4a+18-1=a-4.

The determinant is exactly a−4a-4, which is precisely the last pivot obtained by row reduction. This is no coincidence: the elementary operations used here, which consist only of adding a multiple of one row to another, do NOT change the determinant. The determinant of the echelon matrix is therefore equal to that of AA, and for a triangular matrix it is the product of the diagonal entries, that is 1×1×(a−4)=a−41\times 1\times(a-4)=a-4.

The condition det⁡(A)≠0\det(A)\neq 0, that is a≠4a\neq 4, is therefore exactly the same as the unique-solution condition found in b). The two approaches, row reduction and determinant, necessarily agree.

What the determinant does NOT say, on the other hand, deserves emphasis. It settles the unique solution, but when it is zero it is silent about what comes next: it does not distinguish the case b≠5b\neq 5 (no solution) from the case b=5b=5 (infinitely many), since it does not even depend on bb. Only row reduction of the AUGMENTED matrix, which carries the right-hand side, separates these two cases. That is why Cramer's rule becomes unusable as soon as the determinant is zero, and why a full discussion always goes through Gauss.

Exercise 8: The structure of the solution set

When a system AX=BAX=B has infinitely many solutions, they are not scattered at random: they are organized around one particular solution. This exercise establishes the structure X=Xp+XhX=X_{p}+X_{h}, where XpX_{p} is a particular solution and XhX_{h} runs through the solutions of the associated homogeneous system.

  • a) Prove that if XpX_{p} is a solution of AX=BAX=B and XhX_{h} a solution of AX=0AX=0, then Xp+XhX_{p}+X_{h} is a solution of AX=BAX=B. Prove the converse: every solution of AX=BAX=B can be written Xp+XhX_{p}+X_{h} for some XhX_{h} that solves the homogeneous system.
  • b) Consider the system {x+y+z=6x+2y+3z=142x+3y+4z=20\begin{cases} x+y+z=6 \\ x+2y+3z=14 \\ 2x+3y+4z=20 \end{cases}. Check that Xp=(−2,8,0)X_{p}=(-2, 8, 0) is a solution, then solve the associated homogeneous system.
  • c) Write the general solution in the form Xp+t XhX_{p}+t\,X_{h}, and compare it with the parametric form (t−2,8−2t,t)(t-2, 8-2t, t) obtained by direct row reduction.
  • d) Interpret geometrically: why does the solution set of the homogeneous system always pass through the origin, while that of the full system, in general, does not? What does XpX_{p} represent in this picture?

Type your answers, the page tells you right or wrong 0/3

b)
c)
d)
Show the solution

Answers

  • a) A(Xp+Xh)=BA(X_p+X_h)=B, and the converse
  • b) Xh=t(1,−2,1)X_h=t(1, -2, 1)
  • c) (−2,8,0)+t(1,−2,1)(-2, 8, 0)+t(1, -2, 1): same set
  • d) Line translated by XpX_p
a)

Forward direction. Suppose AXp=BAX_{p}=B and AXh=0AX_{h}=0. Then, by linearity of the matrix product, A(Xp+Xh)=AXp+AXh=B+0=BA(X_{p}+X_{h})=AX_{p}+AX_{h}=B+0=B. So Xp+XhX_{p}+X_{h} is indeed a solution of AX=BAX=B. Converse. Let XX be any solution of AX=BAX=B. Set Xh=X−XpX_{h}=X-X_{p}. Then AXh=A(X−Xp)=AX−AXp=B−B=0AX_{h}=A(X-X_{p})=AX-AX_{p}=B-B=0, so XhX_{h} solves the homogeneous system. Writing X=Xp+XhX=X_{p}+X_{h} expresses XX in the required form. Together, the two directions show that the solution set of AX=BAX=B is EXACTLY the set of all Xp+XhX_{p}+X_{h} as XhX_{h} runs through the homogeneous solutions.

b)

Check of Xp=(−2,8,0)X_{p}=(-2, 8, 0): equation 1, −2+8+0=6-2+8+0=6, correct; equation 2, −2+16+0=14-2+16+0=14, correct; equation 3, −4+24+0=20-4+24+0=20, correct. It is indeed a solution. Associated homogeneous system: {x+y+z=0x+2y+3z=02x+3y+4z=0\begin{cases} x+y+z=0 \\ x+2y+3z=0 \\ 2x+3y+4z=0 \end{cases}. With R2→R2−R1R_{2}\to R_{2}-R_{1} we get y+2z=0y+2z=0, and R3→R3−2R1R_{3}\to R_{3}-2R_{1} gives y+2z=0y+2z=0, the same row. Two pivots remain for three unknowns, so one free parameter. Setting z=tz=t, we get y=−2ty=-2t and x=−y−z=2t−t=tx=-y-z=2t-t=t. The set of homogeneous solutions is {t(1,−2,1) : t∈R}\{t(1, -2, 1)\ :\ t\in\mathbb{R}\}.

c)

The general solution is therefore X=Xp+t Xh=(−2,8,0)+t(1,−2,1)=(−2+t,8−2t,t)X=X_{p}+t\,X_{h}=(-2, 8, 0)+t(1, -2, 1)=(-2+t, 8-2t, t). The parametric form obtained by direct row reduction was (t−2,8−2t,t)(t-2, 8-2t, t): it is exactly the same set, since −2+t=t−2-2+t=t-2. The two approaches agree, but the form Xp+t XhX_{p}+t\,X_{h} says more: it visibly separates the fixed part, a particular solution, from the moving part, which describes every direction along which you can move without leaving the solution set.

d)

The homogeneous system AX=0AX=0 always has the trivial solution X=0X=0: its solution set therefore contains the origin, and here it is a line through OO with direction vector (1,−2,1)(1, -2, 1). The solution set of the full system, for its part, is that same line TRANSLATED by the vector XpX_{p}: it has the same direction (1,−2,1)(1, -2, 1), but it is shifted and no longer passes through the origin, except in the special case B=0B=0. That is the geometric meaning of the decomposition: XhX_{h} gives the DIRECTION of the solution set, a subspace through the origin, and XpX_{p} gives the TRANSLATION that puts it in the right place. We say that the solution set of a consistent system is an AFFINE subspace, that is, a shifted subspace. Choosing another particular solution does not change this set: it only amounts to locating the same object from another one of its points.

-4-3-2-1123456-4-3-2-1123456particular solutionhomogeneoussolutions

Exercise 9: Interpolation: the parabola through three points

Making a curve pass through prescribed points translates into a linear system whose unknowns are the coefficients of the curve. That is the principle of interpolation, which is everywhere in numerical computing. Here we look for the parabola y=ax2+bx+cy=ax^{2}+bx+c.

-11234-11234567(1, 2)(2, 3)(3, 6)
  • a) Write the linear system in the unknowns aa, bb, cc expressing that the parabola passes through the points (1,2)(1, 2), (2,3)(2, 3) and (3,6)(3, 6).
  • b) Solve this system and give the equation of the parabola.
  • c) The determinant of the coefficient matrix is a Vandermonde determinant. Compute it and show that it is nonzero as soon as the three xx-coordinates are distinct. What does this guarantee about the existence and uniqueness of the parabola?
  • d) Now require the curve to pass through (0,1)(0, 1), (1,3)(1, 3) and (2,5)(2, 5), three COLLINEAR points. Solve and interpret the value found for aa. Does the system still have a unique solution?

Type your answers, the page tells you right or wrong 0/8

b)
c)
d)
Show the solution

Answers

  • a) a+b+c=2a+b+c=2, 4a+2b+c=34a+2b+c=3, 9a+3b+c=69a+3b+c=6
  • b) y=x2−2x+3y=x^2-2x+3
  • c) Determinant −2-2: unique parabola
  • d) y=2x+1y=2x+1: a=0a=0, unique solution
a)

Saying that the parabola y=ax2+bx+cy=ax^{2}+bx+c passes through a point (x0,y0)(x_{0}, y_{0}) means imposing ax02+bx0+c=y0ax_{0}^{2}+bx_{0}+c=y_{0}. Substituting each xx-coordinate, the three points give {a(1)2+b(1)+c=2a(2)2+b(2)+c=3a(3)2+b(3)+c=6\begin{cases} a(1)^{2}+b(1)+c=2 \\ a(2)^{2}+b(2)+c=3 \\ a(3)^{2}+b(3)+c=6 \end{cases}, that is {a+b+c=24a+2b+c=39a+3b+c=6\begin{cases} a+b+c=2 \\ 4a+2b+c=3 \\ 9a+3b+c=6 \end{cases}. The unknowns are the coefficients aa, bb, cc, not the points, which are data. Three points, three equations, three unknowns: interpolation IS a linear system, nothing more and nothing less.

b)

Eliminate cc by taking differences. The second equation minus the first: 3a+b=13a+b=1. The third minus the second: 5a+b=35a+b=3. Subtracting these two relations: 2a=22a=2, so a=1a=1. Then b=1−3a=1−3=−2b=1-3a=1-3=-2, and c=2−a−b=2−1+2=3c=2-a-b=2-1+2=3. The parabola is y=x2−2x+3y=x^{2}-2x+3. Check on the three points: at x=1x=1, 1−2+3=21-2+3=2; at x=2x=2, 4−4+3=34-4+3=3; at x=3x=3, 9−6+3=69-6+3=6. All three points lie on it.

c)

The coefficient matrix is (111421931)\begin{pmatrix} 1 & 1 & 1 \\ 4 & 2 & 1 \\ 9 & 3 & 1 \end{pmatrix}, whose rows are built on the powers of the xx-coordinates x1=1x_{1}=1, x2=2x_{2}=2, x3=3x_{3}=3: it is a Vandermonde matrix. Its determinant factors, up to sign, into the product of the differences of the xx-coordinates: with the columns ordered from x2x^{2} down to 11, the reverse of the usual Vandermonde matrix, det⁡=−(x2−x1)(x3−x1)(x3−x2)=−(2−1)(3−1)(3−2)=−2\det=-(x_{2}-x_{1})(x_{3}-x_{1})(x_{3}-x_{2})=-(2-1)(3-1)(3-2)=-2. Direct check: 1(2−3)−1(4−9)+1(12−18)=−21(2-3)-1(4-9)+1(12-18)=-2. This product is nonzero as soon as the three xx-coordinates are DISTINCT, since each factor is then nonzero. A nonzero determinant guarantees that the system has a unique solution: there is therefore one parabola, and only one, through three points with distinct xx-coordinates. This is the fundamental result of polynomial interpolation: n+1n+1 points with distinct xx-coordinates determine a unique polynomial of degree at most nn.

d)

The system becomes {c=1a+b+c=34a+2b+c=5\begin{cases} c=1 \\ a+b+c=3 \\ 4a+2b+c=5 \end{cases}. From the first, c=1c=1. The second gives a+b=2a+b=2, the third 4a+2b=44a+2b=4, that is 2a+b=22a+b=2. Subtracting, a=0a=0, then b=2b=2. The solution is a=0a=0, b=2b=2, c=1c=1, which gives y=2x+1y=2x+1: a LINE. The value a=0a=0 shows that the parabola degenerates into a line, which was to be expected since the three points lie on the line of slope 22. The system still has a UNIQUE solution: the xx-coordinates 00, 11, 22 are distinct, so the Vandermonde determinant −(1−0)(2−0)(2−1)=−2-(1-0)(2-0)(2-1)=-2 is still nonzero, and uniqueness is guaranteed. Three points with distinct xx-coordinates always determine a unique polynomial of degree at most 22; this polynomial is a true parabola if and only if the points are not collinear, otherwise the leading coefficient aa is zero.

-112345246810(1, 2)(2, 3)(3, 6)y = x² - 2x + 3

Exercise 10: Problem: balancing a chemical equation with a homogeneous system

Balancing a chemical reaction means finding the coefficients that conserve each type of atom. The problem translates into a HOMOGENEOUS linear system, whose solution set shows why a reaction can always be balanced, and only up to a multiplicative constant. We balance the combustion of propane: x1 C3H8+x2 O2→x3 CO2+x4 H2Ox_{1}\,\mathrm{C_{3}H_{8}}+x_{2}\,\mathrm{O_{2}}\rightarrow x_{3}\,\mathrm{CO_{2}}+x_{4}\,\mathrm{H_{2}O}.

  • a) By writing the conservation of carbon, hydrogen and oxygen, set up the homogeneous system of three equations satisfied by x1x_{1}, x2x_{2}, x3x_{3}, x4x_{4}.
  • b) Solve this system. How many free parameters does it have, and why was that predictable?
  • c) Find the smallest positive integer coefficients and write the balanced equation. Check the conservation of each atom.
  • d) Explain why the system necessarily has nontrivial solutions, and what physical meaning the free parameter carries.

Type your answers, the page tells you right or wrong 0/6

b)
c)
d)
Show the solution

Answers

  • a) 3x1=x33x_1=x_3, 8x1=2x48x_1=2x_4, 2x2=2x3+x42x_2=2x_3+x_4
  • b) t(1,5,3,4)t(1, 5, 3, 4): one parameter
  • c) C3H8+5 O2→3 CO2+4 H2OC_3H_8+5\,O_2\to 3\,CO_2+4\,H_2O
  • d) More unknowns than equations; scale
a)

Write the conservation atom by atom. Carbon: propane C3H8\mathrm{C_{3}H_{8}} brings in 3x13x_{1} carbon atoms, the CO2\mathrm{CO_{2}} carries away x3x_{3}, hence 3x1=x33x_{1}=x_{3}. Hydrogen: C3H8\mathrm{C_{3}H_{8}} brings in 8x18x_{1} atoms, the water H2O\mathrm{H_{2}O} carries away 2x42x_{4}, hence 8x1=2x48x_{1}=2x_{4}. Oxygen: the O2\mathrm{O_{2}} brings in 2x22x_{2} atoms, shared between 2x32x_{3} in the CO2\mathrm{CO_{2}} and x4x_{4} in the water, hence 2x2=2x3+x42x_{2}=2x_{3}+x_{4}. The homogeneous system, with every term moved to the left, is {3x1−x3=08x1−2x4=02x2−2x3−x4=0\begin{cases} 3x_{1}-x_{3}=0 \\ 8x_{1}-2x_{4}=0 \\ 2x_{2}-2x_{3}-x_{4}=0 \end{cases}.

b)

Express everything in terms of x1x_{1}. The first equation gives x3=3x1x_{3}=3x_{1}. The second gives x4=4x1x_{4}=4x_{1}. The third gives 2x2=2x3+x4=6x1+4x1=10x12x_{2}=2x_{3}+x_{4}=6x_{1}+4x_{1}=10x_{1}, so x2=5x1x_{2}=5x_{1}. Setting x1=tx_{1}=t, we get the family of solutions (x1,x2,x3,x4)=(t,5t,3t,4t)=t(1,5,3,4)(x_{1}, x_{2}, x_{3}, x_{4})=(t, 5t, 3t, 4t)=t(1, 5, 3, 4). There is ONE free parameter. That was predictable: the system has four unknowns for only three equations, so at least 4−3=14-3=1 unknown stays free. A homogeneous system with more unknowns than equations always has nontrivial solutions.

c)

The family t(1,5,3,4)t(1, 5, 3, 4) gives positive integer coefficients for every positive integer tt; the smallest correspond to t=1t=1, that is (x1,x2,x3,x4)=(1,5,3,4)(x_{1}, x_{2}, x_{3}, x_{4})=(1, 5, 3, 4). The balanced equation is C3H8+5 O2→3 CO2+4 H2O\mathrm{C_{3}H_{8}}+5\,\mathrm{O_{2}}\rightarrow 3\,\mathrm{CO_{2}}+4\,\mathrm{H_{2}O}. Check atom by atom: carbon, 33 on the left (3×13\times 1) and 33 on the right (3×13\times 1); hydrogen, 88 on the left (8×18\times 1) and 88 on the right (4×24\times 2); oxygen, 1010 on the left (5×25\times 2) and 1010 on the right (3×2+4×13\times 2+4\times 1). Every type of atom is conserved: the equation is balanced.

d)

The system is homogeneous, so it always has the trivial solution x1=x2=x3=x4=0x_{1}=x_{2}=x_{3}=x_{4}=0, which obviously makes no chemical sense. But it ALSO has nontrivial solutions, and necessarily so, for a structural reason: with four unknowns and only three equations, the row echelon form can have at most three pivots, which leaves at least one unknown free; the rank is strictly less than the number of unknowns, which guarantees infinitely many solutions. In other words, a reaction involves more species than distinct elements, and this inequality ensures that a nontrivial balancing exists. The physical meaning of the free parameter is the SCALE of the reaction: multiplying every coefficient by the same factor describes the same reaction carried out in a larger or smaller quantity. Chemistry fixes the proportions, not the absolute quantities, and that is exactly what the line of solutions t(1,5,3,4)t(1, 5, 3, 4) expresses. By convention we choose the smallest integers, but every point of this line describes the same transformation.

Part C: the classics (/50)

Exercise 11: A zero pivot and a row interchange

Consider the system {y+2z=8x+y+z=62x+y−z=1\begin{cases} y+2z=8 \\ x+y+z=6 \\ 2x+y-z=1 \end{cases}.

  • a) Write the augmented matrix. Why can't the elimination start with the top-left entry?
  • b) Interchange the first two rows, then reduce the matrix to row echelon form.
  • c) Solve the system and check the solution.
  • d) Compute the determinant of the coefficient matrix before and after the interchange. What does the interchange change, and what does it leave unchanged?
  • e) If the whole first column had been zero below the diagonal, with a zero at the top as well, what would you have had to conclude about the unknown xx?

Type your answers, the page tells you right or wrong 0/9

a)
b)
c)
d)
e)
Show the solution

Answers

  • a) Zero pivot
  • b) R1↔R2R_1\leftrightarrow R_2; last row (0,0,−1 ∣ −3)(0, 0, -1\,|\,-3)
  • c) (1,2,3)(1, 2, 3)
  • d) 11 then −1-1: sign changed
  • e) xx is a free parameter
a)

[0128111621−11]\left[\begin{array}{ccc|c} 0 & 1 & 2 & 8 \\ 1 & 1 & 1 & 6 \\ 2 & 1 & -1 & 1 \end{array}\right]. The top-left entry is zero: no multiple of the first row can clear the 11 or the 22 below it. A pivot must be NONZERO.

b)

R1↔R2R_{1}\leftrightarrow R_{2} gives [1116012821−11]\left[\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 0 & 1 & 2 & 8 \\ 2 & 1 & -1 & 1 \end{array}\right]. Then R3→R3−2R1R_{3}\to R_{3}-2R_{1} gives (0,−1,−3 ∣ −11)(0, -1, -3\,|\,-11), and R3→R3+R2R_{3}\to R_{3}+R_{2} gives (0,0,−1 ∣ −3)(0, 0, -1\,|\,-3).

c)

−z=−3-z=-3, so z=3z=3; y+6=8y+6=8, so y=2y=2; x+2+3=6x+2+3=6, so x=1x=1. Check: 2+6=82+6=8, 1+2+3=61+2+3=6 and 2+2−3=12+2-3=1.

d)

Before: 0(−1−1)−1(−1−2)+2(1−2)=3−2=10(-1-1)-1(-1-2)+2(1-2)=3-2=1. After the interchange, the determinant is −1-1: interchanging two rows changes its SIGN. The solution set, on the other hand, does not change, since we only rewrote the same equations in a different order.

e)

A column with no possible pivot at all means that the unknown xx appears in no equation: if the system is consistent, xx is a free parameter, and there is no unique solution.

The thread: a zero pivot is bypassed by a row interchange, which does not change the solutions but changes the sign of the determinant.

Exercise 12: A system of four equations by Gaussian elimination

Consider the system {x+y+z+w=10x−y+z−w=−22x+y−z+w=5x+2y+3z−w=10\begin{cases} x+y+z+w=10 \\ x-y+z-w=-2 \\ 2x+y-z+w=5 \\ x+2y+3z-w=10 \end{cases}.

  • a) Eliminate xx from the last three equations using the first. Write the three rows you obtain.
  • b) Continue the reduction up to a triangular form.
  • c) Solve the system by back substitution.
  • d) Check the solution in the four original equations.
  • e) What is the rank of the coefficient matrix? How many solutions does the system have?

Type your answers, the page tells you right or wrong 0/9

a)
b)
c)
e)
Show the solution

Answers

  • a) (0,−2,0,−2 ∣ −12)(0, -2, 0, -2\,|\,-12), (0,−1,−3,−1 ∣ −15)(0, -1, -3, -1\,|\,-15), (0,1,2,−2 ∣ 0)(0, 1, 2, -2\,|\,0)
  • b) Pivots 11, 11, −3-3, −9-9
  • c) (1,2,3,4)(1, 2, 3, 4)
  • d) All four equations satisfied
  • e) Rank 4: unique solution
a)

R2→R2−R1R_{2}\to R_{2}-R_{1}: (0,−2,0,−2 ∣ −12)(0, -2, 0, -2\,|\,-12). R3→R3−2R1R_{3}\to R_{3}-2R_{1}: (0,−1,−3,−1 ∣ −15)(0, -1, -3, -1\,|\,-15). R4→R4−R1R_{4}\to R_{4}-R_{1}: (0,1,2,−2 ∣ 0)(0, 1, 2, -2\,|\,0).

b)

Divide R2R_{2} by −2-2: (0,1,0,1 ∣ 6)(0, 1, 0, 1\,|\,6). Then R3→R3+R2R_{3}\to R_{3}+R_{2}: (0,0,−3,0 ∣ −9)(0, 0, -3, 0\,|\,-9) and R4→R4−R2R_{4}\to R_{4}-R_{2}: (0,0,2,−3 ∣ −6)(0, 0, 2, -3\,|\,-6). Finally R4→3R4+2R3R_{4}\to 3R_{4}+2R_{3}: (0,0,0,−9 ∣ −36)(0, 0, 0, -9\,|\,-36).

c)

−9w=−36-9w=-36, so w=4w=4. −3z=−9-3z=-9, so z=3z=3. y+w=6y+w=6, so y=2y=2. x+y+z+w=10x+y+z+w=10, so x=1x=1. The solution is (1,2,3,4)(1, 2, 3, 4).

d)

1+2+3+4=101+2+3+4=10; 1−2+3−4=−21-2+3-4=-2; 2+2−3+4=52+2-3+4=5; 1+4+9−4=101+4+9-4=10. All four equations are satisfied.

e)

The row echelon form has four pivots, 11, 11, −3-3 and −9-9: the rank is 44, equal to the number of unknowns, and the solution is unique. The method is the same as in dimension 3, with one more step; multiplying a row by 33 to avoid fractions is allowed, provided you never multiply by zero.

The thread: whatever the size, Gaussian elimination clears one unknown per column, and the number of pivots decides the number of solutions.

Exercise 13: The LU decomposition

Consider A=(211433879)A=\begin{pmatrix} 2 & 1 & 1 \\ 4 & 3 & 3 \\ 8 & 7 & 9 \end{pmatrix}. Reducing AA to row echelon form without row interchanges amounts to writing A=LUA=LU, with UU upper triangular, the echelon form, and LL lower triangular, with 11s on its diagonal, which stores the multipliers used.

  • a) Reduce AA to row echelon form, recording each multiplier, and give UU.
  • b) Write LL by placing each multiplier in the position of the entry it cleared, then check that LU=ALU=A on the last row.
  • c) Deduce det⁡A\det A.
  • d) Solve AX=BAX=B with B=(41024)B=\begin{pmatrix} 4 \\ 10 \\ 24 \end{pmatrix} in two stages: LY=BLY=B by forward substitution, then UX=YUX=Y by back substitution.
  • e) Why is this decomposition worthwhile when many systems must be solved with the same matrix AA?

Type your answers, the page tells you right or wrong 0/10

a)
b)
c)
d)
e)
Show the solution

Answers

  • a) U=(211011002)U=\begin{pmatrix}2&1&1\\0&1&1\\0&0&2\end{pmatrix}
  • b) L=(100210431)L=\begin{pmatrix}1&0&0\\2&1&0\\4&3&1\end{pmatrix}
  • c) det⁡A=4\det A=4
  • d) Y=(4,2,2)Y=(4, 2, 2), X=(1,1,1)X=(1, 1, 1)
  • e) Row reduction done once
a)

R2→R2−2R1R_{2}\to R_{2}-2R_{1} gives (0,1,1)(0, 1, 1), multiplier 22. R3→R3−4R1R_{3}\to R_{3}-4R_{1} gives (0,3,5)(0, 3, 5), multiplier 44. R3→R3−3R2R_{3}\to R_{3}-3R_{2} gives (0,0,2)(0, 0, 2), multiplier 33. So U=(211011002)U=\begin{pmatrix} 2 & 1 & 1 \\ 0 & 1 & 1 \\ 0 & 0 & 2 \end{pmatrix}.

b)

L=(100210431)L=\begin{pmatrix} 1 & 0 & 0 \\ 2 & 1 & 0 \\ 4 & 3 & 1 \end{pmatrix}. Last row of LULU: (4⋅2,4⋅1+3⋅1,4⋅1+3⋅1+1⋅2)=(8,7,9)(4\cdot 2, 4\cdot 1+3\cdot 1, 4\cdot 1+3\cdot 1+1\cdot 2)=(8, 7, 9), which is indeed the last row of AA.

c)

det⁡A=det⁡L×det⁡U=1×(2×1×2)=4\det A=\det L\times\det U=1\times(2\times 1\times 2)=4: the determinant of a triangular matrix is read off its diagonal.

d)

LY=BLY=B: y1=4y_{1}=4, 2y1+y2=102y_{1}+y_{2}=10 so y2=2y_{2}=2, 4y1+3y2+y3=244y_{1}+3y_{2}+y_{3}=24 so y3=2y_{3}=2. UX=YUX=Y: 2z=22z=2 so z=1z=1, y+z=2y+z=2 so y=1y=1, 2x+y+z=42x+y+z=4 so x=1x=1. The solution is (1,1,1)(1, 1, 1), and indeed A(111)=(41024)A\begin{pmatrix}1\\1\\1\end{pmatrix}=\begin{pmatrix}4\\10\\24\end{pmatrix}.

e)

The row reduction, the expensive part, is done only once. Each new right-hand side then needs only one forward and one back substitution, two very fast triangular computations: that is how software solves large systems, rather than by computing A−1A^{-1}.

The thread: the matrix LL keeps a record of the row reduction; solving AX=BAX=B becomes two triangular systems.

Exercise 14: Problem: the equilibrium temperature of a plate

A square plate is held at 100 ∘C100\ ^{\circ}\mathrm{C} along its top edge, at 0 ∘C0\ ^{\circ}\mathrm{C} along its bottom edge and at 50 ∘C50\ ^{\circ}\mathrm{C} along its left and right edges. We study four interior points arranged in a square: T1T_{1} top left, T2T_{2} top right, T3T_{3} bottom left and T4T_{4} bottom right.

At equilibrium, the temperature at each interior point is the average of the temperatures of its four neighbours: the two nearest points on the edge and the two adjacent interior points.

100 °C0 °C50 °C50 °CT₁T₂T₃T₄
  • a) Write the equation satisfied by T1T_{1}, then the other three.
  • b) Put the system in the form AT=BAT=B and row reduce it.
  • c) Find the four temperatures.
  • d) Recover the result using the left-right symmetry of the plate.
  • e) Compute the average of the four temperatures. Why was it predictable?

Type your answers, the page tells you right or wrong 0/5

a)
c)
d)
e)
Show the solution

Answers

  • a) 4T1=150+T2+T34T_1=150+T_2+T_3, and so on
  • b) Four pivots: unique solution
  • c) T1=T2=62.5T_1=T_2=62.5 °C, T3=T4=37.5T_3=T_4=37.5 °C
  • d) 3a−b=1503a-b=150, −a+3b=50-a+3b=50
  • e) 50 °C
a)

The neighbours of T1T_{1} are the top edge, 100100, the left edge, 5050, then T2T_{2} and T3T_{3}: 4T1=150+T2+T34T_{1}=150+T_{2}+T_{3}. Likewise 4T2=150+T1+T44T_{2}=150+T_{1}+T_{4}, 4T3=50+T1+T44T_{3}=50+T_{1}+T_{4} and 4T4=50+T2+T34T_{4}=50+T_{2}+T_{3}.

b)

[4−1−10150−140−1150−104−1500−1−1450]\left[\begin{array}{cccc|c} 4 & -1 & -1 & 0 & 150 \\ -1 & 4 & 0 & -1 & 150 \\ -1 & 0 & 4 & -1 & 50 \\ 0 & -1 & -1 & 4 & 50 \end{array}\right]. Without fractions: R2→4R2+R1R_{2}\to 4R_{2}+R_{1} gives (0,15,−1,−4 ∣ 750)(0, 15, -1, -4\,|\,750) and R3→4R3+R1R_{3}\to 4R_{3}+R_{1} gives (0,−1,15,−4 ∣ 350)(0, -1, 15, -4\,|\,350); then R3→15R3+R2R_{3}\to 15R_{3}+R_{2} gives (0,0,224,−64 ∣ 6 000)(0, 0, 224, -64\,|\,6\,000) and R4→15R4+R2R_{4}\to 15R_{4}+R_{2} gives (0,0,−16,56 ∣ 1 500)(0, 0, -16, 56\,|\,1\,500); finally R4→14R4+R3R_{4}\to 14R_{4}+R_{3} gives (0,0,0,720 ∣ 27 000)(0, 0, 0, 720\,|\,27\,000). Four nonzero pivots: the solution is unique.

c)

Back substitution: 720T4=27 000720T_{4}=27\,000, so T4=37.5T_{4}=37.5; 224T3=6 000+64×37.5=8 400224T_{3}=6\,000+64\times 37.5=8\,400, so T3=37.5T_{3}=37.5; 15T2=750+37.5+4×37.5=937.515T_{2}=750+37.5+4\times 37.5=937.5, so T2=62.5T_{2}=62.5; 4T1=150+62.5+37.54T_{1}=150+62.5+37.5, so T1=62.5T_{1}=62.5. Check: 4×62.5=250=150+62.5+37.54\times 62.5=250=150+62.5+37.5 and 4×37.5=150=50+62.5+37.54\times 37.5=150=50+62.5+37.5.

d)

The plate and its edge conditions are symmetric about the vertical axis, and the solution is unique: it is therefore symmetric, T1=T2=aT_{1}=T_{2}=a and T3=T4=bT_{3}=T_{4}=b. The system reduces to 3a−b=1503a-b=150 and −a+3b=50-a+3b=50. The first gives b=3a−150b=3a-150, then −a+9a−450=50-a+9a-450=50, that is a=62.5a=62.5 and b=37.5b=37.5.

e)

62.5+62.5+37.5+37.54=50 ∘C\frac{62.5+62.5+37.5+37.5}{4}=50\ ^{\circ}\mathrm{C}, the average of the four edges, 100+0+50+504\frac{100+0+50+50}{4}. This is no accident: adding the four equations gives 4∑Ti=400+2∑Ti4\sum T_{i}=400+2\sum T_{i}, so ∑Ti=200\sum T_{i}=200. The method, repeated on grids of thousands of points, is the one used by heat-transfer software.

The thread: a local law, the average of the neighbours, produces a linear system; symmetry and uniqueness let you reduce the number of unknowns.

Exercise 15: Problem: an ill-conditioned system

Consider the system {x+y=2x+1.001 y=2.001\begin{cases} x+y=2 \\ x+1.001\,y=2.001 \end{cases}, which models two almost redundant measurements.

  • a) Solve the system.
  • b) Compute the determinant of the coefficient matrix.
  • c) A measurement error changes the right-hand side 2.0012.001 into 2.0022.002. Solve the new system.
  • d) By what percentage did the right-hand side change, rounded to two decimal places? Compare with the change in the solution.
  • e) Interpret geometrically, and say what happens if the coefficient 1.0011.001 is rounded to 1.001.00.

Type your answers, the page tells you right or wrong 0/7

a)
b)
c)
d)
e)
Show the solution

Answers

  • a) (1,1)(1, 1)
  • b) 0.0010.001
  • c) (0,2)(0, 2)
  • d) 0.050.05% versus a completely changed solution
  • e) Almost parallel lines; rounded: no solution
a)

Subtracting the first equation from the second: 0.001 y=0.0010.001\,y=0.001, so y=1y=1 and x=1x=1.

b)

det⁡=1×1.001−1×1=0.001\det=1\times 1.001-1\times 1=0.001: nonzero, so the solution is unique, but the determinant is tiny.

c)

0.001 y=0.0020.001\,y=0.002, so y=2y=2 and x=0x=0. The solution moves from (1,1)(1, 1) to (0,2)(0, 2).

d)

0.0012.001≈0.0005\frac{0.001}{2.001}\approx 0.0005, that is about 0.05 %0.05\ \%. The solution, however, changed completely: xx goes from 11 to 00, yy doubles. A tiny error in the data produces a huge error in the result: the system is ILL-CONDITIONED.

e)

The two equations represent two almost parallel lines: their slopes, −1-1 and −11.001-\frac{1}{1.001}, barely differ. Moving one of them very slightly makes their intersection point slide a long way along the lines. With 1.001.00, the lines become parallel: x+y=2x+y=2 and x+y=2.001x+y=2.001 no longer have any solution, and the system changes nature because of a rounding.

The thread: a determinant close to zero, relative to the coefficients, signals a solution that is very sensitive to measurement errors.

-1123-2-1123(1, 1)(0, 2) with 2.002angle ≈ 0.03°
Something missing from this set? A type of exercise your teacher gives, a problem you are stuck on, a mistake you spotted: tell me, I read every request.

Sending goes through your free space: that is how I can answer you and tell you when the exercise is added. An email is enough, no password. Create your space. Rather not create an account? Write to me directly.

What is it about?
I read every request myself, nobody else sees it. No need to write your name or your school.
When your request is dealt with, you hear about it by email and in your space.

By sending, you agree that I read your request to answer it. It is kept with your account, erased with it, and never published: privacy policy.

Previous chapter Matrices, systems and determinants, 201-SN4-RE Next chapter Determinants and Cramer's rule, 201-SN4-RE

© Ahmed Squalli Houssaini. Exercise set published at www.letuteurscientifique.ca/en/exercices/cegep-sn4-linear-systems. Free for personal and classroom use; republishing it elsewhere requires written permission (legal notice).

See also

Looking for a linear algebra tutor in Montreal?

Get in touch for a first session. We work through 201-SN4-RE at the level of real CEGEP tests, from row reduction all the way to the full discussion of a system with parameters.

Site by Studio Squalli