Linear Systems
Summary
Vector Spaces
Summary
Maps Between Spaces
Summary
Determinants
Summary
Similarity
Summary
Solving Linear Systems
Summary
Linear Geometry of n-Space
Summary
Reduced Echelon Form
Summary
Topics about Linear Systems
Summary
Content
Content
Content
Content
Systems of linear equations are common in science and mathematics. These two examples from high school science (O'Nan 1990) give a sense of how they arise.
The first example is from Physics. Suppose that we are given three objects, one with a mass known to be 2 kg, and are asked to find the unknown masses. Suppose further that experimentation with a meter stick produces these two balances.
Since the sum of moments on the left of each balance equals the sum of moments on the right (the moment of an object is its mass times its distance from the balance point), the two balances give this system of two equations.
The second example of a linear system is from Chemistry. We can mix, under controlled conditions, toluene C7H8 and nitric acid HNO3 to produce trinitrotoluene C7H5O6N3 along with the byproduct water (conditions have to be controlled very well, indeed— trinitrotoluene is better known as TNT). In what proportion should those components be mixed? The number of atoms of each element present before the reaction

must equal the number present afterward. Applying that principle to the elements C, H, N, and O in turn gives this system.

To finish each of these examples requires solving a system of equations. In each, the equations involve only the first power of the variables. This chapter shows how to solve any such system.
Gauss' Method
If a linear system is changed to another by one of these operations
1. an equation is swapped with another
2. an equation has both sides multiplied by a nonzero constant
3. an equation is replaced by the sum of itself and a multiple of another
then the two systems have the same set of solutions.
Gauss' method uses these 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.
Describing the Solution Set
Summary
General = Particular + Homogenous
Summary
Comparing Set Descriptions
Summary
Automation
Summary
Content
Content
Computer Algebra Systems
Summary
Input-Output Analysis
Summary
Accuracy of Computations
Summary
Analyzing Networks
Summary
Speed of Gauss' Method
Summary
Content
Content
Content
Content
Content
Definition 1.1
A linear equation in variables x1 , x2 , ... , xn has the form

where the numbers a1 , a2 , ... , an ∈ ℜ are the equation's coefficients and d ∈ ℜ is the constant. An n-tuple (s1 , s2 , ... , sn) ∈ ℜ is a solution of, or satisfies, that equation if substituting the numbers s1 , ... , sn for the variables gives a true statement:

A system of linear equations

has the solution (s1 , s2 , ... , sn) if that n-tuple is a solution of all of the equations in the system.
Example 1.2
The ordered pair (-1 , 5) is a solution of this system

In contrast, (5 , -1) 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.
![begin{array}{rcl} quad &xrightarrow[]{ text{swap row 1 with row 3} } &begin{array}{*{3}{rc}r} frac{1}{3}x_1 &+ &2x_2 & & &= &3 x_1 &+ &5x_2 &- &2x_3 &= &2 & & & &3x_3 &= &9 end{array} &xrightarrow[]{ text{multiply row 1 by 3} } &begin{array}{*{3}{rc}r} x_1 &+ &6x_2 & & &= &9 x_1 &+ &5x_2 &- &2x_3 &= &2 & & & &3x_3 &= &9 end{array} &xrightarrow[]{ text{add }-1text{ times row 1 to row 2} } &begin{array}{*{3}{rc}r} x_1 &+ &6x_2 & & &= &9 & &-x_2 &- &2x_3 &= &-7 & & & &3x_3 &= &9 end{array} end{array}](http://upload.wikimedia.org/math/5/2/1/521d0e495a898d7d2deb2f043a269d10.png)
The third step is the only nontrivial one. We've mentally multiplied both sides of the first row by -1, 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 x3 = 3. Substituting 3 for x3 in the middle equation shows that x2 = 1. Substituting those two into the top equation gives that x1 = 3 and so the system has a unique solution: the solution set is { ( 3 , 1 , 3 ) }.
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
then the two systems have the same set of solutions.
Each of those three operations has a restriction. Multiplying a row by 0 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 -1 times the row to itself has the effect of multiplying the row by 0. 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 i with row j
![begin{array}{*{4}{rc}r} a_{1,1}x_1 &+ &a_{1,2}x_2 &+ &cdots &&a_{1,n}x_n &= &d_1 & & & & & & &vdots a_{i,1}x_1 &+ &a_{i,2}x_2 &+ &cdots &&a_{i,n}x_n &= &d_i & & & & & & &vdots a_{j,1}x_1 &+ &a_{j,2}x_2 &+ &cdots &&a_{j,n}x_n &= &d_j & & & & & & &vdots a_{m,1}x_1 &+ &a_{m,2}x_2 &+ &cdots &&a_{m,n}x_n &= &d_m end{array} xrightarrow[]{} begin{array}{*{4}{rc}r} a_{1,1}x_1 &+ &a_{1,2}x_2 &+ &cdots &&a_{1,n}x_n &= &d_1 & & & & & & &vdots a_{j,1}x_1 &+ &a_{j,2}x_2 &+ &cdots &&a_{j,n}x_n &= &d_j & & & & & & &vdots a_{i,1}x_1 &+ &a_{i,2}x_2 &+ &cdots &&a_{i,n}x_n &= &d_i & & & & & & &vdots a_{m,1}x_1 &+ &a_{m,2}x_2 &+ &cdots &&a_{m,n}x_n &= &d_m end{array}](http://upload.wikimedia.org/math/0/4/b/04b1a16475ce10c16279ebe484e3b2c5.png)
The n-tuple (s1, s2, ... , sn) satisfies the system before the swap if and only if substituting the values, the s's, for the variables, the x's, gives true statements:

and ...

and ...

and ...

This is exactly the requirement that (s1 , s2 , ... , sn) 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 i" by "ρi". For instance, we will denote a pivot operation by kρi + ρj, with the row that is changed written second. We will also, to save writing, often list pivot steps together when they use the same ρi.
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 x in the second row and the x in the third. To get rid of the second row's 2x, we multiply the entire first row by -2, add that to the second row, and write the result in as the new second row. To get rid of the third row's x, we multiply the first row by -1, add that to the third row, and write the result in as the new third row
![begin{array}{rcl} &xrightarrow[-rho_1 +rho_3]{-2rho_1 +rho_2} &begin{array}{*{3}{rc}r} x &+ &y & & &= &0 \ & &-3y&+ &3z &= &3 \ & &-3y&- &z &= &3 end{array} end{array}](http://upload.wikimedia.org/math/a/3/1/a31c0c2c1f273207f4fd23056f6bfcdb.png)
(Note that the two ρ1 steps -2ρ1 + ρ2 and -ρ1 + ρ3 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 y from the third row.
![begin{array}{rcl} &xrightarrow[]{-rho_2 +rho_3} &begin{array}{*{3}{rc}r} x &+ &y & & &= &0 \ & &-3y&+ &3z &= &3 \ & & & &-4z&= &0 end{array} end{array}](http://upload.wikimedia.org/math/9/9/f/99fa454ef13d48324f608fef813a1ba5.png)
Now we are set up for the solution. The third row shows that z = 0. Substitute that back into the second row to get y = -1, and then substitute back into the first row to get x = 1.
Example 1.7
For the Physics problem from the start of this chapter, Gauss' method gives this.
![begin{array}{rcl} begin{array}{*{2}{rc}r} 40h &+ &15c &= &100 \ -50h &+ &25c &= &50 end{array} &xrightarrow[]{5/4rho_1 +rho_2} &begin{array}{*{2}{rc}r} 40h &+ &15c &= &100 \ & &(175/4)c &= &175 end{array} end{array}](http://upload.wikimedia.org/math/1/0/0/1009dc3c9f4d77f55bf33e8f56cff739.png)
So c = 4, and back-substitution gives that h = 1. (The Chemistry problem is solved later.)
Example 1.8
The reduction
![begin{array}{rcl} begin{array}{*{3}{rc}r} x &+ &y &+ &z &= &9 \ 2x &+ &4y &- &3z &= &1 \ 3x &+ &6y &- &5z &= &0 end{array} &xrightarrow[-3rho_1 +rho_3]{-2rho_1 +rho_2} &begin{array}{*{3}{rc}r} x &+ &y &+ &z &= &9 \ & &2y &- &5z &= &-17\ & &3y &- &8z&= &-27 end{array} \ &xrightarrow[]{-(3/2)rho_2+rho_3} &begin{array}{*{3}{rc}r} x &+ &y &+ &z &= &9 \ & &2y &- &5z &= &-17\ & & & &-(1/2)z &= &-(3/2) end{array} end{array}](http://upload.wikimedia.org/math/2/9/c/29c75c990adafe3d15d3169fb61d053c.png)
shows that z = 3 , y = -1 , and x = 7.
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
![begin{array}{rcl} begin{array}{*{4}{rc}r} x &- &y & & & & &= &0 \ 2x &- &2y &+ &z &+ &2w &= &4 \ & &y & & &+ &w &= &0 \ & & & &2z &+ &w &= &5 end{array} &xrightarrow[]{-2rho_1 +rho_2} &begin{array}{*{4}{rc}r} x &- &y & & & & &= &0 \ & & & &z &+ &2w &= &4 \ & &y & & &+ &w &= &0 \ & & & &2z &+ &w &= &5 end{array} end{array}](http://upload.wikimedia.org/math/6/6/a/66a2aae56b5e1b67ce36b010340af0bb.png)
the second equation has no leading y. To get one, we look lower down in the system for a row that has a leading y and swap it in.
![begin{array}{rcl} &xrightarrow[]{rho_2 leftrightarrowrho_3} &begin{array}{*{4}{rc}r} x &- &y & & & & &= &0 \ & &y & & &+ &w &= &0 \ & & & &z &+ &2w &= &4 \ & & & &2z &+ &w &= &5 end{array} end{array}](http://upload.wikimedia.org/math/b/d/8/bd878da8e85ccf21d59dfc6d1268a73b.png)
(Had there been more than one row below the second with a leading y then we could have swapped in any one.) The rest of Gauss' method goes as before.
![begin{array}{rcl} &xrightarrow[]{-2rho_3 +rho_4} &begin{array}{*{4}{rc}r} x &- &y & & & & &= &0 \ & &y & & &+ &w &= &0 \ & & & &z &+ &2w &= &4 \ & & & & & &-3w&= &-3 end{array} end{array}](http://upload.wikimedia.org/math/b/e/5/be5580845d17dfb0265ca0b8d93c0e46.png)
Back-substitution gives w = 1 , z = 2 , y = -1 , and x = -1 .
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
![begin{array}{rcl} &xrightarrow[-2rho_1 +rho_3]{-2rho_1 +rho_2} &begin{array}{*{2}{rc}r} x &+ &3y &= &1 \ & &-5y &= &-5 \ & &-4y &= &-4 end{array} end{array}](http://upload.wikimedia.org/math/d/8/4/d84f971271e74e63d4c32b2e3ccd93cc.png)
shows that one of the equations is redundant. Echelon form
![begin{array}{rcl} &xrightarrow[]{-(4/5)rho_2 +rho_3} &begin{array}{*{2}{rc}r} x &+ &3y &= &1 \ & &-5y &= &-5 \ & &0 &= &0 end{array} end{array}](http://upload.wikimedia.org/math/f/5/a/f5a55036dfdb033218e696c843fbe4b0.png)
gives y = 1 and x = -2 . The "0 = 0" 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.
![begin{array}{rcl} begin{array}{*{2}{rc}r} x &+ &3y &= &1 \ 2x &+ &y &= &-3 \ 2x &+ &2y &= &0 end{array} &xrightarrow[-2rho_1 +rho_3]{-2rho_1 +rho_2} &begin{array}{*{2}{rc}r} x &+ &3y &= &1 \ & &-5y &= &-5 \ & &-4y &= &-2 end{array} end{array}](http://upload.wikimedia.org/math/d/a/6/da6b80b50df453da5a6b12283717b247.png)
Here the system is inconsistent: no pair of numbers satisfies all of the equations simultaneously. Echelon form makes this inconsistency obvious.
![begin{array}{rcl} &xrightarrow[]{-(4/5)rho_2 +rho_3} &begin{array}{*{2}{rc}r} x &+ &3y &= &1 \ & &-5y &= &-5 \ & &0 &= &2 end{array} end{array}](http://upload.wikimedia.org/math/b/1/4/b148073afbb53516e0b3161edb6231d7.png)
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.
![begin{array}{rcl} begin{array}{*{2}{rc}r} x &+ &2y &= &8 \ 2x &+ &4y &= &8 end{array} &xrightarrow[]{-2rho_1 + rho_2} &begin{array}{*{2}{rc}r} x &+ &2y &= &8 \ & &0 &= &-8 end{array} end{array}](http://upload.wikimedia.org/math/8/3/7/837c1a45172b3c8ed256e2c72f499e5b.png)
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 {(x,y)| x + y = 4 } is infinite; some of its members are (0 , 4) , (-1 , 5) , and (2.5 , 1.5). The result of applying Gauss' method here contrasts with the prior example because we do not get a contradictory equation.
![begin{array}{rcl} &xrightarrow[]{-2rho_1 + rho_2} &begin{array}{*{2}{rc}r} x &+ &y &= &4 \ & &0 &= &0 end{array} end{array}](http://upload.wikimedia.org/math/a/4/6/a46844c93da03a6c7b7d50d38f92be33.png)
Don't be fooled by the "0 = 0" equation in that example. It is not the signal that a system has many solutions.
Example 1.15
The absence of a "0 = 0" does not keep a system from having many different solutions. This system is in echelon form

has no "0 = 0", and yet has infinitely many solutions. (For instance, each of these is a solution: (0 , 1, -1) , (0 , 1/2 , -1/2 ) , (0 , 0 , 0) , and (0 , -π , π) . There are infinitely many solutions because any triple whose first component is 0 and whose second component is the negative of the third is a solution.)
Nor does the presence of a "0 = 0" 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 "0 = 0" row.
![begin{array}{rcl} begin{array}{*{3}{rc}r} 2x & & &- &2z &= &6 \ & &y &+ &z &= &1 \ 2x &+ &y &- &z &= &7 \ & &3y &+ &3z &= &0 end{array} &xrightarrow[]{-rho_1 +rho_3} &begin{array}{*{3}{rc}r} 2x & & &- &2z &= &6 \ & &y &+ &z &= &1 \ & &y &+ &z &= &1 \ & &3y &+ &3z &= &0 end{array} \ &xrightarrow[-3rho_2 +rho_4]{-rho_2 +rho_3} &begin{array}{*{3}{rc}r} 2x & & &- &2z &= &6 \ & &y &+ &z &= &1 \ & & & &0 &= &0 \ & & & &0 &= &-3 end{array} end{array}](http://upload.wikimedia.org/math/f/8/d/f8d63610623e4651bf1d9260f333b164.png)
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
Summary
Content
Content
Content
Content
Content