You are on page 1of 99

System of Linear Equations

System of Linear Equations 1 / 81


Course Overview

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

System of Linear Equations 2 / 81


Course Objectives

1 The course provides the student with basic knowledges in linear


algebra with introduction to applications to cryptography, computer
graphics, image compression . . . , in particular the skill of solving
linear systems of equations using Gauss elimination method.
2 Content
▶ System of linear equations
▶ Matrices,operation
▶ Determinant, diagonalization
▶ Vector space, spanning space, independence and dimension
▶ Linear transformation
▶ Orthogonalization

System of Linear Equations 3 / 81


Chapter Goals

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

2 Introduction to Rank of a matrix via the row-echelon form and

relationship between rank of matrix with consistency/inconsistency of


a linear system
3 Homogeneous system of linear equations

4 Represent general solutions to a homogeneous system of linear

equations as linear combinations of basis solutions - as an introduction


to fundamental concepts of linear combination and spaning
5 Introduce an application of linear system in network flow and

chemical reaction

System of Linear Equations 4 / 81


Solutions and Elementary Operations

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

System of Linear Equations 5 / 81


Solutions and Elementary Operations System of Linear Equation

Linear equation of two variables


Graph of equation of form

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

System of Linear Equations 6 / 81


Solutions and Elementary Operations System of Linear Equation

Linear equations
An equation of form

a1 x1 + a2 x2 + · · · + an xn = b

is called a linear equation in the n variables x1 , x2 , ..., xn


a1 , a2 , . . . , an : coefficients of x1 , x2 , . . . , xn
b : constant term
Each variable in a linear equation occurs to the first power only.

System of Linear Equations 7 / 81


Solutions and Elementary Operations System of Linear Equation

Linear equations
An equation of form

a1 x1 + a2 x2 + · · · + an xn = b

is called a linear equation in the n variables x1 , x2 , ..., xn


a1 , a2 , . . . , an : coefficients of x1 , x2 , . . . , xn
b : constant term
Each variable in a linear equation occurs to the first power only.
Example
2x1 − 3x2 + 5x3 = 7
is a linear equation; the coefficients of x1 , x2 , and x3 are 2, −3, and 5,
and the constant term is 7

System of Linear Equations 7 / 81


Solutions and Elementary Operations System of Linear Equation

Solution of a linear equation


Given a linear equation
a1 x1 + a2 x2 + · · · + an xn = b
a sequence (s1 , s2 , . . . , sn ) is a solution of the equation if
a1 s1 + a2 s2 + · · · + an sn = b
that is, if the equation is satisfied when the substitutions
x1 = s1 , x2 = s2 , ..., xn = sn are made.

System of Linear Equations 8 / 81


Solutions and Elementary Operations System of Linear Equation

Solution of a linear equation


Given a linear equation
a1 x1 + a2 x2 + · · · + an xn = b
a sequence (s1 , s2 , . . . , sn ) is a solution of the equation if
a1 s1 + a2 s2 + · · · + an sn = b
that is, if the equation is satisfied when the substitutions
x1 = s1 , x2 = s2 , ..., xn = sn are made.
Example
Consider the equation 2x − y = 1
(1, 1) is a solution of this equation because

2∗1−1=1

(2, 5) is not a solution of the equation because

2 ∗ 2 − 5 ̸= 1
System of Linear Equations 8 / 81
Solutions and Elementary Operations System of Linear Equation

System of linear equations

Definition
A finite collection of linear equations in the variables x1 , x2 , ..., xn is
called a system of linear equations in these variables

System of Linear Equations 9 / 81


Solutions and Elementary Operations System of Linear Equation

System of linear equations

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.

System of Linear Equations 9 / 81


Solutions and Elementary Operations System of Linear Equation

System of linear equations

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 Linear Equations 9 / 81


Solutions and Elementary Operations System of Linear Equation

System of ax + by = c

System of Linear Equations 10 / 81


Solutions and Elementary Operations System of Linear Equation

System of ax + by + cz = d

System of Linear Equations 11 / 81


Solutions and Elementary Operations System of Linear Equation

Consistent vs Inconsistent

A system that has no solution is called inconsistent


A system with at least one solution is called consistent.
▶ unique solution
▶ infinitely many solutions

System of Linear Equations 12 / 81


Solutions and Elementary Operations System of Linear Equation

Example

The system equation (


x + 2y = 1
x + 2y = 3
has no solution =⇒ inconsistent

System of Linear Equations 13 / 81


Solutions and Elementary Operations System of Linear Equation

Example
For arbitrary values of s and t,

x1 = t − s + 1
x2 = t + s + 2
x3 = s
x4 = t

is a solution to the system


(
x1 − 2x2 + 3x3 + x4 = −3
2x1 − x2 + 3x3 − x4 = 0

=⇒ has infinitely many solution =⇒ consistent

System of Linear Equations 14 / 81


Solutions and Elementary Operations System of Linear Equation

Example
For arbitrary values of s and t,

x1 = t − s + 1
x2 = t + s + 2
x3 = s
x4 = t

is a solution to the system


(
x1 − 2x2 + 3x3 + x4 = −3
2x1 − x2 + 3x3 − x4 = 0

=⇒ has infinitely many solution =⇒ consistent


The quantities s and t in are called parameters, and the set of solutions ,
described in this way, that is (t − s + 1, t + s + 2, s, t) , is said to be given
in parametric form and is called the general solution to the system.
System of Linear Equations 14 / 81
Solutions and Elementary Operations System of Linear Equation

Example

Describe all solutions to 3x − y + 2z = 6 in parametric form.

System of Linear Equations 15 / 81


Solutions and Elementary Operations System of Linear Equation

Example

Describe all solutions to 3x − y + 2z = 6 in parametric form.


Solution
Solving the equation for y in terms of x and z, we get y = 3x + 2z − 6. If
s and t are arbitrary then, setting x = s, z = t, we get solutions

x=s
y = 3s + 2t − 6
z=t

where s and t are arbitrary

System of Linear Equations 15 / 81


Solutions and Elementary Operations System of Linear Equation

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.

System of Linear Equations 16 / 81


Solutions and Elementary Operations System of Linear Equation

Solve system of linear equation with eliminating


Consider the system

x + 2y + 3z = 6 (1)
2x − 3y + 2z = 14 (2)
3x + y − z = −2 (3)

To eliminate x in Eq (2)-(3), we take Eq (2) - 2Eq (1) and Eq (3) - 3Eq


(1) and obtain a system of 2 variables y and z

−7y − 4z = 2 (4)
−5y − 10z = −20 (5)

Divide Eq (5) by -5

−7y − 4z = 2 (6)
y + 2z = 4 (7)

System of Linear Equations 17 / 81


Solutions and Elementary Operations System of Linear Equation

Interchanging equations

y + 2z = 4 (8)
−7y − 4z = 2 (9)

Eliminate y in Eq (9 ) by Eq (8) + 7Eq (9)

10z = 30 or z = 3

After eliminating process, we obtain

x + 2y + 3z = 6 (10)
y + 2z = 4 (11)
z=3 (12)

Substitute z = 3 to Eq (11) to get y = −2 and then substitute value of y


and z to Eq (11) to obtain x = 1. Back substitution procedure
Hence the solution is (x, y, z) = (1, −2, 3).
System of Linear Equations 18 / 81
Solutions and Elementary Operations System of Linear Equation

Name of variables does not matter

Repeat all the above steps to solve the system equations




 x + 2x2 + 3x3 = 6
 1
2x − 3x + 2x = 14
1 2 3

3x + x − x = −2

1 2 3

We only need to replace x, y, z by x1 , x2 , x3 and keep the same


coefficients and constant terms in the eliminating process.

System of Linear Equations 19 / 81


Solutions and Elementary Operations System of Linear Equation

Simplify Computation of Algebraic Method With Matrix


A rectangular array of numbers is called a matrix

In augmented matrix, each row of the matrix consists of the


coefficients of the variables (in order) from the corresponding equation,
together with the constant term
System of Linear Equations 20 / 81
Solutions and Elementary Operations Elementary Operations

Example

Solve

System of Linear Equations 21 / 81


Solutions and Elementary Operations Elementary Operations

Solution

Apply algebraic method

System of Linear Equations 22 / 81


Solutions and Elementary Operations Elementary Operations

Solution

Apply algebraic method

The corresponding augmented matrix

System of Linear Equations 22 / 81


Solutions and Elementary Operations Elementary Operations

Solution

Apply algebraic method

The corresponding augmented matrix

Solution (x, y) = (0, −1)

System of Linear Equations 22 / 81


Solutions and Elementary Operations Elementary Operations

Elementary operations

The following operations, called elementary operations, can routinely be


performed on systems of linear equations to produce equivalent
systems.
1 (Interchange) Interchange two equations.

2 (Scaling) Multiply one equation by a nonzero number.

3 (Replacement) Add a multiple of one equation to a different equation.

System of Linear Equations 23 / 81


Solutions and Elementary Operations Elementary Operations

Use Elementary Row Operations


The following are called elementary row operations on a matrix.
1 Interchange two rows.

2 Multiply one row by a nonzero number.

3 Add a multiple of one row to a different row.

To Produce a Matrix Of the Form

System of Linear Equations 24 / 81


Solutions and Elementary Operations Elementary Operations

Use Elementary Row Operations


The following are called elementary row operations on a matrix.
1 Interchange two rows.

2 Multiply one row by a nonzero number.

3 Add a multiple of one row to a different row.

To Produce a Matrix Of the Form

But this does not always happen.

System of Linear Equations 24 / 81


Solutions and Elementary Operations Elementary Operations

Example

Find all solutions to the following system of equations.

3x + 4y + z = 1
2x + 3y = 0
4x + 3y − z = −2

System of Linear Equations 25 / 81


Solutions and Elementary Operations Elementary Operations

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

System of Linear Equations 26 / 81


Solutions and Elementary Operations Elementary Operations

Creat 1 leading in row 2


 
1 23 0
− 17 r3
0
−−−→ 0 1 −2 −2
 
8
0 0 1 7

The corresponding system of equations






x + 32 y =0
y − 2z = −2

 8
 z= 7

which give the unique solution (x = − 37 , y = 72 , z = 87 ).

System of Linear Equations 27 / 81


Gaussian Elimination

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

System of Linear Equations 28 / 81


Gaussian Elimination Row Reduction and Echelon Forms

Row-Echelon Form

System of Linear Equations 29 / 81


Gaussian Elimination Row Reduction and Echelon Forms

Stair form of row echelon matrix

The leading 1s proceed “down and to the right” through the matrix. All
entries below and to the left of them are zero.

System of Linear Equations 30 / 81


Gaussian Elimination Row Reduction and Echelon Forms

Which is a row-echelon matrix?

System of Linear Equations 31 / 81


Gaussian Elimination Row Reduction and Echelon Forms

Reduced row-echelon matrix


It is a row-echelon matrix
Each leading 1 is the only nonzero entry in its column

System of Linear Equations 32 / 81


Gaussian Elimination Row Reduction and Echelon Forms

Which is a reduced row- echelon matrix?

System of Linear Equations 33 / 81


Gaussian Elimination Row Reduction and Echelon Forms

Carry a matrix to (reduced) - echelon form - Gaussian


Algorithm
Every matrix can be brought to (reduced) row-echelon form by a series of
elementary row operations

System of Linear Equations 34 / 81


Gaussian Elimination Row Reduction and Echelon Forms

Carry a matrix to (reduced) - echelon form - Gaussian


Algorithm
Every matrix can be brought to (reduced) row-echelon form by a series of
elementary row operations
Gaussian Algorithm
Step 1 If the matrix consists entirely of zeros, stop
Step 2 Otherwise, find the first column from the left containing a nonzero
entry (call it a), and move the row containing that entry to the top
position.
Step 3 Now multiply the new top row by 1/a to create a leading 1.
Step 4 By subtracting multiples of that row from rows below it, make each
entry below the leading 1 zero.
Step 5 Repeat steps 1–4 on the matrix consisting of the remaining rows.

System of Linear Equations 34 / 81


Gaussian Elimination Row Reduction and Echelon Forms

Ilustrate a part of Gaussian Algorithm

System of Linear Equations 35 / 81


Gaussian Elimination Row Reduction and Echelon Forms

Example

Carry the matrix


 
2 6 −2 2
−2 −3 11 4
 
3 11 3 0

to
1 row - echelon form
2 reduced row - echelon form

System of Linear Equations 36 / 81


Gaussian Elimination Row Reduction and Echelon Forms

Solution - Carry to echelon - form

System of Linear Equations 37 / 81


Gaussian Elimination Row Reduction and Echelon Forms

Continue to carry to reduced echelon - form

System of Linear Equations 38 / 81


Gaussian Elimination Row Reduction and Echelon Forms

Example

Solve the system equations





3x + y − 4z = −1
x + 10z = 5


4x + y + 6z = 1

System of Linear Equations 39 / 81


Gaussian Elimination Row Reduction and Echelon Forms

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

The following reduced system of equations






x + 0y + 10z = 5
0x + y − 34z = −16

0x + 0y + 0z = −3

is equivalent to the original system.

System of Linear Equations 40 / 81


Gaussian Elimination Row Reduction and Echelon Forms

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

The following reduced system of equations






x + 0y + 10z = 5
0x + y − 34z = −16

0x + 0y + 0z = −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

Solve the following system of equations.




 x − 2x2 − x3 + 3x4 = 1
 1
2x − 4x + x
1 2 3 =5

 x − 2x + 2x − 3x = 4

1 2 3 4

System of Linear Equations 41 / 81


Gaussian Elimination Row Reduction and Echelon Forms

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

System of Linear Equations 42 / 81


Gaussian Elimination Row Reduction and Echelon Forms

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

The corresponding reduced system of equation



x − 2x2
 1

 + x4 =2
x3 − 2x4 =1


 0=0

The leading ones are in columns 1 and 3 here, so the corresponding


variables x1 and x3 are called leading variables.
System of Linear Equations 42 / 81
Gaussian Elimination Row Reduction and Echelon Forms

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

The solution is given by

x1 = 2 + 2s − t
x2 = s
x3 = 2t + 1
x4 = t

where s and t are arbitrary.


System of Linear Equations 43 / 81
Gaussian Elimination Solution of Linear Systems

Solution of Linear Systems

To solve a linear system, the augmented matrix is carried to reduced


row-echelon form
the variables corresponding to the leading ones are called leading
variables
Because the matrix is in reduced form, each leading variable occurs in
exactly one equation, so that equation can be solved to give a
formula for the leading variable in terms of the nonleading variables
call the nonleading variables “free” variables
label ”free” variables by new variables s, t, ..., called parameters
every variable xi is given by a formula in terms of the parameters
s, t, . . .
every choice of these parameters leads to a solution to the
system, and every solution arises in this way

System of Linear Equations 44 / 81


Gaussian Elimination Gaussian Elimination Method

Gaussian Elimination

To solve a system of linear equations proceed as follows:


1 Carry the augmented matrix to a reduced row-echelon matrix

using elementary row operations.


h i
2 If a row 0 0 0 · · · 0 1 occurs, the system is inconsistent.
3 Otherwise, the system is consistent. To find solution, assign the
nonleading variables (if any) as parameters, and use the equations
corresponding to the reduced row-echelon matrix to solve for the
leading variables in terms of the parameters with back substitution
.

System of Linear Equations 45 / 81


Gaussian Elimination Gaussian Elimination Method

Back Substitution Procedure

The nonleading variables are assigned as parameters.


The last equation (corresponding to the row-echelon form) is used to
solve for the last leading variable in terms of the parameters.
This last leading variable is then substituted into all the preceding
equations.
Then, the second last equation yields the second last leading variable,
which is also substituted back.
The process continues to give the general solution.

System of Linear Equations 46 / 81


Gaussian Elimination Gaussian Elimination Method

Example

Find a condition on the numbers a, b, and c such that the following


system of equations is consistent. When that condition is satisfied, find all
solutions (in terms of a, b, and c).

x1 + 3x2 + x3 = a
−x1 − 2x2 + x3 = b
3x1 + 7x2 − x3 = c

System of Linear Equations 47 / 81


Gaussian Elimination Gaussian Elimination Method

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

The rank of matrix A, denote by rank(A), is the number of leading 1s


in any row-echelon matrix to which A can be carried by row operations.

System of Linear Equations 49 / 81


Gaussian Elimination Rank of Matrix and Consistency of Linear System

Rank of a Matrix

The rank of matrix A, denote by rank(A), is the number of leading 1s


in any row-echelon matrix to which A can be carried by row operations.
Theorem
Suppose a system of m equations in n variables is consistent, and that the
rank of the augmented matrix is r.
1 The set of solutions involves exactly n − r parameters
2 If r < n, the system has infinitely many solutions.
3 If r = n, the system has a unique solution.

System of Linear Equations 49 / 81


Gaussian Elimination Rank of Matrix and Consistency of Linear System

Example

Recall the system of equations




 x − 2x2 − x3 + 3x4 = 1
 1
2x − 4x + x
1 2 3 =5

 x − 2x + 2x − 3x = 4

1 2 3 4

has m = 3 linear equations in n = 3 variables.

The rank of augmented matrix is r = 2. So the set of solution has


n − r = 3 − 2 = 1 parameter.

System of Linear Equations 50 / 81


Gaussian Elimination Rank of Matrix and Consistency of Linear System

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

System of Linear Equations 51 / 81


Gaussian Elimination Rank of Matrix and Consistency of Linear System

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

System of Linear Equations 51 / 81


Gaussian Elimination Rank of Matrix and Consistency of Linear System

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

System of Linear Equations 52 / 81


Gaussian Elimination Rank of Matrix and Consistency of Linear System

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)

The system has one


h solution
i when
rank(A) = rank( A b ) = n = 2. It is equivalent to b + 2a ̸= 0.
The system has infinite many solutions if
h i
rank(A) = rank( A b ) < n

The conditions are b + 2a = 0 and 5 − a = 0. So a = 5 and b = −10

System of Linear Equations 54 / 81


Gaussian Elimination Rank of Matrix and Consistency of Linear System

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

System of Linear Equations 55 / 81


Gaussian Elimination Rank of Matrix and Consistency of Linear System

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.

System of Linear Equations 56 / 81


Gaussian Elimination Rank of Matrix and Consistency of Linear System

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.

System of Linear Equations 57 / 81


Homogeneous System of Equations

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

System of Linear Equations 58 / 81


Homogeneous System of Equations Homogeneous System

Homogeneous system of equations

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

System of Linear Equations 59 / 81


Homogeneous System of Equations Homogeneous System

Homogeneous system of equations

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

System of Linear Equations 59 / 81


Homogeneous System of Equations Homogeneous System

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

System of Linear Equations 60 / 81


Homogeneous System of Equations Homogeneous System

Solution (cont)
 
r2 − 34 r3
1 0 1 0 0
−−−−− → 0 1 −1 0 0
 
r1 − 14 r3
0 0 0 1 0

Assign x3 = t so x1 = −t, x2 = t, x4 = 0. Taking t = 1, we get a non


trivial solution x1 = −1, x2 = 1, x3 = 1, x4 = 0.

System of Linear Equations 61 / 81


Homogeneous System of Equations Homogeneous System

Solution (cont)
 
r2 − 34 r3
1 0 1 0 0
−−−−− → 0 1 −1 0 0
 
r1 − 14 r3
0 0 0 1 0

Assign x3 = t so x1 = −t, x2 = t, x4 = 0. Taking t = 1, we get a non


trivial solution x1 = −1, x2 = 1, x3 = 1, x4 = 0.

In general, the solution of this system equation has parametric form


 
−t
 t 
x= 
 
 t 
0

All component of general solution is multiple of the corresponding


component in the above non trivial solution
System of Linear Equations 61 / 81
Homogeneous System of Equations Linear combination, general solution and basis solution

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

Sum and scalar of columns


       
x1 y1 x 1 + y1 kx1
If x = . . . and y = . . . then x + y =  . . .  and kx =  . . . 
       
xn yn x n + yn kxn

Linear combination
A sum of scalar multiples of several columns is called a linear combination
of these columns.
same idea for rows

System of Linear Equations 62 / 81


Homogeneous System of Equations Linear combination, general solution and basis solution

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

System of Linear Equations 63 / 81


Homogeneous System of Equations Linear combination, general solution and basis solution

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.

System of Linear Equations 64 / 81


Homogeneous System of Equations Linear combination, general solution and basis solution

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

Equating the corresponding entries gives a system of linear equation

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

By gaussian elimination, the solution is r = 2 − k, s = −1 − k, and t = k


where k is a parameter. Taking k = 0, we see that v = 2x−y is a linear
combination of x, y, and z.

System of Linear Equations 65 / 81


Homogeneous System of Equations Linear combination, general solution and basis solution

By gaussian elimination, the solution is r = 2 − k, s = −1 − k, and t = k


where k is a parameter. Taking k = 0, we see that v = 2x−y is a linear
combination of x, y, and z.

What’s your answer for w?

System of Linear Equations 65 / 81


Homogeneous System of Equations Linear combination, general solution and basis solution

Interest of linear combination

Linear combination is one of the best ways to describe the general solution
of homogeneous system of linear equations

If x and y are two solutions to a homogeneous system with n variables.


Then any linear combination sx + ty of these solutions turns out to be
again a solution to the system

Any linear combination of solutions to a homogeneous system is again a


solution

System of Linear Equations 66 / 81


Homogeneous System of Equations Linear combination, general solution and basis solution

Basis solution of homogeneous system


General solution of the system of homogeneous linear equations




x1 − 2x2 + 3x3 − 2x4 = 0
−3x + 6x + x
1 2 3 =0

−2x + 4x + 4x − 2x = 0

1 2 3 4

is x1 = 2s + 15 t, x2 = s, x3 = 35 t, x4 = t and can be written in matrix form


1
   

1
 2s t
2s + 5t  s   50 
x= s  =   +  3  = sx1 + tx2
     
3  0   5 t
5t t
0 t
1
   
2
1  05 
where x1 =   and x2 =  3  which are called basis solutions
   
0 5
0 1
System of Linear Equations 67 / 81
Homogeneous System of Equations Linear combination, general solution and basis solution

Definition (Basic solutions)


The gaussian algorithm systematically produces solutions to any
homogeneous linear system, called basic solutions, one for every
parameter.

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.

System of Linear Equations 68 / 81


Homogeneous System of Equations Linear combination, general solution and basis solution

Example

Find basic solutions of the homogeneous system with coefficient matrix A,


and express every solution as a linear combination of the basic solutions
where  
1 −3 0 2 2
−2 6 1 2 −5
A=
 
 3 −9 −1 0 7 

−3 9 2 6 −8

System of Linear Equations 69 / 81


Homogeneous System of Equations Linear combination, general solution and basis solution

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

The general solution is x1 = 3r − 2s − 2t, x2 = r, x3 = −6s + t, x4 = s,


xt = t where r, s, t are parameters.
In matrix form, this is
         
x1 3r − 2s − 2t 3 −2 −2
x   r  1  0   0 
 2        
x = x3  =  −6s + t  = r 0 + s −6 + t  1 
         
         
x4   s  0  1   0 
x5 t 0 0 1

System of Linear Equations 70 / 81


Homogeneous System of Equations Linear combination, general solution and basis solution

Solution (cont)

Hence the basic solutions are


     
3 −2 −2
1  0   0 
     
x1 = 0 , x2 = −6 , x3 =  1 
     
     
0  1   0 
0 0 1

System of Linear Equations 71 / 81


Homogeneous System of Equations Linear combination, general solution and basis solution

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

System of Linear Equations 72 / 81


An Application to Network Flow

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

System of Linear Equations 73 / 81


An Application to Network Flow

Network Flow Analysis

There are many types of problems that concern a network of conductors


along which some sort of flow is observed. Examples of these include an
irrigation network and a network of streets or freeways. There are often
points in the system at which a net flow either enters or leaves the system.
The basic principle (junction rule) behind the analysis of such systems is
that the total flow into the system must equal the total flow out.

System of Linear Equations 74 / 81


An Application to Network Flow

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.

System of Linear Equations 75 / 81


An Application to Network Flow

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

The reduction of augmented matrix is


   
1 1 1 0 0 0 500 1 1 1 0 0 0 500
1 0 0 1 0 1 400 0 1 0 −1 −1 0 0 
→
   
0 0 1 0 1 −1 100 0 0 1 0 1 −1 100
 

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

System of Linear Equations 77 / 81


An Application to Chemical Reactions

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

System of Linear Equations 78 / 81


An Application to Chemical Reactions

Balance for Chemical Reaction

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

In this case the reaction is said to be balanced

System of Linear Equations 79 / 81


An Application to Chemical Reactions

In order to balance the reaction, we need to find positive integers x, y, z


such that
xH2 + yO2 → zH2 O
Equating the number of hydrogen and oxygen atoms on each side give
(
2x = 2z
2y = z

which can be written as a homogeneous linear system


(
2x − 2z = 0
2y − z = 0

and solved by gaussian elimination. Set z = t then x = t and y = 2t.


x, y, z must be positive integers so the smalles value of t is 1. Hence
x = 1, y = 2, z = 2 and the balance reaction is

2H2 + O2 → 2H2 O

System of Linear Equations 80 / 81


An Application to Chemical Reactions

Exercise

Balance the following reaction for burning octane C8 H18 in oxygen O2 :

C8 H18 + O2 → CO2 + H2 O

System of Linear Equations 81 / 81

You might also like