← Back to Math 010

1.2 Gaussian Elimination: Class Notes

#7

Solve the system by Gaussian elimination.

x−y+2z−w=−12x+y−2z−2w=−2−x+2y−4z+w=13x−3w=−3

Solution

Gaussian elimination works with the augmented matrix of the system:

[1−12−1−121−2−2−2−12−411300−3−3]

Tip: Watch the difference between 0 (zero) and ∅, the empty set: ∅={}.

Step 1. Row 1 already starts with a leading 1. Make the entries below it in column 1 zero, using R2→R2−2R1, R3→R3+R1, and R4→R4−3R1:

[21−2−2−2]+[−22−422]=[03−600]

[−12−411]+[1−12−1−1]=[01−200]

[300−3−3]+[−33−633]=[03−600]

[1−12−1−103−60001−20003−600]

Step 2. Now work on column 2, below row 1. Row 3 already has a 1 there, so swap it into row 2 with R2↔R3:

[1−12−1−101−20003−60003−600]

Then clear the 3s below that leading 1 with R3→R3−3R2 and R4→R4−3R2:

[1−12−1−101−2000000000000]

This is in row echelon form, reached by Gaussian elimination. The system is now

(1)x−y+2z−w=−1(2)y−2z=0

Solve each equation for its first variable:

(1)x=y−2z+w−1(2)y=2z

Substituting y=2z into equation (1) gives x=2z−2z+w−1, so

x=w−1,y=2z

The solution is (x,y,z,w)=(w−1,2z,z,w). Let s=z and t=w. Then x=t−1, y=2s, z=s, w=t:

Answer: (x,y,z,w)=(t−1,2s,s,t)

Definitions

Row echelon form (#1-3 below) and reduced row echelon form (#1-4 below) of a matrix – to be of this form, a matrix must have the following properties:

  1. If a row does not consist entirely of zeros, then the first nonzero number in the row is a 1. This is a leading 1.
  2. If there are any rows that consist entirely of zeros, then they are grouped together at the bottom of the matrix.
  3. In any two successive rows that do not consist entirely of zeros, the leading 1 in the lower row occurs farther to the right than the leading 1 in the higher row.
  4. Each column that contains a leading 1 has zeros everywhere else in that column.

Back to #7: the row echelon form was

[1−12−1−101−2000000000000]

The −1 above the leading 1 in column 2 breaks property 4. Clear it with R1→R1+R2:

[1−12−1−1]+[01−200]=[100−1−1]

The columns go with x, y, z, w, and the constants:

[100−1−101−2000000000000]⟶x−w=−1y−2z=0

This is reduced row echelon form, reached by Gauss–Jordan elimination. It gives x=w−1 and y=2z directly, without substituting. Letting s=z and t=w gives the same result as before.

Pivots

In reduced row echelon form, the entries above and below each leading 1 are zeros.

The pivots of the original augmented matrix are the positions that hold the leading 1s in its reduced row echelon form. In #7 they are the row 1, column 1 entry and the row 2, column 2 entry.

The pivot columns are the columns that contain leading 1s. In #7 they are the x- and y-columns.

In #7 the leading 1s are in the x- and y-columns, so x and y are leading variables. The remaining variables, z and w, are free variables.

Definitions

Leading variables correspond to the leading 1’s in the augmented matrix for a linear system. Free variables are the remaining variables in the linear system.

Every variable in a system is either leading or free.

Definition

In a homogeneous linear system, the constant terms are all zero. That is, it has the form

a11x1+a12x2+…+a1nxn=0a21x1+a22x2+…+a2nxn=0⋮  ⋮am1x1+am2x2+…+amnxn=0

Theorem 1.2.1 Free Variable Theorem for Homogeneous Systems

If a homogeneous linear system has n unknowns, and if the reduced row echelon form of its augmented matrix has r nonzero rows, then the system has n−r free variables.

The r nonzero rows correspond to the leading 1s, so r counts the leading variables, and the other n−r variables are free.

Theorem 1.2.2

A homogeneous linear system with more unknowns than equations has infinitely many solutions.

For example, the system below has 3 unknowns but only 2 equations:

2x+3y−5z=04x+8y−7z=0

Proof

The number of equations in a system is the number of rows in its augmented matrix. The number of leading 1s is no more than the number of rows. Thus, such a system has at least 1 free variable. A homogeneous system is always consistent, since it has the trivial solution x1=x2=⋯=xn=0. A consistent system with a free variable has infinitely many solutions.

#28

What condition, if any, must a, b, and c satisfy for the linear system to be consistent?

x+3y+z=a−x−2y+z=b3x+7y−z=c

Solution

[131a−1−21b37−1c]

Step 1. Clear column 1 below the leading 1 with R2→R2+R1 and R3→R3−3R1:

[−1−21b]+[131a]=[012a+b]

[37−1c]+[−3−9−3−3a]=[0−2−4−3a+c]

[131a012a+b0−2−4−3a+c]

Step 2. Clear column 2 below the leading 1 with R3→R3+2R2:

[0−2−4−3a+c]+[0242a+2b]=[000−a+2b+c]

[131a012a+b000−a+2b+c]

Row 3 is the equation 0=−a+2b+c. The system has a solution exactly when this is true.

Answer: The system is consistent if a=2b+c.

Solve the given linear system by any method.

#16

2x−y−3z=0−x+2y−3z=0x+y+4z=0

Solution

[2−1−30−12−301140]

Tip: For a homogeneous system, writing the column of zeros is optional: row operations never change it. The work below leaves it off.

Step 1. Clear column 1 below row 1 with R2→R1+2R2 and R3→R3+R2 (both use the rows as they are now):

[2−1−3]+[−24−6]=[03−9]

[114]+[−12−3]=[031]

Then R2→13R2:

[2−1−301−3031]

Step 2. Clear the 3 below the leading 1 in column 2 with R3→R3−3R2:

[031]+[0−39]=[0010]

Then R3→110R3:

[2−1−301−3001]

Step 3. Clear column 3 above the leading 1 with R2→R2+3R3 and R1→R1+3R3:

[01−3]+[003]=[010]

[2−1−3]+[003]=[2−10]

[2−10010001]

Step 4. Clear the −1 in column 2 with R1→R1+R2, then R1→12R1:

[2−10]+[010]=[200]

[100001000010]⟶x=0y=0z=0

Answer: (x,y,z)=(0,0,0)

This is the trivial solution.

#19

2x+2y+4z=0w−y−3z=02w+3x+y+z=0−2w+x+3y−2z=0

Solution

Divide the first equation by 2 and use x+y+2z=0 instead. With the columns in the order w, x, y, z (leaving off the column of zeros), the matrix is

[011210−1−32311−213−2]

Row 1 starts with 0, so swap it with row 2: R1↔R2.

[10−1−301122311−213−2]

Column 1. Use R3→R3−2R1 and R4→R4+R3 (adding row 3 as it is now, before it changes):

[2311]+[−2026]=[0337]

[−213−2]+[2311]=[044−1]

[10−1−301120337044−1]

Column 2. Use R3→R3−3R2 and R4→R4−4R2:

[0337]+[0−3−3−6]=[0001]

[044−1]+[0−4−4−8]=[000−9]

Then R4→R4+9R3 clears row 4, giving row echelon form:

[10−1−3011200010000]

Clear the column above the leading 1 in column 4 with R1→R1+3R3 and R2→R2−2R3 to reach reduced row echelon form (rref). With the column of zeros put back:

[10−100011000001000000]⟶w−y=0x+y=0z=0

The leading 1s are in the w-, x-, and z-columns, so w, x, and z are leading variables, and y is a free variable.

Let t=y. Then w=t, x=−t, and z=0.

Answer: (w,x,y,z)=(t,−t,t,0)

#23

The augmented matrix for a linear system is given in which the asterisk represents an unspecified real number. Determine whether the system is consistent, and if so whether the solution is unique. Answer “inconclusive” if there is not enough information to make a decision.

a. [1***01**001*]  b. [1***01**0000]

c. [1***01**0001]  d. [1***00*0001*]

Solution

a. Every variable has a leading 1, so there are no free variables, and no row is a contradiction.

Answer: Consistent, with a unique solution

b. Row 3 says 0=0, which is always true. The third column has no leading 1, so there is a free variable.

Answer: Consistent, not unique (infinitely many solutions)

c. Row 3 says 0=1, a contradiction.

Answer: Inconsistent (no solution)

d. Call the variables x, y, z. Row 3 says z equals its last entry. If the unspecified entry in row 2 is not zero, row 2 forces z=0. Then the system is consistent if the last entry of row 3 is 0, and inconsistent if it is not 0. Both can happen:

If rows 2 and 3 end in

[00200015]⟶[0020]+[00−2−10]=[000−10]

then subtracting twice the second of these rows from the first gives 0=−10: no solution. But if they are

[00100010]

subtracting gives 0=0, and the system is consistent.

Answer: Inconclusive