Precalculus with Integrated CalculusXYZ Homework Edition

⇩ Download ▾

9.1 Systems of Linear Equations: Gaussian Elimination

Up until now, when we concerned ourselves with solving different types of equations there was only one equation to solve at a time. Given an equation f ( x ) = g ( x ) , we could check our solutions geometrically by finding where the graphs of y = f ( x ) and y = g ( x ) intersect. The x -coordinates of these intersection points correspond to the solutions to the equation f ( x ) = g ( x ) , and the y -coordinates were largely ignored. If we modify the problem and ask for the intersection points of the graphs of y = f ( x ) and y = g ( x ) , where both the solution to x and y are of interest, we have what is known as a system of equations, written as

{ y = f ( x ) y = g ( x )

The `curly bracket' notation means we are to find all pairs of points ( x , y ) which satisfy both equations.

We assume the reader has some experience with systems of equations from high school algebra - specifically systems of linear equations comprised of two equations and two unknowns. We encourage the reader to read through Section A.6 before proceeding if for no other reason than to refresh themselves on the basic mechanics and vocabulary involved. In order to move this section beyond a review of high school algebra, we define what is meant by a linear equation in n variables.

Instead of using more familiar variables like x , y , and even z and/or w in Definition 9.1, we use subscripts to distinguish the different variables. We have no idea how many variables may be involved, so we use numbers to distinguish them instead of letters. (There is an endless supply of distinct numbers.)

As an example, the linear equation 3 x 1 x 2 = 4 represents the same relationship between the variables x 1 and x 2 as the equation 3 x y = 4 does between the variables x and y . And, just as we cannot combine the terms in the expression 3 x y , we cannot combine the terms in the expression 3 x 1 x 2 .

Coupling more than one linear equation in n variables results in a system of linear equations in n variables. When solving these systems, it becomes increasingly important to keep track of what operations are performed to which equations and to develop a strategy based on the kind of manipulations (substitution and elimination) taught in high school. To this end, we first remind ourselves of the maneuvers which can be applied to a system of linear equations that result in an equivalent system.1

The first move, while it obviously admits an equivalent system, seems silly to state, but our perception will change as we consider more equations and more variables in this, and later sections.

Consider the system of equations

{ x 1 3 y + 1 2 z = 1 y 1 2 z = 4 z = 1

We have z = 1 , so we substitute this into the second equation y 1 2 ( 1 ) = 4 to obtain y = 7 2 . Substituting y = 7 2 and z = 1 into the first equation we get x 1 3 ( 7 2 ) + 1 2 ( 1 ) = 1 . This gives x = 8 3 . The reader can verify that these values of x , y and z satisfy all three original equations.

It is tempting for us to write the solution to this system by extending the usual ( x , y ) notation to ( x , y , z ) and list our solution as ( 8 3 , 7 2 , 1 ) . The question quickly becomes what does an `ordered triple' like ( 8 3 , 7 2 , 1 ) represent? Just as ordered pairs are used to locate points on the two-dimensional plane, ordered triples can be used to locate points in space.3

Moreover, just as equations involving the variables x and y describe graphs of one-dimensional lines and curves in the two-dimensional plane, equations involving variables x , y , and z describe objects called surfaces in three-dimensional space. Each of the equations in the above system can be visualized as a plane situated in three-space. Geometrically, the system is trying to find the intersection, or common point, of all three planes. If you imagine three sheets of notebook paper each representing a portion of these planes, you will start to see the complexities involved in how three such planes can intersect.

Below is a sketch of the three planes. It turns out that any two of these planes intersect in a line,4 so our intersection point is where all three of these lines meet.

Image: 3planes01
Figure 9.1

Since the geometry for equations involving more than two variables is complicated, we will focus our efforts on the algebra. Returning to the system

{ x 1 3 y + 1 2 z = 1 y 1 2 z = 4 z = 1

we note the reason it was so easy to solve is because of its structure. The third equation is solved for z and the second equation involves only y and z . Since the coefficient of y is 1 , it makes it easy to solve for y using our known value for z . Lastly, the coefficient of x in the first equation is 1 making it easy to substitute the known values of y and z and then solve for x .

We formalize this pattern below for the most general systems of linear equations. Again, we use subscripted variables to describe the general case. The variable with the smallest subscript in a given equation is typically called the leading variable of that equation.

In our previous system, if we make the obvious choices x = x 1 , y = x 2 , and z = x 3 , we see that the system is in triangular form.6 An example of a more complicated system in triangular form is

{ x 1 4 x 3 + x 4 x 6 = 6 x 2 + 2 x 3 = 1 x 4 + 3 x 5 x 6 = 8 x 5 + 9 x 6 = 10

Our goal henceforth will be to transform a given system of linear equations into triangular form using the moves in Theorem 9.1.

Like all algorithms, Gaussian Elimination has the advantage of always producing what we need, but it can also be inefficient at times. For example, when solving the second system in Example 9.1.1, it is clear after we eliminated the x 's in the second step to get the system

{ ( E 1 ) x + 3 2 y 1 2 z = 1 2 ( E 2 ) 15 y + 4 z = 3 ( E 3 ) 15 y + 4 z = 3

that equations E 2 and E 3 , taken together, produce a contradiction. (We have identical left hand sides and different right hand sides.) However, the algorithm takes an additional two steps to reach this conclusion.

We also note that substitution in Gaussian Elimination is delayed until all the elimination is done, whence the name back-substitution. This may also be inefficient in many cases.

Lastly, we note that the last system in Example 9.1.1 is underdetermined,10 and as it is consistent, we necessarily have free variables in our answer. We close this section with a standard `mixture' type application of systems of linear equations which features an application of a consistent dependent system.

Exercises

In Exercises -, put each system of linear equations into triangular form and solve the system if possible. Classify each system as consistent independent, consistent dependent, or inconsistent.

  1. { 5 x + y = 17 x + y = 5
  2. { x + y + z = 3 2 x y + z = 0 3 x + 5 y + 7 z = 7
  3. { 4 x y + z = 5 2 y + 6 z = 30 x + z = 5
  4. { 4 x y + z = 5 2 y + 6 z = 30 x + z = 6
  5. { x + y + z = 17 y 3 z = 0
  6. { x 2 y + 3 z = 7 3 x + y + 2 z = 5 2 x + 2 y + z = 3
  7. { 3 x 2 y + z = 5 x + 3 y z = 12 x + y + 2 z = 0
  8. { 2 x y + z = 1 4 x + 3 y + 5 z = 1 5 y + 3 z = 4
  9. { x y + z = 4 3 x + 2 y + 4 z = 5 x 5 y + 2 z = 18
  10. { 2 x 4 y + z = 7 x 2 y + 2 z = 2 x + 4 y 2 z = 3
  11. { 2 x y + z = 1 2 x + 2 y z = 1 3 x + 6 y + 4 z = 9
  12. { x 3 y 4 z = 3 3 x + 4 y z = 13 2 x 19 y 19 z = 2
  13. { x + y + z = 4 2 x 4 y z = 1 x y = 2
  14. { x y + z = 8 3 x + 3 y 9 z = 6 7 x 2 y + 5 z = 39
  15. { 2 x 3 y + z = 1 4 x 4 y + 4 z = 13 6 x 5 y + 7 z = 25
  16. { 2 x 1 + x 2 12 x 3 x 4 = 16 x 1 + x 2 + 12 x 3 4 x 4 = 5 3 x 1 + 2 x 2 16 x 3 3 x 4 = 25 x 1 + 2 x 2 5 x 4 = 11
  17. { x 1 x 3 = 2 2 x 2 x 4 = 0 x 1 2 x 2 + x 3 = 0 x 3 + x 4 = 1
  18. { x 1 x 2 5 x 3 + 3 x 4 = 1 x 1 + x 2 + 5 x 3 3 x 4 = 0 x 2 + 5 x 3 3 x 4 = 1 x 1 2 x 2 10 x 3 + 6 x 4 = 1
  19. Find two other forms of the parametric solution to Exercise above by reorganizing the equations so that x or y can be the free variable.
  20. At The Crispy Critter's Head Shop and Patchouli Emporium along with their dried up weeds, sunflower seeds and astrological postcards they sell an herbal tea blend. By weight, Type I herbal tea is 30% peppermint, 40% rose hips and 30% chamomile, Type II has percents 40%, 20% and 40%, respectively, and Type III has percents 35%, 30% and 35%, respectively. How much of each Type of tea is needed to make 2 pounds of a new blend of tea that is equal parts peppermint, rose hips and chamomile?
  21. Discuss with your classmates how you would approach Exercise above if they needed to use up a pound of Type I tea to make room on the shelf for a new canister.
  22. If you were to try to make 100 mL of a 60 % acid solution using stock solutions at 20 % and 40 % , respectively, what would the triangular form of the resulting system look like? Explain.

Answers

Because triangular form is not unique, we give only one possible answer to that part of the question. Yours may be different and still be correct.

  1. { x + y = 5 y = 7

    Consistent independent Solution ( 2 , 7 )

  2. { x 5 3 y 7 3 z = 7 3 y + 5 4 z = 2 z = 0

    Consistent independent Solution ( 1 , 2 , 0 )

  3. { x 1 4 y + 1 4 z = 5 4 y + 3 z = 15 0 = 0

    Consistent dependent Solution ( t + 5 , 3 t + 15 , t ) for all real numbers t

  4. { x 1 4 y + 1 4 z = 5 4 y + 3 z = 15 0 = 1

    Inconsistent No solution

  5. { x + y + z = 17 y 3 z = 0

    Consistent dependent Solution ( 4 t 17 , 3 t , t ) for all real numbers t

  6. { x 2 y + 3 z = 7 y 11 5 z = 16 5 z = 1

    Consistent independent Solution ( 2 , 1 , 1 )

  7. { x + y + 2 z = 0 y 3 2 z = 6 z = 2

    Consistent independent Solution ( 1 , 3 , 2 )

  8. { x 1 2 y + 1 2 z = 1 2 y + 3 5 z = 3 5 0 = 1

    Inconsistent no solution

  9. { x y + z = 4 y 7 z = 17 z = 2

    Consistent independent Solution ( 1 , 3 , 2 )

  10. { x 2 y + 2 z = 2 y = 1 2 z = 1

    Consistent independent Solution ( 3 , 1 2 , 1 )

  11. { x 1 2 y + 1 2 z = 1 2 y 2 3 z = 0 z = 1

    Consistent independent Solution ( 1 3 , 2 3 , 1 )

  12. { x 3 y 4 z = 3 y + 11 13 z = 4 13 0 = 0

    Consistent dependent Solution ( 19 13 t + 51 13 , 11 13 t + 4 13 , t ) for all real numbers t

  13. { x + y + z = 4 y + 1 2 z = 3 2 0 = 1

    Inconsistent no solution

  14. { x y + z = 8 y 2 z = 5 z = 1

    Consistent independent Solution ( 4 , 3 , 1 )

  15. { x 3 2 y + 1 2 z = 1 2 y + z = 11 2 0 = 0

    Consistent dependent Solution ( 2 t 35 4 , t 11 2 , t ) for all real numbers t

  16. { x 1 + 2 3 x 2 16 3 x 3 x 4 = 25 3 x 2 + 4 x 3 3 x 4 = 2 0 = 0 0 = 0

    Consistent dependent Solution ( 8 s t + 7 , 4 s + 3 t + 2 , s , t ) for all real numbers s and t

  17. { x 1 x 3 = 2 x 2 1 2 x 4 = 0 x 3 1 2 x 4 = 1 x 4 = 4

    Consistent independent Solution ( 1 , 2 , 3 , 4 )

  18. { x 1 x 2 5 x 3 + 3 x 4 = 1 x 2 + 5 x 3 3 x 4 = 1 2 0 = 1 0 = 0

    Inconsistent No solution

  19. If x is the free variable then the solution is ( t , 3 t , t + 5 ) and if y is the free variable then the solution is ( 1 3 t , t , 1 3 t + 5 ) .
  20. 4 3 1 2 t pounds of Type I, 2 3 1 2 t pounds of Type II and t pounds of Type III where 0 t 4 3 .

Adapted from Precalculus, Preliminary 4th Edition (integrated calculus), by Carl Stitz and Jeff Zeager (stitz-zeager.com), licensed under CC BY-NC-SA 3.0. Changes were made: reformatted as an accessible XYZ web edition. License: CC-BY-NC-SA-3.0.

These eBooks are a prerelease and are not yet certified conformant with WCAG 2.1 AA or ADA Title II. Every page is built against an automated accessibility gate, and the published editions will meet ADA Title II requirements when they release in late September 2026. If something is unusable, please tell us.