You are on page 1of 101

Chapter 1

Linear Systems and Gaussian


Elimination
Chapter 1 Linear Systems and Gaussian Elimination

Section 1.1
Linear Systems and Their
Solutions
Lines in xy-plane (Discussion 1.1.1)

A line in the xy-plane can be y


represented algebraically by
an equation of the form ax + by = c
ax + by = c
where a and b are not both x
zero.
An equation of this kind is known as a linear equation in
the variables of x and y.
Linear equations in n variables (Definition 1.1.2)

A linear equation in n variables x1, x2, …, xn has the


form
a1x1 + a2x2 + ··· + anxn = b
where a1, a2, …, an and b are real constants.
The variables in a linear equation are also called the
unknowns.
If all a1, a2, …, an and b are zero, the equation is called
a zero equation.
A linear equation is called non-zero if it is not a zero
equation.
Examples (Example 1.1.3.1-2)

The following are linear equations:


x + 3y = 7,
x1 + 2x2 + 2x3 + x4 = x5,
y = x − 1 z + 4.5,
2
x1 + x2 + ··· + xn = 1.
The following are not linear equations:
xy = 2,
sin(θ) + cos(ϕ) = 0.2,
x12 + x22 + ··· + xn2 = 1,
x = ey.
Examples (Example 1.1.3.3)

The linear equation ax + by + cz = d, where a, b, c, d


are constants and not all a, b, c are zero, represents a
plane in the three dimensional space.
For example, z = 0 z
(i.e. 0x + 0y + z = 0)
is the xy-plane contained
inside the three
dimensional space. y

z=0
x
Solutions of a linear equation (Definition 1.1.4)

Given n real numbers s1, s2, …, sn, we say that


x1 = s1, x2 = s2, …, xn = sn is a solution to a linear
equation a1x1 + a2x2 + ··· + anxn = b
if the equation is satisfied when we substitute the values
into the equation accordingly,
i.e. a1s1 + a2s2 + ··· + ansn = b.
The set of all solutions to the equation is called the
solution set of the equation.
An expression that gives us all the solutions to the
equation is called a general solution of the equation.
Examples (Example 1.1.5.1)

Consider the linear equation 4x − 2y = 1.


A general solution is
x=t
1
y = 2t − 2 where t is an arbitrary parameter.

We can also write a general solution as


1 1
x = 2s + 4
where s is an arbitrary parameter.
y=s
These include solutions such as
x=1 x = 1.5 x = −1
y = 1.5, y = 2.5, y = −2.5,
and infinitely many solutions.
Examples (Example 1.1.5.2)

Consider the linear equation x1 − 4x2 + 7x3 = 5.


A general solution is
x1 = 5 + 4s − 7t
x2 = s
x3 = t
where s and t are arbitrary parameters.
Geometrical interpretation (Example 1.1.5.3 (a))

In the xy-plane, the equation x + y = 1 represents the


line shown below.
The solutions of the equation are points
(x, y) = (1 − s, s)
where s is any real number.
y
(1 − s, s) for s = 1
(1 − s, s) for s = 0.75
(1 − s, s) for s = 0.5
(1 − s, s) for s = 0.25
(1 − s, s) for s = 0
x
x+y=1
Geometrical interpretation (Example 1.1.5.3 (b))

In the xyz-space, the equation x + y = 1


(i.e. x + y + 0z = 1) represents the plane shown below.
The solutions of the equation
are points z
(x, y, z) = (1 − s, s, t )
where s and t are any (1 − s, s, t)
real numbers. x+y=1

y
(1 − s, s, 0)

x
Examples (Example 1.1.5.4-5)

Consider the zero linear equation


0x1 + 0x2 + ··· + 0xn = 0.
Any values of x1, x2, …, xn give us a solution.
Thus a general solution is x1 = t1, x2 = t2, …, xn = tn
where t1, t2, …, tn are arbitrary parameters.

Consider the linear equation


0x1 + 0x2 + ··· + 0xn = b
where b is nonzero.
Any values of x1, x2, …, xn do not satisfy the equation.
Thus there is no solution.
Systems of linear equations (Definition 1.1.6)

A finite set of linear equations in the variables x1, x2, …,


xn is called a system of linear equations (or a linear
system):
a11x1 + a12x2 + ··· + a1nxn = b1
a21x1 + a22x2 + ··· + a2nxn = b2
⁞ ⁞
am1x1 + am2x2 + ··· + amnxn = bm

where a11, a12, …, amn and b1, b2, …, bm are real


constants.
Solutions of a linear system (Definition 1.1.6)

Given n real numbers s1, s2, …, sn, we say that


x1 = s1, x2 = s2, …, xn = sn is a solution to the system
if x1 = s1, x2 = s2, …, xn = sn is a solution to every
equation in the system.
The set of all solutions to the system is called the solution
set of the system.
An expression that gives us all the solutions to the system
is called a general solution of the system.
Examples (Example 1.1.7 & Remark 1.1.8)

4x1 − x2 + 3x3 = −1
Consider the linear system
3x1 + x2 + 9x3 = −4.

x1 = 1, x2 = 2, x3 = −1 4 · 1 − 2 + 3 · (−1) = −1
is a solution of the system. 3 · 1 + 2 + 9 · (−1) = −4.

x1 = 1, x2 = 8, x3 = 1 4 · 1 − 8 + 3 · 1 = −1
is not a solution of the system. 3 · 1 + 8 + 9 · 1 = 20 ≠ −4.

Not all systems of linear equations have solutions.


x+ y =4
For example, the system has no solution.
2x + 2y = 6
(Definition 1.1.9
Solutions of linear systems & Remark 1.1.10)

A system of linear equations that has no solution is said to


be inconsistent.
A system that has at least one solution is called
consistent.
Every system of linear equations has either
(i) no solution, (inconsistent)
(ii) exactly one solution or
(consistent)
(iii) infinitely many solutions.
Geometrical interpretation (Discussion 1.1.11.1)

In the xy-plane, the two equations in the system


a1x + b1y = c1 (L1)
a2x + b2y = c2, (L2)
where a1, b1 are not both zero and a2, b2 are not both
zero, represents two straight lines.
A solution to the system is a point of intersection of the two
lines. (x1, y1) a1 x 1 + b 1 y 1 = c 1
a2 x 1 + b 2 y 1 ≠ c 2
(a) The system has no solution
if and only if L1 and L2 are L1
(x2, y2)
different but parallel lines.
L2 a1 x 2 + b 1 y 2 ≠ c 1
a2 x 2 + b 2 y 2 = c 2
Geometrical interpretation (Discussion 1.1.11.1)

a1x + b1y = c1 (L1)


a2x + b2y = c2, (L2)
a1 x 2 + b 1 y 2 ≠ c 1
(b) The system has only a2 x 2 + b 2 y 2 = c 2
one solution if and only
if L1 and L2 are not (x1, y1)
parallel lines. (x2, y2)
(x0, y0)
a1 x 1 + b 1 y 1 = c 1
a2 x 1 + b 2 y 1 ≠ c 2

L2 a1 x 0 + b 1 y 0 = c 1 L1
a2 x 0 + b 2 y 0 = c 2
Geometrical interpretation (Discussion 1.1.11.1)

a1x + b1y = c1 (L1)


a2x + b2y = c2, (L2)

(c) The system has infinitely L1


many solutions if and only if L2
L1 and L2 are the same (x0, y0)
line.

a1 x 0 + b 1 y 0 = c 1
a2 x 0 + b 2 y 0 = c 2
Geometrical interpretation (Discussion 1.1.11.2)

In the xyz-space, the two equations in the system


a1x + b1y + c1z = d1 (P1)
a2x + b2y + c2z = d2, (P2)
where a1, b1, c1 are not all zero and a2, b2, c2 are not all
zero, represents two planes.
A solution to the system is a point of intersection of the
two planes.
P1
(a) The system has no solution
if and only if P1 and P2 are
different but parallel planes.
P2
Geometrical interpretation (Discussion 1.1.11.2)

a1x + b1y + c1z = d1 (P1)


a2x + b2y + c2z = d2, (P2)

(b) The system cannot have only one solution.


(c) The system has infinitely many solutions if and only if
either P1 and P2 intersect at a line
or P1 and P2 are the same planes.
P1
P1

P2 P2
An exercise (Question 1.8)

In the xyz-space, the three equations in the system


a1x + b1y + c1z = d1 (P1)
a2x + b2y + c2z = d2 (P2)
a3x + b3y + c3z = d3, (P3)
where for each i, ai, bi, ci are not all zero, represents
three planes.
Discuss the relative positions of the three planes when
the linear system
(a) has no solution;
(b) has only one solution;
(c) has infinitely many solution.
Chapter 1 Linear Systems and Gaussian Elimination

Section 1.2
Elementary Row Operations
Augmented matrices (Definition 1.2.1)

A system of linear equations


a11x1 + a12x2 + ··· + a1nxn = b1
a21x1 + a22x2 + ··· + a2nxn = b2
⁞ ⁞
am1x1 + am2x2 + ··· + amnxn = bm
can be represented by a rectangular array of numbers
a11 a12 ··· a1n b1
a21 a22 ··· a2n b2 This array is called
. the augmented
⁞ ⁞ ⁞ ⁞
matrix of the system.
am1 am2 ··· amn bm
An example (Example 1.2.2)

Consider the linear system


x1 + x2 + 2x3 = 9
2x1 + 4x2 − 3x3 = 1
3x1 + 6x2 − 5x3 = 0.

Its augment matrix is


1 1 2 9
2 4 −3 1 .
3 6 −5 0
(Discussion 1.2.3
Elementary row operations & Definition 1.2.4)

The following are the basic techniques for solving a


system of linear equations:
1. Multiply an equation by a nonzero constant.
2. Interchange two equations.
3. Add a multiple of one equation to another equation.
In terms of augmented matrix, these correspond to:
1. Multiply a row by a nonzero constant.
2. Interchange two rows.
3. Add a multiple of one row to another row.

These three operations of the augmented matrix are


known as elementary row operations.
An example (Example 1.2.5)

Consider the linear system and its augment matrix:


x + y + 3z = 0 (1) 1 1 3 0
2x − 2y + 2z = 4 (2) 2 −2 2 4
3x + 9y =3 (3) 3 9 0 3

Add −2 times of Add −2 times of


Equation (1) to the first row to
Equation (2). the second row.

x + y + 3z = 0 (1) 1 1 3 0
− 4y − 4z = 4 (4) 0 −4 −4 4
3x + 9y =3 (3) 3 9 0 3
An example (Example 1.2.5)

x + y + 3z = 0 (1) 1 1 3 0
− 4y − 4z = 4 (4) 0 −4 −4 4
3x + 9y =3 (3) 3 9 0 3

Add −3 times of Add −3 times of


Equation (1) to the first row to
Equation (3). the third row.

x + y + 3z = 0 (1) 1 1 3 0
− 4y − 4z = 4 (4) 0 −4 −4 4
6y − 9z = 3 (5) 0 6 −9 3
An example (Example 1.2.5)

x + y + 3z = 0 (1) 1 1 3 0
− 4y − 4z = 4 (4) 0 −4 −4 4
6y − 9z = 3 (5) 0 6 −9 3

Add 6/4 times of Add 6/4 times of


Equation (4) to the second row to
Equation (5). the third row.

x + y + 3z = 0 (1) 1 1 3 0
− 4y − 4z = 4 (4) 0 −4 −4 4
−15z = 9 (6) 0 0 −15 9
An example (Example 1.2.5)

x + y + 3z = 0 (1) 1 1 3 0
− 4y − 4z = 4 (4) 0 −4 −4 4
−15z = 9 (6) 0 0 −15 9
9 3
By Equation (6), z = − 15 = − 5 .
3
Substituting z = − 5 into Equation (4),
3 2
− 4y − 4 − 5 = 4 which gives us y = − 5 .
2 3
Substituting y = − 5 and z = − 5 into Equation (1),
2 3 11
x + − 5 + 3 − 5 = 0 which gives us x = 5 .
(Definition 1.2.6
Row equivalent matrices & Theorem 1.2.7)

Two augmented matrices are said to be row equivalent if


one can be obtained from the other by a series of
elementary row operations.
If augmented matrices of two systems of linear equations
are row equivalent, then the two systems have the same
set of solutions. (See Remark 2.4.6 for a proof.)
same
linear system X linear system Y
solutions


augmented matrix row augmented matrix
of the system X equivalent of the system Y
An example (Example 1.2.8)

Consider the linear systems in Example 1.2.5:

x + y + 3z = 0 x + y + 3z = 0
same solution
2x − 2y + 2z = 4 − 4y − 4z = 4
x = 11/5
3x + 9y =3 y = −2/5 −15z = 9
z = −3/5

1 1 3 0 1 1 3 0
row
2 −2 2 4 equivalent 0 −4 −4 4
3 9 0 3 0 0 −15 9
Chapter 1 Linear Systems and Gaussian Elimination

Section 1.3
Row-Echelon Forms
Row-echelon forms (Definition 1.3.1)

An augmented matrix is said to be in row-echelon form if it


has the following Properties 1 and 2:
1. If there are any rows that consist entirely of zeros,
then they are grouped together at the bottom of the
matrix.
* * ··· *
⁞ ⁞ ⁞ non-zero rows
* * ··· *
0 0 ··· 0
⁞ ⁞ ⁞ zero rows
0 0 ··· 0
Row-echelon forms (Definition 1.3.1)

2. In any two successive rows that do not consist entirely


of zeros, the first nonzero number in the lower row
occurs farther to the right than the first nonzero
number in the higher row.

0 ··· 0 ⊗ * ········· *
two successive rows
0 ········· 0 ⊗ * ··· *

The first nonzero number in a row is


non-zero
leading called the leading entry of the row.
entries
Row-echelon forms (Definition 1.3.1)

The following is the general form of a row-echelon form:

0 ⊗ * ··· ··· ··· *


pivot points 0 0 ⊗ * ··· ··· *
non-zero rows
⁞ ⁞
Leading entries 0 ··· ··· 0 ⊗ * *
of nonzero rows
0 ··· ··· ··· ··· ··· 0
are called pivot zero rows
points.

pivot columns non-pivot columns

A column contains a pivot point is called a pivot


column. Otherwise, it is called a non-pivot column.
Reduced row-echelon forms (Definition 1.3.1)

An augmented matrix is said to be in reduced row-


echelon form if it is in row-echelon form and has the
following Properties 3 and 4:
3. The leading entry of every nonzero row is 1.

0 1 * ··· ··· ··· *


0 0 1 * ··· ··· *
non-zero rows
⁞ ⁞ (Remark 1.3.2)
0 ··· ··· 0 1 * * In some textbook,
0 ··· ··· ··· ··· ··· 0 row-echelon forms
zero rows are required to
have Properties 1,
2 and 3.
Reduced row-echelon forms (Definition 1.3.1)

4. In each pivot column, except the pivot point, all other


entries are zero.

0 1 0 ··· 0 ··· *
0 0 1 * 0 ··· *
non-zero rows
⁞ ⁞ ⁞
0 ··· ··· 0 1 * *
0 ··· ··· ··· ··· ··· 0
zero rows

pivot columns
Examples (Example 1.3.3.1)

The following augmented matrices are in reduced row-


echelon form:

1 0 0 1
0 0 0
1 2 3 0 1 0 2
0 0 0
0 0 1 3

0 1 2 0 1
1 0 0
0 0 0 1 3 The pivot points
0 1 0
0 0 0 0 0 are marked by
0 0 1
0 0 0 0 0 .
Examples (Example 1.3.3.2)

The following augmented matrices are in row-echelon


form but not in reduced row-echelon form:

−1 2 3 4
1 −1 0
3 2 1 0 1 1 2
0 1 0
0 0 2 3

0 1 2 8 1
2 1 0
0 0 0 4 3 The pivot points
0 1 0
0 0 0 0 0 are marked by
0 0 1
0 0 0 0 0 .
Examples (Example 1.3.3.3)

The following augmented matrices are not in row-echelon


form:

1 0 2 1 0 0 1
0 1 0
0 1 0 2 1 −1 0
1 0 0
0 1 1 3 0 0 1

0 0 0 0 0
0 1 2 0 1
0 0 0 1 3
0 0 0 0 0
Examples (Discussion 1.3.4 & Example 1.3.5.1)

If the augmented matrix of a system of linear equations is


in row-echelon form or reduced row-echelon form, we can
get the solutions to the system easily.

1 0 0 1 x1x1 + 0x2=+10x3 = 1
0 1 0 2 0x1x+2 x2=+20x3 = 2
0 0 1 3 x3 2=+3 x3 = 3
0x1 + 0x

The system has only one solution:


x1 = 1
x2 = 2
x3 = 3
Examples (Example 1.3.5.2)

0 2 2 1 −2 2 0x
2x12 + 2x
2x32 ++ x2x
43− +2x5x=4 −2 2x5 = 2
0 0 1 1 1 3 0x1 + 0xx32 ++ x4x3++ x5x=4 +3 x5 = 3
0 0 0 0 2 4 0x1 + 0x2 + 0x3 +2x0x 5 =4 +4 2x5 = 4

The coefficients of x1 are zero in all the three equations


and this means that x1 is arbitrary.
The method we
By the 3 equation, x5 = 2.
rd
used here is
Substituting x5 = 2 into the 2nd equation, called the back
x3 + x4 + 2 = 3 which gives us x3 = 1 − x4. substitution.
Substituting x3 = 1 − x4 and x5 = 2 into the 1st equation,
1
2x2 + 2(1 − x4) + x4 − 2 · 2 = 2 which gives us x2 = 2 + 2 x4.
Examples (Example 1.3.5.2)

0 2 2 1 −2 2 0x
2x12 + 2x
2x32 ++ x2x
43− +2x5x=4 −2 2x5 = 2
0 0 1 1 1 3 0x1 + 0xx32 ++ x4x3++ x5x=4 +3 x5 = 3
0 0 0 0 2 4 0x1 + 0x2 + 0x3 +2x0x 5 =4 +4 2x5 = 4

The system has infinitely many solutions:


x1 = s
1
x2 = 2 + 2 t
x3 = 1 − t
x4 = t
x5 = 2
where s and t are arbitrary parameters.
Examples (Example 1.3.5.3)

1 −1 0 3 −2 x1 − x2 + 0x3 + 3x4 = −2
x1 − x2 + 3x4 = −2
0 0 1 2 5 0x1 + 0x2 + x3 + 2x4 = 5
x3 + 2x4 = 5
0 0 0 0 0 0x1 + 0x2 + 0x3 + 0x4 = 0
x1 = −2 − (−x2) − 3x4
x3 = 5 − 2x4

The system has infinitely many solutions:


x1 = −2 + s − 3t
x2 = s
x3 = 5 − 2t
x4 = t
where s and t are arbitrary parameters.
Examples (Example 1.3.5.4)

0 0 0 0 0x1 + 0x2 + 0x3 = 0


0 0 0 0 0x1 + 0x2 + 0x3 = 0

The system has infinitely many solutions:


x1 = r
x2 = s
x3 = t
where r, s and t are arbitrary parameters.
Examples (Example 1.3.5.5)

3 1 4 3x1 + x2 = 4
0 2 1 0x1 + 2x2 = 1
0 0 1 0x1 + 0x2 = 1

The system has no solution.


Chapter 1 Linear Systems and Gaussian Elimination

Section 1.4
Gaussian Elimination
Friedrich Carl Gauss (1777-1855)

Friedrich Carl Gauss, a


German scientist known as
the Prince of Mathematicians,
is generally regarded as one
of the greatest
mathematicians of all time for
his contributions to number
theory, geometry, probability
theory, geodesy, planetary
astronomy, the theory of
functions, and potential
theory.
Row echelon forms (Definition 1.4.1)

Let A and R be row-equivalent augmented matrices


i.e. R can be obtained from A by a series of elementary
row operations.
If R is in row-echelon form, then
R is called a row-echelon form of A;
and A is said to have a row-echelon form R.
If R is in reduced row-echelon form, then
R is called a reduced row-echelon form of A;
and A is said to have a reduced row-echelon form R.
Gaussian Elimination (Algorithm 1.4.2)

Gaussian Elimination is an algorithm that reduces an


augmented matrix to a row-echelon form by using
elementary operations.
Step 1: Locate the leftmost column that does not consist
entirely of zeros.

0 3 ··· ··· 0 3 9 ···


1 −2 ··· ··· 0 2 −3 ···
4 0 ··· ··· 0 −1 6 ···

the leftmost the leftmost


nonzero nonzero
column column
Gaussian Elimination (Algorithm 1.4.2)

Step 2: Interchange the top row with another row, if


necessary, to bring a nonzero entry to the top of the
column found in Step 1.

0 3 ··· ··· 0 3 9 ···


1 −2 ··· ··· 0 2 −3 ···
Interchange 4 0 ··· ··· 0 −1 6 ···
the 1st row
and the 2nd No action is needed.
row.
1 −2 ··· ···
0 3 ··· ···
4 0 ··· ···
Gaussian Elimination (Algorithm 1.4.2)

Step 3: For each row below the top row, add a suitable
multiple of the top row to it so that the entry below the
leading entry of the top row becomes zero.
Add −2/3 times
1 −2 ··· ··· 0 3 9 ··· of the 1st row to
0 3 ··· ··· 0 2 −3 ··· the 2nd row so
4 0 ··· ··· 0 −1 6 ··· that the entry 2
Add −4 becomes 0.
times of the
1st row to the
Add 1/3 times
3rd row so that 1 −2 ··· ··· 0 3 9 ··· of the 1st row to
the entry 4
becomes 0. 0 3 ··· ··· 0 0 −9 ··· the 3rd row so
that the entry
0 8 ··· ··· 0 0 9 ···
−1 becomes 0.
Gaussian Elimination (Algorithm 1.4.2)

Step 4: Now cover the top row in the matrix.

1 −2 ··· ··· 0 3 9 ···


0 3 ··· ··· 0 0 −9 ···
0 8 ··· ··· 0 0 9 ···

Begin again with Step 1 applied to the submatrix that


remains.
Continue in this way until the entire matrix is in row-
echelon form.
An example (Example 1.4.4.1)

0 0 2 4 2 8
Step 1: The 1st column is the
1 2 4 5 3 −9
leftmost nonzero column.
−2 −4 −5 −4 3 6

Step 2: Interchange the 1st 1 2 4 5 3 −9


and 2nd rows. 0 0 2 4 2 8
−2 −4 −5 −4 3 6

Step 3: Add 2 times of the 1 2 4 5 3 −9


1st row to the 3rd row. 0 0 2 4 2 8
0 0 3 6 9 −12
An example (Example 1.4.4.1)

1 2 4 5 3 −9 Step 4: Cover the 1st row and


0 0 2 4 2 8 begin again with Step 1.
0 0 3 6 9 −12 Step 1: The 3rd column is the
leftmost nonzero column.
Step 2: No action is needed.
1 2 4 5 3 −9
Step 3: Add −3/2 times of
0 0 2 4 2 8
the 2nd row to the 3rd row.
0 0 0 0 6 −24

The augmented matrix is 1 2 4 5 3 −9


already in row-echelon form: 0 0 2 4 2 8
0 0 0 0 6 −24
Gauss-Jordan Elimination (Algorithm 1.4.3)

Gauss-Jordan Elimination is an algorithm that reduces an


augmented matrix to the reduced row-echelon form by
using elementary operations.

First, use the Gaussian 0 3 ··· ··· 0 3 9 ···


Elimination (Algorithm 1.4.2) 1 −2 ··· ··· 0 2 −3 ···
to reduce the augmented 4 0 ··· ··· 0 −1 6 ···
matrix to a row-echelon Gaussian Gaussian
Elimination Elimination
form.
1 −2 ··· ··· 0 3 9 ···
0 3 ··· ··· 0 0 −9 ···
0 0 ··· ··· 0 0 0 ···
Gauss-Jordan Elimination (Algorithm 1.4.3)

Step 5: Multiply a suitable constant to each row so that all


the leading entries becomes 1.
Multiply the
No action 1 −2 ··· ··· 0 3 9 ··· 1st row by
is needed 0 3 ··· ··· 0 0 −9 ··· 1/3 so that
for the 1st the entry 3
row. 0 0 ··· ··· 0 0 0 ··· become 1.

Multiply the Multiply the


2nd row by 1 −2 ··· ··· 0 1 3 ··· 2nd row by
1/3 so that −1/9 so that
0 1 ··· ··· 0 0 1 ···
the entry 3 the entry −9
become 1. 0 0 ··· ··· 0 0 0 ··· become 1.
Gauss-Jordan Elimination (Algorithm 1.4.3)

Step 6: Beginning with the last pivot column and working


backward, add a suitable multiples of each row to the
rows above to introduce zeros above each pivot point.
Add 4 times of the last nonzero
row to this row so that the entry
0 1 4 ··· ··· −4 ··· ··· −4 becomes 0.
0 0 1 ··· ··· 3 ··· ···
Add −3 times of the last nonzero
⁞ ⁞ ⁞ ⁞
row to this row so that the entry 3
⁞ 1 2 becomes 0.
0 ··· ··· ··· 0 1 ··· ···
0 ··· ··· ··· ··· ··· ··· 0 Add −2 times of the last nonzero
row to this row so that the entry 2
becomes 0.
Gauss-Jordan Elimination (Algorithm 1.4.3)

Step 6: Beginning with the last pivot column and working


backward, add a suitable multiples of each row to the
rows above to introduce zeros above each pivot point.

0 1 4 ··· ··· 0 ··· ···


0 0 1 ··· ··· 0 ··· ···
⁞ ⁞ ⁞ ⁞
Apply the same process to
⁞ 1 0 the next pivot column.
0 ··· ··· ··· 0 1 ··· ···
0 ··· ··· ··· ··· ··· ··· 0
An example (Example 1.4.4.2)

0 0 2 4 2 8 1 2 4 5 3 −9
Gaussian
1 2 4 5 3 −9 0 0 2 4 2 8
Elimination
−2 −4 −5 −4 3 6 0 0 0 0 6 −24

Step 5: No action is needed for


1 2 4 5 3 −9
the 1st row.
0 0 1 2 1 4
Multiply the 2nd row by 1/2.
0 0 0 0 1 −4
Multiply the 3rd row by 1/6.

Step 6: Add −3 times of the 1 2 4 5 0 3


3rd row to the 1st row. 0 0 1 2 0 8
Add −1 times of the 3rd row 0 0 0 0 1 −4
to the 2nd row.
An example (Example 1.4.4.2)

1 2 4 5 0 3
0 0 1 2 0 8
0 0 0 0 1 −4

Step 6: Add −4 times of the 1 2 0 −3 0 −29


2nd row to the 1st row. 0 0 1 2 0 8
0 0 0 0 1 −4

The augmented matrix is already in reduced row-echelon


form.
Some remarks (Remark 1.4.5)

1. Every matrix has a unique reduced row-echelon form


but can have many different row-echelon forms.

2. In the actual implementation of the algorithm, steps


mentioned in Gaussian Elimination (Algorithm 1.4.2) and
Gauss-Jordan Elimination (Algorithm 1.4.3) are usually
modified to avoid the round-off errors during the
computation.
Solving linear systems (Discussion 1.4.6)

the linear system


same
a given linear system corresponding to the
solutions
row-echelon form

Gaussian or
a (reduced) row-
augmented matrix of Gauss-Jordan
echelon form of the
the system Elimination
augmented matrix

By solving the system corresponding to the augmented


matrix in a row-echelon form or the reduced row-echelon
form, we can find the solutions of the original system
easily.
An example (Example 1.4.7)

Consider the linear system:


2x3 + 4x4 + 2x5 = 8
x1 + 2x2 + 4x3 + 5x4 + 3x5 = −9
−2x1 − 4x2 − 5x3 − 4x4 + 3x5 = 6.

The augmented matrix is


0 0 2 4 2 8
1 2 4 5 3 −9 .
−2 −4 −5 −4 3 6

We solve the system in two different ways.


An example (Example 1.4.7)

Method 1: Use the Gaussian Elimination.


x1 x2 x3 x4 x5
0 0 2 4 2 8 1 2 4 5 3 −9
Gaussian
1 2 4 5 3 −9 0 0 2 4 2 8
Elimination
−2 −4 −5 −4 3 6 0 0 0 0 6 −24

The linear system corresponding to the row-echelon form


To get a general solution from an augmented matrix in
is:
row-echelon form, we first set the variable
x1 + 2x2 + 4x3 + 5x4 + 3x5 = −9
corresponding to non-pivot columns to be arbitrary.
2x3 + 4x4 + 2x5 = 8
Then equate the other variables using the method of
6x5. = −24.
back substitution (see Example 1.3.5.2)
(The remark at the end of Example 1.4.7)
An example (Example 1.4.7)

x1 + 2x
2s2 + 4x3 + 5t
5x4 + 3x5 = −9
2x3 + 4x
4t 4 + 2x5 = 8
6x5 = −24.
We set x2 = s and x4 = t where s and t are arbitrary
parameters.
By the 3rd equation, x5 = −4.
Substituting x5 = −4 into the 2nd equation,
2x3 + 4t − 2 · 4 = 8 which gives us x3 = 8 − 2t.
Substituting x3 = 8 − 2t and x5 = −4 into the 1st equation,
x1 + 2s + 4(8 − 2t) + 5t − 3 · 4 = −9
which gives us x1 = −29 − 2s + 3t.
An example (Example 1.4.7)

Method 2: Use the Gauss-Jordan Elimination.


x1 x2 x3 x4 x5
0 0 2 4 2 8 1 2 0 −3 0 −29
Gauss-Jordan
1 2 4 5 3 −9 0 0 1 2 0 8
Elimination
−2 −4 −5 −4 3 6 0 0 0 0 1 −4

The linear system corresponding to the reduced row-


To get aform
echelon general
is: solution from an augmented matrix in
row-echelon form, we first set the variable
x1 + 2x
corresponding − 3x4columns
to2non-pivot = −29
to be arbitrary.
3 + be
The other variables xcan 2x4equated
= directly.
8
x5 = −4.
(The remark at the end of Example 1.4.7)
An example (Example 1.4.7)

2s2
x1 + 2x 3t 4
− 3x = −29
2t 4
x3 + 2x = 8
x5 = −4.
We set x2 = s and x4 = t where s and t are arbitrary
parameters.
By the 1st equation, x1 = −29 − 2s + 3t.
By the 2nd equation, x3 = 8 − 2t.
By the 3rd equation, x5 = −4.
An example (Example 1.4.7)

For both method, a general solution of the system is:


x1 = −29 − 2s + 3t
x2 =s
x3 = 8 − 2t
x4 =t
x5 = −4
where s and t are arbitrary parameters.
A question from some students

2x3 + 4x4 + 2x5 = 8


x1 + 2x2 + 4x3 + 5x4 + 3x5 = −9
−2x1 − 4x2 − 5x3 − 4x4 + 3x5 = 6.
x1 x2 x3 x4 x5
0 0 2 4 2 8 1 2 0 −3 0 −29
Gauss-Jordan
1 2 4 5 3 −9 0 0 1 2 0 8
Elimination
−2 −4 −5 −4 3 6 0 0 0 0 1 −4
For example, x1 x2 x3 x4 x5
Instead of reducing the
by a series of 1 2 1.5 0 0 −17
augmented matrix to
elementary
reduced-row echelon form, 0 0 0.5 1 0 4
operations,
some students claim that
we get ... 0 0 0 0 1 −4
they can solve the linear
system by other ways.
A question from some students

Gaussian and Gauss-Jordan Eliminations are just


methods for solving systems of linear equations. There
are many different methods to do the job.
However, as beginners, you are advised to understand
and familiarize with the Gaussian and Gauss-Jordan
Eliminations by following the algorithms to work out the
exercises of the textbook.
A question from some students

By the way, the alternative method shown previously is


still Gauss-Jordan Elimination if we change the setting of
our system.
2x43 + 4x
4x 2x34 + 2x5 = 8
x1 + 2x2 + 5x
4x43 + 4x
5x34 + 3x5 = −9
−2x1 − 4x2 − 4x
5x34 − 5x
4x43 + 3x5 = 6.
x1 x2 x4 x3 x5
0 0 4 2 2 8 1 2 0 1.5 0 −17
Gauss-Jordan
1 2 5 4 3 −9 0 0 1 0.5 0 4
Elimination
−2 −4 −4 −5 3 6 0 0 0 0 1 −4
No solution (Remark 1.4.8.1)

A linear system is inconsistent, i.e. has no solution, if the


last column of a row-echelon form of the augmented
matrix is a pivot column.
For example, if the
0 ⊗ * ··· ··· ··· * augmented matrix of
0 0 ⊗ * ··· ··· * a linear system has
⁞ ⁞ a row-echelon form
0 ··· ··· 0 ⊗ * *
3 2 3 4
0 ··· ··· ··· ··· 0 ⊗ nonzero
0 0 1 1 ,
0 ··· ··· ··· ··· ··· 0
0 0 0 2
then the system is
inconsistent.
One solution (Remark 1.4.8.2)

A consistent linear system has only one solution if except


the last column, every column of a row-echelon form of
the augmented matrix is a pivot column.

⊗ * ··· ··· * For example, if the augmented


0 ⊗ * ··· * matrix of a linear system has a
⁞ ⁞ row-echelon form
0 ··· 0 ⊗ * 1 2 3 4
0 ··· ··· ··· 0 0 2 0 1 ,
0 0 −1 2
then the system has only one
solution.
Infinitely many solutions (Remark 1.4.8.3)

A consistent linear system has infinitely many solutions if


apart from the last column, a row-echelon form of the
augmented matrix has at least one more non-pivot
column.
For example, if the
augmented matrix of a
0 ⊗ * ··· ··· ··· ··· ··· *
linear system has a row-
0 0 ⊗ * ··· ··· ··· ··· *
echelon form
⁞ ⁞
0 ··· ··· ··· ··· 0 ⊗ * * 5 1 2 3 4
0 ··· ··· ··· ··· ··· ··· ··· 0 0 0 −1 0 1 ,
0 0 0 1 2
then the system has
non-pivot columns infinitely many solutions.
Notation (Notation 1.4.9)

When doing elementary row operations, we adopt the


following notation:
1. The symbol cRi , where c is a nonzero real number,
means
“multiply the i th row by the constant c”.
2. The symbol Ri ↔ Rj means
“interchange the i th and the j th rows”.
3. The symbol Ri + cRj , where c is a real number,
means
“add c times of the j th row to the i th row”.
Examples (Example 1.4.10.1)

Find the condition on a, b and c x + 2y − 3z = a


so that the linear system has at
2x + 6y − 11z = b
least one solution:
x − 2y + 7z = c.

1 2 −3 a 1 2 −3 a
R2 − 2R1
2 6 −11 b 0 2 −5 b − 2a
R3 − R1
1 −2 7 c 0 −2
1 −4 10
7 c−
ca

1 2 −3 a
R3 + 2R2
0 2 −5 b − 2a
0 0 0 2b + c − 5a
Examples (Example 1.4.10.1)

1 2 −3 a
0 2 −5 b − 2a
0 0 0 2b + c − 5a

The system has either no solution or infinitely many


solutions.
It has (infinitely many) solutions if 2b + c − 5a = 0.
Examples (Example 1.4.10.2)

Determine the values of b so that the linear system


x + 2y + z = 1
2x + by + 2z = 2
4x + 8y + b2z = 2b.

has (a) no solution,


(b) a unique solution, and
(c) infinitely many solutions.
Examples (Example 1.4.10.2)

1 2 1 1 1 2 1 1
R2 − 2R1
2 b 2 2 0 b−4 0 0
R3 − 4R1
4 8 b2 2b 0 0 b2 − 4 2b − 4
(a) The system has no solution
if b2 − 4 = 0 and 2b − 4 ≠ 0; i.e. b = −2.
(b) The system has a unique solution
if b − 4 ≠ 0 and b2 − 4 ≠ 0; i.e. b ≠ 4 and b ≠ ±2.
(c) The system has infinitely many solutions if
(i) b − 4 = 0 or (ii) b2 − 4 = 0 and 2b − 4 = 0;
i.e. b = 4 or b = 2.
Examples (Example 1.4.10.3)

Determine the values of a and b so that the linear


system
ax + y =a
x+y+ z =1
y + az = b.
has (a) no solution, (b) a unique solution, and
(c) infinitely many solutions.

In doing elementary row operations,


1
(i) you cannot multiply a row by 0 or 0 ; and
(ii) you cannot add 1 times of a row to another row.
0
Examples (Example 1.4.10.3)

1
a 1 0 a Can we add − a times of the 1st row
1 1 1 1 to the 2nd row?
0 1 a b We cannot do it if a = 0.
Case 1: a = 0.
0 1 0 0 1 1 1 1 1 1 1 1
R1 ↔ R2 R3 − R2
1 1 1 1 0 1 0 0 0 1 0 0
0 1 0 b 0 1 0 b 0 0 0 b
Under the assumption that a = 0,
the system has no solution if b ≠ 0; and
the system has infinitely many solutions if b = 0.
Examples (Example 1.4.10.3)

Case 2: a ≠ 0. a
Can we add − a − 1
a 1 0 a 1 a 1 0 a
R2 − a R1 a−1 times of the 2nd row
1 1 1 1 0 a 1 0 to the 3rd row?
0 1 a b 0 1 a b We cannot do it if
a = 1.
Case 2a: a = 1.
1 1 0 1 1 1 0 1
R2 ↔ R3
0 0 1 0 0 1 1 b
0 1 1 b 0 0 1 0
Under the assumption that a = 1,
the system has a unique solution.
Examples (Example 1.4.10.3)

nonzero
Case 2b: a ≠ 0 and a ≠ 1.
a 1 0 a a
a 1 0 a
a−1 R3 − a − 1 R2 a−1
0 a 1 0 0 a 1 0
a2 − 2a
0 1 a b 0 0 b
a−1
Under the assumption that a ≠ 0 and a ≠ 1,
a2 − 2a
the system has no solution if a − 1 = 0 and b ≠ 0,
i.e. a = 2 and b ≠ 0.
a2 − 2a
the system has a unique solution if a − 1 ≠ 0,
i.e. a ≠ 2.
a2 − 2a
the system has infinitely many solutions if a − 1 = 0
and b = 0, i.e. a = 2 and b = 0.
Examples (Example 1.4.10.3)

The system can be


(a) The system has no solution solved easily if we
if (Case 1) a = 0 and b ≠ 0 rearrange the rows
or (Case 2b) a = 2 and b ≠ 0; in a suitable order.
i.e. b ≠ 0 and a = 0 or 2. See the remark at
the end of Example
(b) The system has a unique solution 1.4.10.3.
if (Case 2a) a = 1,
or (Case 2b) a ≠ 0 and a ≠ 1 and a ≠ 2;
i.e. a ≠ 0 and a ≠ 2.
(c) The system has infinitely many solutions if
if (Case 1) a = 0 and b = 0
or (Case 2b) a = 2 and b = 0;
i.e. b = 0 and a = 0 or 2.
A question from some students
Some students think that by doing this row
operation, they can avoid dividing a row by 0.

a 1 0 a a 1 0 a
Change R2
1 1 1 1 0 a−1 a 0
to aR2 − R1
0 1 a b 0 1 a b
This row operation is equivalent to the sequence
of elementary operations shown below:
aR2 a 1 0 a a 1 0 a
R2 − R1
What will happen a a a a 0 a−1 a 0
if a = 0? 0 1 a b 0 1 a b
The information of the second equation, x + y + z = 1, is
completely wiped out when a = 0.
Examples (Example 1.4.10.4)

Given a cubic curve with equation


y = a + bx + cx2 + dx3,
where a, b, c, d are real constants, that passes through
the points (0, 10), (1, 7), (3, −11) and (4, −14),
find a, b, c, d.
By substituting (x, y) = (0, 10), (1, 7), (3, −11) and
(4, −14) into the equation of the cubic curve, we obtain
a = 10
a+ b+ c+ d = 7
a + 3b + 9c + 27d = −11
a + 4b + 16c + 64d = −14.
Examples (Example 1.4.10.4)

1 0 0 0 10 1 0 0 0 10
R2 − R1
1 1 1 1 7 0 1 1 1 −3
R3 − R1
1 3 9 27 −11 R4 − R1 0 3 9 27 −21
1 4 16 64 −14 0 4 16 64 −24

1 0 0 0 10 1 0 0 0 10
R3 − 3R2 0 1 1 1 −3 R4 − 2R3 0 1 1 1 −3
R4 − 4R2 0 0 6 24 −12 0 0 6 24 −12
0 0 12 60 −12 0 0 0 12 12
Examples (Example 1.4.10.4)

1 0 0 0 10 1 0 0 0 10
1
0 1 1 1 −3 R 0 1 1 1 −3
6 3
0 0 6 24 −12 1
R 0 0 1 4 −2
12 4
0 0 0 12 12 0 0 0 1 1

1 0 0 0 10 1 0 0 0 10
R2 − R4 0 1 1 0 −4 R2 − R3 0 1 0 0 2
R3 − 4R4 0 0 1 0 −6 0 0 1 0 −6
0 0 0 1 1 0 0 0 1 1

So a = 10, b = 2, c = −6 and d = 1.
The equation of the cubic curve is y = 10 + 2x − 6x2 + x3.
Geometrical interpretation (Discussion 1.4.11)

Consider a system of linear equations in variables x, y


and z:
a1x + b1y + c1z = d1
a2x + b2y + c2z = d2
⁞ ⁞
amx + bmy + cmz = dm

a1 b1 c1 d1 A row echelon
form
a2 b2 c2 d2 Gaussian
R
⁞ ⁞ ⁞ ⁞ Elimination
am bm cm dm
Geometrical interpretation (Discussion 1.4.11)

If the last non-zero row of R is of the form ( 0 0 0 * )


where * is a nonzero number, then the system is
inconsistent, i.e. there is no solution.
Suppose the system is consistent:
R has at most 3 non-zero rows.
row-echelon form general solution solution set in
R xyz-space
3 non-zero rows 0 arbitrary parameter a point
2 non-zero rows 1 arbitrary parameter a line
1 non-zero row 2 arbitrary parameters a plane
0 non-zero row 3 arbitrary parameters the whole space
(Read Discussion 1.4.11 and Example 1.4.12 for more details.)
Chapter 1 Linear Systems and Gaussian Elimination

Section 1.5
Homogeneous Linear Systems
Homogeneous linear systems (Definition 1.5.1)

A system of linear equations is said to be homogeneous if


it has the form:
a11x1 + a12x2 + ··· + a1nxn = 0
a21x1 + a22x2 + ··· + a2nxn = 0
⁞ ⁞
am1x1 + am2x2 + ··· + amnxn = 0
where a11, a12, …, amn are real constants.
Note that x1 = 0, x2 = 0, ..., xn = 0 is always a solution
to the homogeneous system and it is called the trivial
solution.
Any solution other than the trivial solution is called a non-
trivial solution.
An example (Example 1.5.2)

Given a quadric surface with equation


ax2 + by2 + cz2 = d,
where a, b, c, d are real constants, that passes through
the points (1, 1, −1), (1, 3, 3) and (−2, 0, 2),
find a formula for the quadric surface.
By substituting (x, y, z) = (1, 1, −1), (1, 3, 3) and
(−2, 0, 2) into the equation of the quadric surface, we
obtain
a + b + c −d = 0
a + 9b + 9c − d = 0
4a + 4c − d = 0.
An example (Example 1.5.2)

1 1 1 −1 0 1 0 0 −1 0
Gauss-Jordan
1 9 9 −1 0 0 1 0 −3/4 0
Elimination
4 0 4 −1 0 0 0 1 3/4 0

There are infinitely many solutions:


a =t
3
b = 4t
3 where t is an arbitrary parameter.
c = −4t
d =t
An example (Example 1.5.2)

a =t
3
b = 4t
3 where t is an arbitrary parameter.
c = −4t
d =t
Any one of the nontrivial solutions gives us a formula for
the quadric surface.
For example,
3 2 3 2
x2 + 4y − 4z =1 and 4x2 + 3y2 − 3z2 = 4
are two formulae which represent the same quadric
surface.
Geometrical interpretation (Discussion 1.5.3.1)

In the xy-plane, the two equations in the system


a1x + b1y = 0 (L1)
a2x + b2y = 0, (L2)
where a1, b1 are not both zero and a2, b2 are not both
zero, represents two straight lines through the origin (i.e.
the point (0, 0)).
y
(a) The system has only one
solution if and only if L1 and L1 L2
L2 are not parallel lines.
x
Geometrical interpretation (Discussion 1.5.3.1)

a1x + b1y = 0 (L1)


a2x + b2y = 0, (L2)

(b) The system has infinitely many solutions if and only if


L1 and L2 are the same line.
y
L1
L2

x
Geometrical interpretation (Discussion 1.5.3.2)

In the xyz-space, the two equations in the system


a1x + b1y + c1z = 0 (P1)
a2x + b2y + c2z = 0, (P2)
where a1, b1, c1 are not all zero and a2, b2, c2 are not all
zero, represents two planes containing the origin.
The system has infinitely many solutions:
z z
P1
P1

y y
P2
x P2
x
Solutions of homogenous system (Remark 1.5.4)

1. A homogeneous system of linear equations has either


only the trivial solution or infinitely many solutions in
addition to the trivial solution.
2. A homogeneous system of linear equations with more
unknowns than equations has infinitely many
solutions.

You might also like