# Linear Algebra/Gauss' Method

- Definition 1.1

A **linear equation** in variables has the form

where the numbers are the equation's **coefficients** and is the **constant**. An -tuple is a **solution** of, or **satisfies**, that equation if substituting the numbers , ..., for the variables gives a true statement: .

A **system of linear equations**

has the solution if that -tuple is a solution of all of the equations in the system.

- Example 1.2

The ordered pair is a solution of this system.

In contrast, is not a solution.

Finding the set of all solutions is **solving** the system. No guesswork or good fortune is needed to solve a linear system. There is an algorithm that always works. The next example introduces that algorithm, called **Gauss' method**. It transforms the system, step by step, into one with a form that is easily solved.

- Example 1.3

To solve this system

we repeatedly transform it until it is in a form that is easy to solve.

The third step is the only nontrivial one. We've mentally multiplied both sides of the first row by , mentally added that to the old second row, and written the result in as the new second row.

Now we can find the value of each variable. The bottom equation shows that . Substituting for in the middle equation shows that . Substituting those two into the top equation gives that and so the system has a unique solution: the solution set is .

Most of this subsection and the next one consists of examples of solving linear systems by Gauss' method. We will use it throughout this book. It is fast and easy. But, before we get to those examples, we will first show that this method is also safe in that it never loses solutions or picks up extraneous solutions.

- Theorem 1.4 (Gauss' method)

If a linear system is changed to another by one of these operations

- an equation is swapped with another
- an equation has both sides multiplied by a nonzero constant
- an equation is replaced by the sum of itself and a multiple of another

then the two systems have the same set of solutions.

Each of those three operations has a restriction. Multiplying a row by is not allowed because obviously that can change the solution set of the system. Similarly, adding a multiple of a row to itself is not allowed because adding times the row to itself has the effect of multiplying the row by . Finally, swapping a row with itself is disallowed to make some results in the fourth chapter easier to state and remember (and besides, self-swapping doesn't accomplish anything).

- Proof

We will cover the equation swap operation here and save the other two cases for Problem 14.

Consider this swap of row with row .

The -tuple satisfies the system before the swap if and only if substituting the values, the 's, for the variables, the 's, gives true statements: and ... and ... and ... .

In a requirement consisting of statements and-ed together we can rearrange the order of the statements, so that this requirement is met if and only if and ... and ... and ... . This is exactly the requirement that solves the system after the row swap.

- Definition 1.5

The three operations from Theorem 1.4 are the **elementary reduction operations**, or **row operations**, or **Gaussian operations**. They are **swapping**, **multiplying by a scalar** or **rescaling**, and **pivoting**.

When writing out the calculations, we will abbreviate "row " by "". For instance, we will denote a pivot operation by , with the row that is changed written second. We will also, to save writing, often list pivot steps together when they use the same .

- Example 1.6

A typical use of Gauss' method is to solve this system.

The first transformation of the system involves using the first row to eliminate the in the second row and the in the third. To get rid of the second row's , we multiply the entire first row by , add that to the second row, and write the result in as the new second row. To get rid of the third row's , we multiply the first row by , add that to the third row, and write the result in as the new third row.

(Note that the two steps and are written as one operation.) In this second system, the last two equations involve only two unknowns. To finish we transform the second system into a third system, where the last equation involves only one unknown. This transformation uses the second row to eliminate from the third row.

Now we are set up for the solution. The third row shows that . Substitute that back into the second row to get , and then substitute back into the first row to get .

- Example 1.7

For the Physics problem from the start of this chapter, Gauss' method gives this.

So , and back-substitution gives that . (The Chemistry problem is solved later.)

- Example 1.8

The reduction

shows that , , and .

As these examples illustrate, Gauss' method uses the elementary reduction operations to set up back-substitution.

- Definition 1.9

In each row, the first variable with a nonzero coefficient is the row's **leading variable**. A system is in **echelon form** if each leading variable is to the right of the leading variable in the row above it (except for the leading variable in the first row).

- Example 1.10

The only operation needed in the examples above is pivoting. Here is a linear system that requires the operation of swapping equations. After the first pivot

the second equation has no leading . To get one, we look lower down in the system for a row that has a leading and swap it in.

(Had there been more than one row below the second with a leading then we could have swapped in any one.) The rest of Gauss' method goes as before.

Back-substitution gives , , , and .

Strictly speaking, the operation of rescaling rows is not needed to solve linear systems. We have included it because we will use it later in this chapter as part of a variation on Gauss' method, the Gauss-Jordan method.

All of the systems seen so far have the same number of equations as unknowns. All of them have a solution, and for all of them there is only one solution. We finish this subsection by seeing for contrast some other things that can happen.

- Example 1.11

Linear systems need not have the same number of equations as unknowns. This system

has more equations than variables. Gauss' method helps us understand this system also, since this

shows that one of the equations is redundant. Echelon form

gives and . The "" is derived from the redundancy.

That example's system has more equations than variables. Gauss' method is also useful on systems with more variables than equations. Many examples are in the next subsection.

Another way that linear systems can differ from the examples shown earlier is that some linear systems do not have a unique solution. This can happen in two ways.

The first is that it can fail to have any solution at all.

- Example 1.12

Contrast the system in the last example with this one.

Here the system is inconsistent: no pair of numbers satisfies all of the equations simultaneously. Echelon form makes this inconsistency obvious.

The solution set is empty.

- Example 1.13

The prior system has more equations than unknowns, but that is not what causes the inconsistency— Example 1.11 has more equations than unknowns and yet is consistent. Nor is having more equations than unknowns sufficient for inconsistency, as is illustrated by this inconsistent system with the same number of equations as unknowns.

The other way that a linear system can fail to have a unique solution is to have many solutions.

- Example 1.14

In this system

any pair of numbers satisfying the first equation automatically satisfies the second. The solution set is infinite; some of its members are , , and . The result of applying Gauss' method here contrasts with the prior example because we do not get a contradictory equation.

Don't be fooled by the "" equation in that example. It is not the signal that a system has many solutions.

- Example 1.15

The absence of a "" does not keep a system from having many different solutions. This system is in echelon form

has no "", and yet has infinitely many solutions. (For instance, each of these is a solution: , , , and . There are infinitely many solutions because any triple whose first component is and whose second component is the negative of the third is a solution.)

Nor does the presence of a "" mean that the system must have many solutions. Example 1.11 shows that. So does this system, which does not have many solutions— in fact it has none— despite that when it is brought to echelon form it has a "" row.

We will finish this subsection with a summary of what we've seen so far about Gauss' method.

Gauss' method uses the three row operations to set a system up for back substitution. If any step shows a contradictory equation then we can stop with the conclusion that the system has no solutions. If we reach echelon form without a contradictory equation, and each variable is a leading variable in its row, then the system has a unique solution and we find it by back substitution. Finally, if we reach echelon form without a contradictory equation, and there is not a unique solution (at least one variable is not a leading variable) then the system has many solutions.

The next subsection deals with the third case— we will see how to describe the solution set of a system with many solutions.

## Exercises[edit]

*This exercise is recommended for all readers.*

- Problem 1

Use Gauss' method to find the unique solution for each system.

*This exercise is recommended for all readers.*

- Problem 2

Use Gauss' method to solve each system or conclude "many solutions" or "no solutions".

*This exercise is recommended for all readers.*

- Problem 3

There are methods for solving linear systems other than Gauss' method. One often taught in high school is to solve one of the equations for a variable, then substitute the resulting expression into other equations. That step is repeated until there is an equation with only one variable. From that, the first number in the solution is derived, and then back-substitution can be done. This method takes longer than Gauss' method, since it involves more arithmetic operations, and is also more likely to lead to errors. To illustrate how it can lead to wrong conclusions, we will use the system

from Example 1.12.

- Solve the first equation for and substitute that expression into the second equation. Find the resulting .
- Again solve the first equation for , but this time substitute that expression into the third equation. Find this .

What extra step must a user of this method take to avoid erroneously concluding a system has a solution?

*This exercise is recommended for all readers.*

- Problem 4

For which values of are there no solutions, many solutions, or a unique solution to this system?

*This exercise is recommended for all readers.*

- Problem 5

This system is not linear, in some sense,

and yet we can nonetheless apply Gauss' method. Do so. Does the system have a solution?

*This exercise is recommended for all readers.*

- Problem 6

What conditions must the constants, the 's, satisfy so that each of these systems has a solution? *Hint.* Apply Gauss' method and see what happens to the right side (Anton 1987).

- Problem 7

True or false: a system with more unknowns than equations has at least one solution. (As always, to say "true" you must prove it, while to say "false" you must produce a counterexample.)

- Problem 8

Must any Chemistry problem like the one that starts this subsection— a balance the reaction problem— have infinitely many solutions?

*This exercise is recommended for all readers.*

- Problem 9

Find the coefficients , , and so that the graph of passes through the points , , and .

- Problem 10

Gauss' method works by combining the equations in a system to make new equations.

- Can the equation be derived, by a sequence of Gaussian reduction steps, from the equations in this system?
- Can the equation be derived, by a sequence of Gaussian reduction steps, from the equations in this system?
- Can the equation be derived, by a sequence of Gaussian reduction steps, from the equations in the system?

- Problem 11

Prove that, where are real numbers and , if

has the same solution set as

then they are the same equation. What if ?

*This exercise is recommended for all readers.*

- Problem 12

Show that if then

has a unique solution.

*This exercise is recommended for all readers.*

- Problem 13

In the system

each of the equations describes a line in the -plane. By geometrical reasoning, show that there are three possibilities: there is a unique solution, there is no solution, and there are infinitely many solutions.

- Problem 14

Finish the proof of Theorem 1.4.

- Problem 15

Is there a two-unknowns linear system whose solution set is all of ?

*This exercise is recommended for all readers.*

- Problem 16

Are any of the operations used in Gauss' method redundant? That is, can any of the operations be synthesized from the others?

- Problem 17

Prove that each operation of Gauss' method is reversible. That is, show that if two systems are related by a row operation then there is a row operation to go back .

- ? Problem 18

A box holding pennies, nickels and dimes contains thirteen coins with a total value of cents. How many coins of each type are in the box? (Anton 1987)

- ? Problem 19

Four positive integers are given. Select any three of the integers, find their arithmetic average, and add this result to the fourth integer. Thus the numbers 29, 23, 21, and 17 are obtained. One of the original integers is:

- 19
- 21
- 23
- 29
- 17

(Salkind 1975, 1955 problem 38)

*This exercise is recommended for all readers.*

- ? Problem 20

Laugh at this: . It resulted from substituting a code letter for each digit of a simple example in addition, and it is required to identify the letters and prove the solution unique (Ransom & Gupta 1935).

- ? Problem 21

The Wohascum County Board of Commissioners, which has 20 members, recently had to elect a President. There were three candidates (, , and ); on each ballot the three candidates were to be listed in order of preference, with no abstentions. It was found that 11 members, a majority, preferred over (thus the other 9 preferred over ). Similarly, it was found that 12 members preferred over . Given these results, it was suggested that should withdraw, to enable a runoff election between and . However, protested, and it was then found that 14 members preferred over ! The Board has not yet recovered from the resulting confusion. Given that every possible order of , , appeared on at least one ballot, how many members voted for as their first choice (Gilbert, Krusemeyer & Larson 1993, Problem number 2)?

- ? Problem 22

"This system of linear equations with unknowns," said the Great Mathematician, "has a curious property."

"Good heavens!" said the Poor Nut, "What is it?"

"Note," said the Great Mathematician, "that the constants are in arithmetic progression."

"It's all so clear when you explain it!" said the Poor Nut. "Do you mean like and ?"

"Quite so," said the Great Mathematician, pulling out his bassoon. "Indeed, the system has a unique solution. Can you find it?"

"Good heavens!" cried the Poor Nut, "I am baffled."

Are you? (Dudley, Lebow & Rothman 1963)

## References[edit]

- Anton, Howard (1987),
*Elementary Linear Algebra*, John Wiley & Sons. - Dudley, Underwood (proposer); Lebow, Arnold (proposer); Rothman, David (solver) (Jan. 1963), "Elemantary problem 1151",
*American Mathematical Monthly***70**(1): 93. - Gilbert, George T.; Krusemeyer, Mark; Larson, Loren C. (1993),
*The Wohascum County Problem Book*, The Mathematical Association of America. - Ransom, W. R. (proposer); Gupta, Hansraj (solver) (Jan. 1935), "Elementary problem 105",
*American Mathematical Monthly***42**(1): 47. - Salkind, Charles T. (1975),
*Contest Problem Book No 1: Annual High School Mathematics Examinations 1950-1960*.