线性代数/Gauss' Method 高斯消元法

Template:BookCat

Definition 1.1

A **linear equation** in variables

x
1

,

x
2

,
…
,

x
n

{\displaystyle x\_1, x\_2, \ldots, x\_n}

 has the form

未知数

x
1

,

x
2

,
…
,

x
n

{\displaystyle x\_1, x\_2, \ldots, x\_n}

的一个线性方程组，形如

a
1

x
1

a
2

x
2

a
3

x
3

⋯

a
n

x
n

=
d

{\displaystyle a\_1x\_1+a\_2x\_2+a\_3x\_3+\cdots+a\_nx\_n=d}

where the numbers

a
1

,
…
,

a
n

∈

R

{\displaystyle a\_1,\dots,a\_n\in\R}

 are the equation's
**coefficients** and

d
∈

R

{\displaystyle d\in\R}

 is the **constant**.
An

n

{\displaystyle n}

-tuple

(

s
1

,

s
2

,
…
,

s
n

)
∈

R

n

{\displaystyle (s\_1,s\_2,\dots,s\_n)\in\R^n }

 is a
**solution**
of, or **satisfies**, that equation if substituting the numbers

s
1

,
…
,

s
n

{\displaystyle s\_1,\dots,s\_n}

 for the variables gives a true statement:

a
1

s
1

a
2

s
2

…

a
n

s
n

=
d

{\displaystyle a\_1s\_1+a\_2s\_2+\ldots+a\_ns\_n=d}

.

其中

a
1

,
…
,

a
n

∈

R

{\displaystyle a\_1,\dots,a\_n\in\R}

是方程的系数，

d
∈

R

{\displaystyle d\in\R}

是一个常数项。
当一个

n

{\displaystyle n}

元数组

(

s
1

,

s
2

,
…
,

s
n

)
∈

R

n

{\displaystyle (s\_1,s\_2,\dots,s\_n)\in\R^n }

满足：

a
1

s
1

a
2

s
2

…

a
n

s
n

=
d

{\displaystyle a\_1s\_1+a\_2s\_2+\ldots+a\_ns\_n=d}

成立
那么我们称这个数组为为方程的一个解。

A **system of linear equations**

一个**线性方程组**

a

1
,
1

x
1

a

1
,
2

x
2

⋯

a

1
,
n

x
n

=

d
1

a

2
,
1

x
1

a

2
,
2

x
2

⋯

a

2
,
n

x
n

=

d
2

⋮

a

m
,
1

x
1

a

m
,
2

x
2

⋯

a

m
,
n

x
n

=

d
m

{\displaystyle
\begin{array}{\*{4}{rc}r}
a\_{1,1}x\_1 &+ &a\_{1,2}x\_2 &+ &\cdots &+ &a\_{1,n}x\_n &= &d\_1 \\
a\_{2,1}x\_1 &+ &a\_{2,2}x\_2 &+ &\cdots &+ &a\_{2,n}x\_n &= &d\_2 \\
& & & & & & &\vdots \\
a\_{m,1}x\_1 &+ &a\_{m,2}x\_2 &+ &\cdots &+ &a\_{m,n}x\_n &= &d\_m
\end{array}
}

has the solution

(

s
1

,

s
2

,
…
,

s
n

)

{\displaystyle (s\_1,s\_2,\ldots,s\_n)}

 if that

n

{\displaystyle n}

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

当有一个

n

{\displaystyle n}

元数组

(

s
1

,

s
2

,
…
,

s
n

)
∈

R

n

{\displaystyle (s\_1,s\_2,\dots,s\_n)\in\R^n }

，是方程组中每一个方程的解，那么我们称
这个

n

{\displaystyle n}

元数组为方程组的解。

Example 1.2

The ordered pair

(
−
1
,
5
)

{\displaystyle (-1,5)}

 is a solution of this system.

4

x
1

2

x
2

=

6

−

x
1

x
2

=

6

{\displaystyle
\begin{array}{\*{2}{rc}r}
4x\_1 &+ &2x\_2 &= &6 \\
-x\_1 &+ &x\_2 &= &6
\end{array}
}

In contrast,

(
5
,
−
1
)

{\displaystyle (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

3

x
3

=

9

x
1

5

x
2

−

2

x
3

=

2

1
3

x
1

2

x
2

=

3

{\displaystyle
\begin{array}{\*{3}{rc}r}
& & & &3x\_3 &= &9 \\
x\_1 &+ &5x\_2 &- &2x\_3 &= &2 \\
\frac{1}{3}x\_1 &+ &2x\_2 & & &= &3
\end{array}
}

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

→

swap row 1 with row 3

1
3

x
1

2

x
2

=

3

x
1

5

x
2

−

2

x
3

=

2

3

x
3

=

9

→

multiply row 1 by 3

x
1

6

x
2

=

9

x
1

5

x
2

−

2

x
3

=

2

3

x
3

=

9

→

add
−
1
 times row 1 to row 2

x
1

6

x
2

=

9

−

x
2

−

2

x
3

=

−
7

3

x
3

=

9

{\displaystyle \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 }-1\text{ 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}
}

The third step is the only nontrivial one. We've mentally multiplied both sides of the first row by

−
1

{\displaystyle -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

x
3

=
3

{\displaystyle x\_3=3}

. Substituting

3

{\displaystyle 3}

 for

x

3

{\displaystyle x\_{3}}

 in the middle equation shows that

x
2

=
1

{\displaystyle x\_2=1}

. Substituting those two into the top equation gives that

x
1

=
3

{\displaystyle x\_1=3}

 and so the system has a unique solution: the solution set is

{

(
3
,
1
,
3
)

}

{\displaystyle \{\,(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

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.

Each of those three operations has a restriction. Multiplying a row by

0

{\displaystyle 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

{\displaystyle -1}

 times the row to itself has the effect of multiplying the row by

0

{\displaystyle 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

{\displaystyle i}

 with row

j

{\displaystyle j}

.

a

1
,
1

x
1

a

1
,
2

x
2

⋯

a

1
,
n

x
n

=

d
1

⋮

a

i
,
1

x
1

a

i
,
2

x
2

⋯

a

i
,
n

x
n

=

d
i

⋮

a

j
,
1

x
1

a

j
,
2

x
2

⋯

a

j
,
n

x
n

=

d
j

⋮

a

m
,
1

x
1

a

m
,
2

x
2

⋯

a

m
,
n

x
n

=

d
m

→

a

1
,
1

x
1

a

1
,
2

x
2

⋯

a

1
,
n

x
n

=

d
1

⋮

a

j
,
1

x
1

a

j
,
2

x
2

⋯

a

j
,
n

x
n

=

d
j

⋮

a

i
,
1

x
1

a

i
,
2

x
2

⋯

a

i
,
n

x
n

=

d
i

⋮

a

m
,
1

x
1

a

m
,
2

x
2

⋯

a

m
,
n

x
n

=

d
m

{\displaystyle
\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}
}

The

n

{\displaystyle n}

-tuple

(

s
1

,
…
,

s
n

)

{\displaystyle (s\_1,\ldots,s\_n)}

 satisfies the system before the swap if and only if substituting the values, the

s

{\displaystyle s}

's, for the variables, the

x

{\displaystyle x}

's, gives true statements:

a

1
,
1

s
1

a

1
,
2

s
2

⋯

a

1
,
n

s
n

=

d
1

{\displaystyle a\_{1,1}s\_1+a\_{1,2}s\_2+\cdots+a\_{1,n}s\_n=d\_1}

and ...

a

i
,
1

s
1

a

i
,
2

s
2

⋯

a

i
,
n

s
n

=

d
i

{\displaystyle a\_{i,1}s\_1+a\_{i,2}s\_2+\cdots+a\_{i,n}s\_n=d\_i}

and ...

a

j
,
1

s
1

a

j
,
2

s
2

⋯

a

j
,
n

s
n

=

d
j

{\displaystyle a\_{j,1}s\_1+a\_{j,2}s\_2+\cdots+a\_{j,n}s\_n=d\_j}

and ...

a

m
,
1

s
1

a

m
,
2

s
2

⋯

a

m
,
n

s
n

=

d
m

{\displaystyle a\_{m,1}s\_1+a\_{m,2}s\_2+\cdots+a\_{m,n}s\_n=d\_m}

.

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

a

1
,
1

s
1

a

1
,
2

s
2

⋯

a

1
,
n

s
n

=

d
1

{\displaystyle a\_{1,1}s\_1+a\_{1,2}s\_2+\cdots+a\_{1,n}s\_n=d\_1}

and ...

a

j
,
1

s
1

a

j
,
2

s
2

⋯

a

j
,
n

s
n

=

d
j

{\displaystyle a\_{j,1}s\_1+a\_{j,2}s\_2+\cdots+a\_{j,n}s\_n=d\_j}

and ...

a

i
,
1

s
1

a

i
,
2

s
2

⋯

a

i
,
n

s
n

=

d
i

{\displaystyle a\_{i,1}s\_1+a\_{i,2}s\_2+\cdots+a\_{i,n}s\_n=d\_i}

and ...

a

m
,
1

s
1

a

m
,
2

s
2

⋯

a

m
,
n

s
n

=

d
m

{\displaystyle a\_{m,1}s\_1+a\_{m,2}s\_2+\cdots+a\_{m,n}s\_n=d\_m}

.
This is exactly the requirement that

(

s
1

,
…
,

s
n

)

{\displaystyle (s\_1,\ldots,s\_n)}

 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

{\displaystyle i}

" by "

ρ
i

{\displaystyle \rho\_i}

". For instance, we will denote a pivot operation by

k

ρ
i

ρ
j

{\displaystyle k\rho\_i+\rho\_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

{\displaystyle \rho\_i}

.

Example 1.6

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

x

y

=

0

2
x

−

y

3
z

=

3

x

−

2
y

−

z

=

3

{\displaystyle
\begin{array}{\*{3}{rc}r}
x &+ &y & & &= &0 \\
2x &- &y &+ &3z &= &3 \\
x &- &2y &- &z &= &3
\end{array}
}

The first transformation of the system involves using the first row to eliminate the

x

{\displaystyle x}

 in the second row and the

x

{\displaystyle x}

 in the third. To get rid of the second row's

2
x

{\displaystyle 2x}

, we multiply the entire first row by

−
2

{\displaystyle -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

{\displaystyle x}

, we multiply the first row by

−
1

{\displaystyle -1}

, add that to the third row, and write the result in as the new third row.

→

−

ρ
1

ρ
3

−
2

ρ
1

ρ
2

x

y

=

0

−
3
y

3
z

=

3

−
3
y

−

z

=

3

{\displaystyle \begin{array}{rcl}
&\xrightarrow[-\rho\_1+\rho\_3]{-2\rho\_1+\rho\_2}
&\begin{array}{\*{3}{rc}r}
x &+ &y & & &= &0 \\
& &-3y&+ &3z &= &3 \\
& &-3y&- &z &= &3
\end{array}
\end{array}
}

(Note that the two

ρ
1

{\displaystyle \rho\_1}

 steps

−
2

ρ
1

ρ
2

{\displaystyle -2\rho\_1+\rho\_2}

 and

−

ρ
1

ρ
3

{\displaystyle -\rho\_1+\rho\_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

{\displaystyle y}

 from the third row.

→

−

ρ
2

ρ
3

x

y

=

0

−
3
y

3
z

=

3

−
4
z

=

0

{\displaystyle \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}
}

Now we are set up for the solution. The third row shows that

# z
0

{\displaystyle z=0}

. Substitute that back into the second row to get

# y
−
1

{\displaystyle y=-1}

, and then substitute back into the first row to get

# x
1

{\displaystyle x=1}

.

Example 1.7

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

40
h

15
c

=

100

−
50
h

25
c

=

50

→

5

/

4

ρ
1

ρ
2

40
h

15
c

=

100

(
175

/

4
)
c

=

175

{\displaystyle \begin{array}{rcl}
\begin{array}{\*{2}{rc}r}
40h &+ &15c &= &100 \\
-50h &+ &25c &= &50
\end{array}
&\xrightarrow[]{5/4\rho\_1 +\rho\_2}
&\begin{array}{\*{2}{rc}r}
40h &+ &15c &= &100 \\
& &(175/4)c &= &175
\end{array}
\end{array}
}

So

# c
4

{\displaystyle c=4}

, and back-substitution gives that

# h
1

{\displaystyle h=1}

.
(The Chemistry problem is solved later.)

Example 1.8

The reduction

x

y

z

=

9

2
x

4
y

−

3
z

=

1

3
x

6
y

−

5
z

=

0

→

−
3

ρ
1

ρ
3

−
2

ρ
1

ρ
2

x

y

z

=

9

2
y

−

5
z

=

−
17

3
y

−

8
z

=

−
27

→

−
(
3

/

2
)

ρ
2

ρ
3

x

y

z

=

9

2
y

−

5
z

=

−
17

−
(
1

/

2
)
z

=

−
(
3

/

2
)

{\displaystyle \begin{array}{rcl}
\begin{array}{\*{3}{rc}r}
x &+ &y &+ &z &= &9 \\
2x &+ &4y &- &3z &= &1 \\
3x &+ &6y &- &5z &= &0
\end{array}
&\xrightarrow[-3\rho\_1 +\rho\_3]{-2\rho\_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}
}

shows that

# z
3

{\displaystyle z=3}

,

# y
−
1

{\displaystyle y=-1}

, and

# x
7

{\displaystyle 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

x

−

y

=

0

2
x

−

2
y

z

2
w

=

4

y

w

=

0

2
z

w

=

5

→

−
2

ρ
1

ρ
2

x

−

y

=

0

z

2
w

=

4

y

w

=

0

2
z

w

=

5

{\displaystyle \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[]{-2\rho\_1 +\rho\_2}
&\begin{array}{\*{4}{rc}r}
x &- &y & & & & &= &0 \\
& & & &z &+ &2w &= &4 \\
& &y & & &+ &w &= &0 \\
& & & &2z &+ &w &= &5
\end{array}
\end{array}
}

the second equation has no leading

y

{\displaystyle y}

.
To get one,
we look lower down in the system for a row that has a leading

y

{\displaystyle y}

 and
swap it in.

→

ρ
2

↔

ρ
3

x

−

y

=

0

y

w

=

0

z

2
w

=

4

2
z

w

=

5

{\displaystyle \begin{array}{rcl}
&\xrightarrow[]{\rho\_2 \leftrightarrow\rho\_3}
&\begin{array}{\*{4}{rc}r}
x &- &y & & & & &= &0 \\
& &y & & &+ &w &= &0 \\
& & & &z &+ &2w &= &4 \\
& & & &2z &+ &w &= &5
\end{array}
\end{array}
}

(Had there been more than one row below the second with a leading

y

{\displaystyle y}

then we could have swapped in any one.)
The rest of Gauss' method goes as before.

→

−
2

ρ
3

ρ
4

x

−

y

=

0

y

w

=

0

z

2
w

=

4

−
3
w

=

−
3

{\displaystyle \begin{array}{rcl}
&\xrightarrow[]{-2\rho\_3 +\rho\_4}
&\begin{array}{\*{4}{rc}r}
x &- &y & & & & &= &0 \\
& &y & & &+ &w &= &0 \\
& & & &z &+ &2w &= &4 \\
& & & & & &-3w&= &-3
\end{array}
\end{array}
}

Back-substitution gives

# w
1

{\displaystyle w=1}

,

# z
2

{\displaystyle z=2}

,

# y
−
1

{\displaystyle y=-1}

, and

# x
−
1

{\displaystyle 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

x

3
y

=

1

2
x

y

=

−
3

2
x

2
y

=

−
2

{\displaystyle
\begin{array}{\*{2}{rc}r}
x &+ &3y &= &1 \\
2x &+ &y &= &-3 \\
2x &+ &2y &= &-2
\end{array}
}

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

→

−
2

ρ
1

ρ
3

−
2

ρ
1

ρ
2

x

3
y

=

1

−
5
y

=

−
5

−
4
y

=

−
4

{\displaystyle \begin{array}{rcl}
&\xrightarrow[-2\rho\_1 +\rho\_3]{-2\rho\_1 +\rho\_2}
&\begin{array}{\*{2}{rc}r}
x &+ &3y &= &1 \\
& &-5y &= &-5 \\
& &-4y &= &-4
\end{array}
\end{array}
}

shows that one of the equations is redundant.
Echelon form

→

−
(
4

/

5
)

ρ
2

ρ
3

x

3
y

=

1

−
5
y

=

−
5

0

=

0

{\displaystyle \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}
}

gives

# y
1

{\displaystyle y=1}

 and

# x
−
2

{\displaystyle x=-2}

.
The "

# 0
0

{\displaystyle 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.

x

3
y

=

1

2
x

y

=

−
3

2
x

2
y

=

0

→

−
2

ρ
1

ρ
3

−
2

ρ
1

ρ
2

x

3
y

=

1

−
5
y

=

−
5

−
4
y

=

−
2

{\displaystyle \begin{array}{rcl}
\begin{array}{\*{2}{rc}r}
x &+ &3y &= &1 \\
2x &+ &y &= &-3 \\
2x &+ &2y &= &0
\end{array}
&\xrightarrow[-2\rho\_1 +\rho\_3]{-2\rho\_1 +\rho\_2}
&\begin{array}{\*{2}{rc}r}
x &+ &3y &= &1 \\
& &-5y &= &-5 \\
& &-4y &= &-2
\end{array}
\end{array}
}

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

→

−
(
4

/

5
)

ρ
2

ρ
3

x

3
y

=

1

−
5
y

=

−
5

0

=

2

{\displaystyle \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}
}

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.

x

2
y

=

8

2
x

4
y

=

8

→

−
2

ρ
1

ρ
2

x

2
y

=

8

0

=

−
8

{\displaystyle \begin{array}{rcl}
\begin{array}{\*{2}{rc}r}
x &+ &2y &= &8 \\
2x &+ &4y &= &8
\end{array}
&\xrightarrow[]{-2\rho\_1 + \rho\_2}
&\begin{array}{\*{2}{rc}r}
x &+ &2y &= &8 \\
& &0 &= &-8
\end{array}
\end{array}
}

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

x

y

=

4

2
x

2
y

=

8

{\displaystyle
\begin{array}{\*{2}{rc}r}
x &+ &y &= &4 \\
2x &+ &2y &= &8
\end{array}
}

any pair of numbers satisfying the first equation automatically
satisfies the second.
The solution set

{
(
x
,
y
)

x
# y
4
}

{\displaystyle \{ (x,y)\,\big|\, x+y=4 \} }

 is infinite; some
of its members are

(
0
,
4
)

{\displaystyle (0,4)}

,

(
−
1
,
5
)

{\displaystyle (-1,5)}

, and

(
2.5
,
1.5
)

{\displaystyle (2.5,1.5)}

.
The result of applying Gauss' method here contrasts with the prior example
because we do not get a contradictory equation.

→

−
2

ρ
1

ρ
2

x

y

=

4

0

=

0

{\displaystyle \begin{array}{rcl}
&\xrightarrow[]{-2\rho\_1 + \rho\_2}
&\begin{array}{\*{2}{rc}r}
x &+ &y &= &4 \\
& &0 &= &0
\end{array}
\end{array}
}

Don't be fooled by the "

# 0
0

{\displaystyle 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

{\displaystyle 0 = 0}

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

x

y

z

=

0

y

z

=

0

{\displaystyle
\begin{array}{\*{3}{rc}r}
x &+ &y &+ &z &= &0 \\
& &y &+ &z &= &0
\end{array}
}

has no "

# 0
0

{\displaystyle 0 = 0}

", and yet has infinitely many solutions.
(For instance, each of these is a solution:

(
0
,
1
,
−
1
)

{\displaystyle (0,1,-1)}

,

(
0
,
1

/

2
,
−
1

/

2
)

{\displaystyle (0,1/2,-1/2)}

,

(
0
,
0
,
0
)

{\displaystyle (0,0,0)}

, and

(
0
,
−
π
,
π
)

{\displaystyle (0,-\pi,\pi)}

.
There are infinitely many solutions because
any triple whose first component is

0

{\displaystyle 0}

 and whose second component is the
negative of the third is a solution.)

Nor does the presence of a "

# 0
0

{\displaystyle 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

{\displaystyle 0 = 0}

" row.

2
x

−

2
z

=

6

y

z

=

1

2
x

y

−

z

=

7

3
y

3
z

=

0

→

−

ρ
1

ρ
3

2
x

−

2
z

=

6

y

z

=

1

y

z

=

1

3
y

3
z

=

0

→

−
3

ρ
2

ρ
4

−

ρ
2

ρ
3

2
x

−

2
z

=

6

y

z

=

1

0

=

0

0

=

−
3

{\displaystyle \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[-3\rho\_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}
}

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

Template:Linear Algebra/Book 2/Recommended

Problem 1

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

1. 2
x

3
y

=

13

x

−

y

=

−
1

{\displaystyle \begin{array}{\*{2}{rc}r}
2x &+ &3y &= &13 \\
x &- &y &= &-1
\end{array}}
2. x

−

z

=

0

3
x

y

=

1

−
x

y

z

=

4

{\displaystyle \begin{array}{\*{3}{rc}r}
x & & &- &z &= &0 \\
3x &+ &y & & &= &1 \\
-x &+ &y &+ &z &= &4
\end{array}}

Template:Linear Algebra/Book 2/Recommended

Problem 2

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

1. 2
x

2
y

=

5

x

−

4
y

=

0

{\displaystyle
\begin{array}{\*{2}{rc}r}
2x &+ &2y &= &5 \\
x &- &4y &= &0
\end{array}
}
2. −
x

y

=

1

x

y

=

2

{\displaystyle
\begin{array}{\*{2}{rc}r}
-x &+ &y &= &1 \\
x &+ &y &= &2
\end{array}
}
3. x

−

3
y

z

=

1

x

y

2
z

=

14

{\displaystyle
\begin{array}{\*{3}{rc}r}
x &- &3y &+ &z &= &1 \\
x &+ &y &+ &2z &= &14
\end{array}
}
4. −
x

−

y

=

1

−
3
x

−

3
y

=

2

{\displaystyle
\begin{array}{\*{2}{rc}r}
-x &- &y &= &1 \\
-3x &- &3y &= &2
\end{array}
}
5. 4
y

z

=

20

2
x

−

2
y

z

=

0

x

z

=

5

x

y

−

z

=

10

{\displaystyle
\begin{array}{\*{3}{rc}r}
& &4y &+ &z &= &20 \\
2x &- &2y &+ &z &= &0 \\
x & & &+ &z &= &5 \\
x &+ &y &- &z &= &10
\end{array}
}
6. 2
x

z

w

=

5

y

−

w

=

−
1

3
x

−

z

−

w

=

0

4
x

y

2
z

w

=

9

{\displaystyle \begin{array}{\*{4}{rc}r}
2x & & &+ &z &+ &w &= &5 \\
& &y & & &- &w &= &-1 \\
3x & & &- &z &- &w &= &0 \\
4x &+ &y &+ &2z &+ &w &= &9
\end{array}
}

Template:Linear Algebra/Book 2/Recommended

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

x

3
y

=

1

2
x

y

=

−
3

2
x

2
y

=

0

{\displaystyle
\begin{array}{\*{2}{rc}r}
x &+ &3y &= &1 \\
2x &+ &y &= &-3 \\
2x &+ &2y &= &0
\end{array}
}

from Example 1.12.

1. Solve the first equation for

x

{\displaystyle x}

 and
substitute that expression into the second equation.
Find the resulting

y

{\displaystyle y}

.
2. Again solve the first equation for

x

{\displaystyle x}

,
but this time substitute that expression into the third equation.
Find this

y

{\displaystyle y}

.

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

Template:Linear Algebra/Book 2/Recommended

Problem 4

For which values of

k

{\displaystyle k}

 are
there no solutions, many solutions, or a unique solution
to this system?

x

−

y

=

1

3
x

−

3
y

=

k

{\displaystyle
\begin{array}{\*{2}{rc}r}
x &- &y &= &1 \\
3x &- &3y &= &k
\end{array}
}

Template:Linear Algebra/Book 2/Recommended

Problem 5

This system is not linear, in some sense,

2
sin
⁡
α

−

cos
⁡
β

3
tan
⁡
γ

=

3

4
sin
⁡
α

2
cos
⁡
β

−

2
tan
⁡
γ

=

10

6
sin
⁡
α

−

3
cos
⁡
β

tan
⁡
γ

=

9

{\displaystyle
\begin{array}{\*{3}{rc}r}
2\sin\alpha &- &\cos\beta &+ &3\tan\gamma &= &3 \\
4\sin\alpha &+ &2\cos\beta &- &2\tan\gamma &= &10 \\
6\sin\alpha &- &3\cos\beta &+ &\tan\gamma &= &9
\end{array}
}

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

Template:Linear Algebra/Book 2/Recommended

Problem 6

What conditions must the constants, the

b

{\displaystyle b}

's,
satisfy so that each of these systems has a solution?
*Hint.*
Apply Gauss' method and see what happens to the right side Template:Harv.

1. x

−

3
y

=

b
1

3
x

y

=

b
2

x

7
y

=

b
3

2
x

4
y

=

b
4

{\displaystyle
\begin{array}{\*{2}{rc}r}
x &- &3y &= &b\_1 \\
3x &+ &y &= &b\_2 \\
x &+ &7y &= &b\_3 \\
2x &+ &4y &= &b\_4
\end{array} }
2. x
1

2

x
2

3

x
3

=

b
1

2

x
1

5

x
2

3

x
3

=

b
2

x
1

8

x
3

=

b
3

{\displaystyle
\begin{array}{\*{3}{rc}r}
x\_1 &+ &2x\_2 &+ &3x\_3 &= &b\_1 \\
2x\_1 &+ &5x\_2 &+ &3x\_3 &= &b\_2 \\
x\_1 & & &+ &8x\_3 &= &b\_3
\end{array} }

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?

Template:Linear Algebra/Book 2/Recommended

Problem 9

Find the coefficients

a

{\displaystyle a}

,

b

{\displaystyle b}

, and

c

{\displaystyle c}

 so that the graph of

f
(
x
# )
a

x
2

b
x
c

{\displaystyle f(x)=ax^2+bx+c }

passes through the points

(
1
,
2
)

{\displaystyle (1,2)}

,

(
−
1
,
6
)

{\displaystyle (-1,6) }

, and

(
2
,
3
)

{\displaystyle (2,3)}

.

Problem 10

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

1. Can the equation

3
x
−
2
# y
5

{\displaystyle 3x-2y=5 }

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

x

y

=

1

4
x

−

y

=

6

{\displaystyle
\begin{array}{\*{2}{rc}r}
x &+ &y &= &1 \\
4x &- &y &= &6
\end{array}
}
2. Can the equation

5
x
−
3
# y
2

{\displaystyle 5x-3y=2 }

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

2
x

2
y

=

5

3
x

y

=

4

{\displaystyle
\begin{array}{\*{2}{rc}r}
2x &+ &2y &= &5 \\
3x &+ &y &= &4
\end{array}
}
3. Can the equation

6
x
−
9
y
5
# z
−
2

{\displaystyle 6x-9y+5z=-2 }

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

2
x

y

−

z

=

4

6
x

−

3
y

z

=

5

{\displaystyle
\begin{array}{\*{3}{rc}r}
2x &+ &y &- &z &= &4 \\
6x &- &3y &+ &z &= &5
\end{array}
}

Problem 11

Prove that, where

a
,
b
,
…
,
e

{\displaystyle a,b,\ldots,e }

 are real numbers
and

a
≠
0

{\displaystyle a\ne0}

, if

a
x
b
# y
c

{\displaystyle a x + b y = c}

has the same solution set as

a
x
d
# y
e

{\displaystyle
ax+dy=e
}

then they are the same equation.
What if

# a
0

{\displaystyle a = 0}

?

Template:Linear Algebra/Book 2/Recommended

Problem 12

Show that if

a
d
−
b
c
≠
0

{\displaystyle ad-bc\neq 0 }

 then

a
x

b
y

=

j

c
x

d
y

=

k

{\displaystyle
\begin{array}{\*{2}{rc}r}
ax &+ &by &= &j \\
cx &+ &dy &= &k
\end{array}
}

has a unique solution.

Template:Linear Algebra/Book 2/Recommended

Problem 13

In the system

a
x

b
y

=

c

d
x

e
y

=

f

{\displaystyle
\begin{array}{\*{2}{rc}r}
ax &+ &by &= &c \\
dx &+ &ey &= &f
\end{array}
}

each of the equations describes a line in the

x
y

{\displaystyle xy}

-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

R

2

{\displaystyle \mathbb R^{2}}

?

Template:Linear Algebra/Book 2/Recommended

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

S
1

→

S
2

{\displaystyle S\_1\rightarrow S\_2}

 then there is a row operation to go back

S
2

→

S
1

{\displaystyle S\_2\rightarrow S\_1}

.

? Problem 18

A box holding pennies, nickels and dimes contains
thirteen coins with a total value of

83

{\displaystyle 83}

 cents.
How many coins of each type are in the box?
Template:Harv

? 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:

1. 19
2. 21
3. 23
4. 29
5. 17

Template:Harv

Template:Linear Algebra/Book 2/Recommended

? Problem 20

Laugh at this:

AHAHA

TEHE

=

TEHAW

{\displaystyle \mbox{AHAHA}+\mbox{TEHE}=\mbox{TEHAW} }

.
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 Template:Harv.

? Problem 21

The Wohascum County Board of Commissioners, which has 20 members,
recently had to elect a President.
There were three candidates (

A

{\displaystyle A}

,

B

{\displaystyle B}

, and

C

{\displaystyle C}

); 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

A

{\displaystyle A}

 over

B

{\displaystyle B}

(thus the other 9 preferred

B

{\displaystyle B}

 over

A

{\displaystyle A}

).
Similarly, it was found that 12 members preferred

C

{\displaystyle C}

 over

A

{\displaystyle A}

.
Given these results, it was suggested that

B

{\displaystyle B}

 should withdraw, to enable
a runoff election between

A

{\displaystyle A}

 and

C

{\displaystyle C}

.
However,

B

{\displaystyle B}

 protested, and it was then found that 14 members preferred

B

{\displaystyle B}

 over

C

{\displaystyle C}

!
The Board has not yet recovered from the resulting confusion.
Given that every possible order of

A

{\displaystyle A}

,

B

{\displaystyle B}

,

C

{\displaystyle C}

 appeared on at least
one ballot, how many members voted for

B

{\displaystyle B}

 as their first choice Template:Harv?

? Problem 22

"This system of

n

{\displaystyle n}

 linear equations with

n

{\displaystyle n}

 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

6
x
9
# y
12

{\displaystyle 6x+9y=12 }

 and

15
x
18
# y
21

{\displaystyle 15x+18y=21 }

?"

"Quite so," said the Great Mathematician, pulling out his bassoon.
"Indeed, even larger systems can be solved regardless of their progression.
Can you find their solution?"

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

Are you? Template:Harv

Solutions

Template:BookCat