Professional Documents
Culture Documents
Textbook:
W. Keith Nicholson (2019), Linear Algebra with Applications,
Lyrix with Open Texts
Gilbert Strang (2016) Introduction to Linear Algebra, Wellesley -
Cambridge Press, 5th edition
Grade:
▶ Test in class (10%)
▶ Homework (10%) need to be submitted on blackboard after each
session and before the next section.
▶ Attendance (10%) is taken randomly each session
▶ Midterm exam (30%)
▶ Final exam (40%)
Test, midterm exam and final exam are written examination
Systems of linear equations lie at the heart of linear algebra, and this
chapter uses them to introduce some of the central concepts of linear
algebra in a simple and concrete setting
1 Gaussian Elimination method to solve system of linear equations
chemical reaction
Table of contents
1 Solutions and Elementary Operations
System of Linear Equation
Elementary Operations
2 Gaussian Elimination
Row Reduction and Echelon Forms
Solution of Linear Systems
Gaussian Elimination Method
Rank of Matrix and Consistency of Linear System
3 Homogeneous System of Equations
Homogeneous System
Linear combination, general solution and basis solution
4 An Application to Network Flow
5 An Application to Chemical Reactions
ax + by = c
is a straight line (if a and b are not both zero), so such an equation is
called a linear equation in the variables x and y
Linear equations
An equation of form
a1 x1 + a2 x2 + · · · + an xn = b
Linear equations
An equation of form
a1 x1 + a2 x2 + · · · + an xn = b
2∗1−1=1
2 ∗ 2 − 5 ̸= 1
System of Linear Equations 8 / 81
Solutions and Elementary Operations System of Linear Equation
Definition
A finite collection of linear equations in the variables x1 , x2 , ..., xn is
called a system of linear equations in these variables
Definition
A finite collection of linear equations in the variables x1 , x2 , ..., xn is
called a system of linear equations in these variables
A sequence of numbers is called a solution to a system of
equations if it is a solution to every equation in the system.
Definition
A finite collection of linear equations in the variables x1 , x2 , ..., xn is
called a system of linear equations in these variables
A sequence of numbers is called a solution to a system of
equations if it is a solution to every equation in the system.
Example
(x = −2, y = 5, z = 0) and (x = 0, y = 4, z = −1) are both solutions to
the system
(
x+y+ z =3
2x + y + 3z = 1
System of ax + by = c
System of ax + by + cz = d
Consistent vs Inconsistent
Example
Example
For arbitrary values of s and t,
x1 = t − s + 1
x2 = t + s + 2
x3 = s
x4 = t
Example
For arbitrary values of s and t,
x1 = t − s + 1
x2 = t + s + 2
x3 = s
x4 = t
Example
Example
x=s
y = 3s + 2t − 6
z=t
Algebraic method
Two systems are said to be equivalent if they have the same set of
solutions.
A system is solved by writing a series of systems, one after the
other, each equivalent to the previous system.
Each of these systems has the same set of solutions as the original
one; the aim is to end up with a system that is easy to solve.
Each system in the series is obtained from the preceding system by a
simple manipulation chosen so that it does not change the set of
solutions.
x + 2y + 3z = 6 (1)
2x − 3y + 2z = 14 (2)
3x + y − z = −2 (3)
−7y − 4z = 2 (4)
−5y − 10z = −20 (5)
Divide Eq (5) by -5
−7y − 4z = 2 (6)
y + 2z = 4 (7)
Interchanging equations
y + 2z = 4 (8)
−7y − 4z = 2 (9)
10z = 30 or z = 3
x + 2y + 3z = 6 (10)
y + 2z = 4 (11)
z=3 (12)
Example
Solve
Solution
Solution
Solution
Elementary operations
Example
3x + 4y + z = 1
2x + 3y = 0
4x + 3y − z = −2
Solution
Reduction the augmented matrix
3 4 1 1 1 32 0 0
r1 ↔r2
2 3 0 0 −
− − −→ 3 4 1 1 create a 1 in the upper left corner
1
r
4 3 −1 −2 2 2 4 3 −1 −2
1 23 0 0
r3 −4r1
−−−−→ 0 − 12 1 1 creat zeros in other position in col 1
r2 −3r1
0 −3 −1 −2
1 32 0 0
−−−→ 0 1 −2 −2 creat 1 leading row 2
−2r2
0 −3 −1 −2
1 32 0 0
r3 +3r2
−−−−→ 0 1 −2 −2 creat zero in position below 1 leading in col 2
0 0 −7 −8
Table of contents
1 Solutions and Elementary Operations
System of Linear Equation
Elementary Operations
2 Gaussian Elimination
Row Reduction and Echelon Forms
Solution of Linear Systems
Gaussian Elimination Method
Rank of Matrix and Consistency of Linear System
3 Homogeneous System of Equations
Homogeneous System
Linear combination, general solution and basis solution
4 An Application to Network Flow
5 An Application to Chemical Reactions
Row-Echelon Form
The leading 1s proceed “down and to the right” through the matrix. All
entries below and to the left of them are zero.
Example
to
1 row - echelon form
2 reduced row - echelon form
Example
3x + y − 4z = −1
x + 10z = 5
4x + y + 6z = 1
Solution
Augmented matrix
3 1 −4 −1 1 0 10 5
create first leading 1
1 0 10 5 −−−−−−−−−−−−→ 3 1 −4 −1
r1 ↔r2
4 1 6 1 4 1 6 1
1 0 10 5 1 0 10 5
r3 −4r1
−−−−→ 0 1 −34 −16 −−−−→ 0 1 −34 −16
r2 −3r1 r3 −r2
0 1 −34 −19 0 0 0 −3
Solution
Augmented matrix
3 1 −4 −1 1 0 10 5
create first leading 1
1 0 10 5 −−−−−−−−−−−−→ 3 1 −4 −1
r1 ↔r2
4 1 6 1 4 1 6 1
1 0 10 5 1 0 10 5
r3 −4r1
−−−−→ 0 1 −34 −16 −−−−→ 0 1 −34 −16
r2 −3r1 r3 −r2
0 1 −34 −19 0 0 0 −3
is equivalent to the original system. The last system has no solution hence
the origin system has no solution.
System of Linear Equations 40 / 81
Gaussian Elimination Row Reduction and Echelon Forms
Example
Solution
The augmented matrix
1 −2 −1 3 1 1 −2 −1 3 1
r −r1
2 −4 1 0 5 −−3−−→ 0 0 3 −6 3
r2 −2r1
1 −2 2 −3 4 0 0 3 −6 3
1 −2 −1 3 1 1 −2 0 1 2
r3 −r2
−−−−→ 0 0 1 −2 1 −−−−→ 0 0 1 −2 1
1
r r1 +r 2
3 2 0 0 0 0 0 0 0 0 0 0
Solution
The augmented matrix
1 −2 −1 3 1 1 −2 −1 3 1
r −r1
2 −4 1 0 5 −−3−−→ 0 0 3 −6 3
r2 −2r1
1 −2 2 −3 4 0 0 3 −6 3
1 −2 −1 3 1 1 −2 0 1 2
r3 −r2
−−−−→ 0 0 1 −2 1 −−−−→ 0 0 1 −2 1
1
r r1 +r 2
3 2 0 0 0 0 0 0 0 0 0 0
Solve for the leading variables in terms of the nonleading variables x2 and
x4
x − 2x2
1
+ x4 =2
x3 − 2x4 =1
0=0
Set x2 = s, x4 = t then
x1 − 2s + t = 2 and x3 − 2t = 1
x1 = 2 + 2s − t
x2 = s
x3 = 2t + 1
x4 = t
Gaussian Elimination
Example
x1 + 3x2 + x3 = a
−x1 − 2x2 + x3 = b
3x1 + 7x2 − x3 = c
Solution
Augmented matrix
1 3 1 a 1 3 1 a
r3 −3r1
−1 −2 1 b −−−−→ 0 1 2 a+b
r2 +r1
3 7 −1 c 0 −2 −4 c − 3a
1 3 1 a 1 0 −5 −2a − 3b
−−−−→ 0 1 2 a + b −−−−→ 0 1 2 a+b
r3 +2r2 r1 −3r2
0 0 0 −a + 2b + c 0 0 0 −a + 2b + c
1 If −a + 2b + c ̸= 0, there is no solution
2 If −a + 2b + c = 0, the system is consistent. The lastest matrix
become
1 0 −5 −2a − 3b
0 1 2 a+b
0 0 0 0
Set x3 = t then the general solution is
x1 = 5t − (2a + 3b), x2 = (a + b) − 2t, x3 = t
System of Linear Equations 48 / 81
Gaussian Elimination Rank of Matrix and Consistency of Linear System
Rank of a Matrix
Rank of a Matrix
Example
Three possibilities
h i
1 No solution (inconsistent) when a row 0 0 0 · · · 0 1 occurs.
2 Unique solution when every variable is a leading variable.
3 Infinitely many solutions when the system is consistent and there
is at least one nonleading variable
Three possibilities
h i
1 No solution (inconsistent) when a row 0 0 0 · · · 0 1 occurs.
2 Unique solution when every variable is a leading variable.
3 Infinitely many solutions when the system is consistent and there
is at least one nonleading variable
Theorem
Let Ax h= b bei a system of linear equation with n variables and augmented
matrix A b then
h i
1 rank( A b ) is either rank(A) or rank(A) + 1
h i
2 The system is consistent if rank( A b ) = rank(A) = r
▶ if r = n, the system has unique solution
▶ if r < n, the system has infinite many solution
h i
3 The system is inconsistent if rank( A b ) = rank(A) + 1
Example
Find the conditions on a, b such that the system has no solution, one
solution, and infinitely many solutions
x − 2y = 1
ax + by = 5
Solution
" # " #
1 −2 1
We have coefficient matrix A = , constant matrix b = and
a b 5
" #
h 1 2 1
i
the augmented matrix A b = .
a b 5
Need to carry the augmented matrix to a reduced row-echelon matrix
Solution (cont)
We have this system has m = 2 linear equation with n = 2
" #
h i 1 −2 1
A b −−−−→
r2 −ar1 0 b + 2a 5 − a
" #
1 −2
A has a same reduced echolon form as . Hence
0 b + 2a
" #!
1 −2
rank(A) = rank
0 b + 2a
h i
Reduced echolon form of both A and A b has at least one 1 leading
and no more
h thani two 1’s leading. So 1 ≤ rank(A) ≤ 2 and
1 ≤ rank( A b ) ≤ 2.
h i
The system has no solution if rank(A) < rank( A b ). It happens
h i
when rank(A) = 1 and rank( A b ) = 2. It is equivalent to
b + 2a = 0 and 5 − a ̸= 0.
System of Linear Equations 53 / 81
Gaussian Elimination Rank of Matrix and Consistency of Linear System
Solution (cont)
Exercise
Find the conditions on a, b and c such that the system has no solution,
one solution, and infinitely many solutions
3x + y − z = a
x − y + 2z = b
5x + 3y − 4z = c
Practice
Three Nissans, two Fords, and four Chevrolets can be rented for $106 per
day. At the same rates two Nissans, four Fords, and three Chevrolets cost
$107 per day, whereas four Nissans, three Fords, and two Chevrolets cost
$102 per day. Find the rental rates for all three kinds of cars.
Practice
A school has three clubs and each student is required to belong to exactly
one club. One year the students switched club membership as follows:
ClubA. 40% remain in A, 10% switch to B, 5% switch to C
Club B. 70% remain in B, 20% switch to A, 10% switch to C.
Club C. 60% remain in C, 20% switch to A, 20% switch to B.
If the fraction of the student population in each club is unchanged, find
each of these fractions.
Table of contents
1 Solutions and Elementary Operations
System of Linear Equation
Elementary Operations
2 Gaussian Elimination
Row Reduction and Echelon Forms
Solution of Linear Systems
Gaussian Elimination Method
Rank of Matrix and Consistency of Linear System
3 Homogeneous System of Equations
Homogeneous System
Linear combination, general solution and basis solution
4 An Application to Network Flow
5 An Application to Chemical Reactions
Definition
A system of equations in the variables x1 , x2 , ..., xn is called homogeneous
if all the constant terms are zero that is, if each equation of the system
has the form
a1 x1 + a2 x2 + · · · + an xn = 0
trivial solution: x1 = 0, x2 = 0, . . . , , xn = 0
Any solution in which at least one variable has a nonzero value is called a
nontrivial solution
Definition
A system of equations in the variables x1 , x2 , ..., xn is called homogeneous
if all the constant terms are zero that is, if each equation of the system
has the form
a1 x1 + a2 x2 + · · · + an xn = 0
trivial solution: x1 = 0, x2 = 0, . . . , , xn = 0
Any solution in which at least one variable has a nonzero value is called a
nontrivial solution
A homogeneous system has either uniques (trivial) solution or infinitely
may solution
Example
Show that the following homogeneous system has nontrivial solutions.
x − x2 + 2x3 − x4 = 0
1
2x + 2x
1 2 4 +x =0
3x + x + 2x − x = 0
1 2 3 4
Solution
The reduction of augmented matrix to reduced row- echelon form
1 −1 2 −1 0 1 −1 2 −1 0
r3 −3r1
2 2 0 1 0 −−−−→ 0 4 −4 3 0
r2 −2r1
3 1 2 −1 0 0 4 −4 2 0
1 −1 2 −1 0 1 0 1 14 0
r3 −r2 −r3
−−−−→ 0 1 −1 4 0 −−−−→ 0 1 −1 34 0
3
1
r r1 +r2
4 2
0 0 0 −1 0 0 0 0 1 0
Solution (cont)
r2 − 34 r3
1 0 1 0 0
−−−−− → 0 1 −1 0 0
r1 − 14 r3
0 0 0 1 0
Solution (cont)
r2 − 34 r3
1 0 1 0 0
−−−−− → 0 1 −1 0 0
r1 − 14 r3
0 0 0 1 0
Equality of rows/columns
As for rows, two columns are regarded as equal if they have the same
number of entries and corresponding entries are the same
Linear combination
A sum of scalar multiples of several columns is called a linear combination
of these columns.
same idea for rows
Example
For example, sx + ty is a linear combination of x and y for any choice of
numbers s and t.
Example
" # " # " # " # " #
1 −1 2 −3 −1
x= and y = then 2x + 3y = + =
3 1 6 3 9
Example
h i h i h i h i
Let x = 1 0 1 , y = 2 1 0 and z = 3 1 1 . If v = 0 −1 2
h i
and w = 1 1 1 , determine whether v and w are linear combination of
x, y, z.
Example
h i h i h i h i
Let x = 1 0 1 , y = 2 1 0 and z = 3 1 1 . If v = 0 −1 2
h i
and w = 1 1 1 , determine whether v and w are linear combination of
x, y, z.
Solution
For v, we need to determine whether there exists number r, s, t such that
v = rx + sy + tz, that is
h i h i h i h i
0 −1 2 = r 1 0 1 + s 2 1 0 + t 3 1 1
r + 2s + 3t = 0
s + t = −1
r+t=2
System of Linear Equations 64 / 81
Homogeneous System of Equations Linear combination, general solution and basis solution
Linear combination is one of the best ways to describe the general solution
of homogeneous system of linear equations
Convention
Any nonzero scalar multiple of a basic solution will still be called a basic
solution
Theorem
Let A be an m × n matrix of rank r, and consider the homogeneous
system in n variables with A as coefficient matrix. Then:
1 The system has exactly n − r basic solutions, one for each parameter.
2 Every solution is a linear combination of these basic solutions.
Example
−3 9 2 6 −8
Solution
The reduction of the augmented matrix to reduced row-echelon form is
1 −3 0 2 2 0 1 −3 0 2 2 0
−2 6 1 2 −5 0
0 0 1 6 −1 0
3 −9 −1 0 7 0 0 0 0 0 0 0
−3 9 2 6 −8 0 0 0 0 0 0 0
Solution (cont)
Exercise
Find a set of basic solutions and express the general solution as a linear
combination of these basic solutions.
x1 + x2 − x3 + 2x4 + x5 = 0
x1 + 2x2 − x3 + x4 + x5 = 0
2x1 + 3x2 − x3 + 2x5 + x5 = 0
Table of contents
1 Solutions and Elementary Operations
System of Linear Equation
Elementary Operations
2 Gaussian Elimination
Row Reduction and Echelon Forms
Solution of Linear Systems
Gaussian Elimination Method
Rank of Matrix and Consistency of Linear System
3 Homogeneous System of Equations
Homogeneous System
Linear combination, general solution and basis solution
4 An Application to Network Flow
5 An Application to Chemical Reactions
Example
A network of one-way streets is shown in the accompanying diagram. The
rate of flow of cars into intersection A is 500 cars per hour, and 400 and
100 cars per hour emerge from B and C, respectively. Find the possible
flows along each street.
Solution
Equating the flow in with the flow out at each intersection, we get
f1 + f2 + f3 = 500
f1 + f4 + f6 = 400
f3 + f5 − f6 = 100
f2 − f4 − f5 = 0
0 1 0 −1 −1 0 0 0 0 0 −1 −1 0 0
Use f4 , f5 , f6 as parameters, the general solution is
f1 = 400 − f4 − f6 , f2 = f4 + f5 , f3 = 100 − f5 + f6
System of Linear Equations 76 / 81
An Application to Network Flow
All possible flows are solutions of the system of equation which satisfy the
constraints on flows
f1 ≥ 0, f3 ≥ 0, f4 + f6 ≤ 400, f5 − f6 ≤ 100
Table of contents
1 Solutions and Elementary Operations
System of Linear Equation
Elementary Operations
2 Gaussian Elimination
Row Reduction and Echelon Forms
Solution of Linear Systems
Gaussian Elimination Method
Rank of Matrix and Consistency of Linear System
3 Homogeneous System of Equations
Homogeneous System
Linear combination, general solution and basis solution
4 An Application to Network Flow
5 An Application to Chemical Reactions
H2 + O2 → H2 O
Individual atoms are neither created nor destroyed, so the number of
hydrogen and oxygen atoms going into the reaction must equal the
number coming out (in the form of water)
2H2 + O2 → 2H2 O
2H2 + O2 → 2H2 O
Exercise
C8 H18 + O2 → CO2 + H2 O