0% found this document useful (0 votes)
23 views71 pages

Lecture-1 New

1) The document provides information about the MT-502 course, including required textbooks, marks distribution, and examples of applying linear algebra concepts. 2) Several examples are given that demonstrate how linear algebra can be used to model real-world scenarios, such as determining the best prices for customers, encoding messages securely, and balancing chemical equations. 3) The examples involve setting up and solving systems of linear equations to analyze situations involving demand and pricing, matrix encoding/decoding, information networks, and chemical reactions.

Uploaded by

waqar soomro
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views71 pages

Lecture-1 New

1) The document provides information about the MT-502 course, including required textbooks, marks distribution, and examples of applying linear algebra concepts. 2) Several examples are given that demonstrate how linear algebra can be used to model real-world scenarios, such as determining the best prices for customers, encoding messages securely, and balancing chemical equations. 3) The examples involve setting up and solving systems of linear equations to analyze situations involving demand and pricing, matrix encoding/decoding, information networks, and chemical reactions.

Uploaded by

waqar soomro
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 71

COURSE #: MT-502

1
Books
Text Book:
1) Elementary Linear Algebra Application Version By
Howard Anton & Chris Rorres 9th or later edition
Reference Books:
1) Linear Algebra with Applications By Gareth Williams
6th edition
2) Linear Algebra By B. Colman, David R. Hill 7th edition

2
Marks Distribution
Sessional 40 Marks
Two-Hour Test 50% of sessional
Two Assignments 30% of sessional
Class Participation 20% of sessional
Final Exam 60 Marks

3
Application of Linear Algebra
The broad utility of linear algebra in daily life and sciences
reflects the deep connection that exists between the discrete
nature of matrix mathematics and sciences. Following are
few examples of applications
1) Economics
2) Game Theory
3) Linear Programming
4) Computer Graphic
5) Cryptography
6) Graph Theory
7) Image processing
etc.

4
Application of Linear Algebra in Real Life

 Example 1
Three people denoted by P1, P2, P3 intend to buy some
rolls, buns, cakes and bread. Each of them needs
these commodities in differing amounts and can buy
them in two shops S1, S2. Which shop is the best for
every person P1, P2, P3 to pay as little as possible? The
individual prices and desired quantities of the
commodities are given in the following tables:

5
Example-1(con’d)
Demanded quantity of foodstuff Prices in shops S1 and S2
roll bun Cake bread S1 S2
roll 1.50 1.00
P1 6 5 3 1 bun 2.00 2.50

P2 3 6 2 2 cake 5.00 4.50

P3 3 4 3 1 Bread 16.00 17.00

For example, the amount spent by the person P1 in the shop S1


is:
6 · 1.50 + 5 · 2 + 3 · 5 + 1 · 16 = 50
and in the shop S2 :
6 · 1 + 5 · 2.50 + 3 · 4.50 + 1 · 17 = 49,
for the other people similarly. These calculations can be written
using a product of two matrices

6
Example-1 (con’d)
6 5 3 1
𝑃= 3 6 2 2 (the demand matrix) and
3 4 3 1
1.50 1
𝑄= 2 2.25 (the price matrix).
5 4.50
16 17

7
Example-1 (con’d)
For example, the first row of the matrix
50 49
𝑅 = 𝑃𝑄 = 58.50 61
43.50 43.50

expresses the amount spent by the person P1 in the shop S1 (the


element R11) and in the shop S2 (the element R12). Hence, it is
optimal for the person P1 to buy in the shop S2, for the person P2
in S1 and the person P3 will pay the same price in S1 as in S2.

8
Example-2
To encode a short message a number can be assigned to each letter
of the alphabet according to a given table. The text as a sequence
of numbers will be organized into a square matrix A; in the case
that the number of letters is lower than the number of elements of
the matrix A, the rest of the matrix can be filled with zero
elements. Let a nonsingular square matrix C be given. To encode
the text the matrix A can be multiplied by the matrix C. Let the
following table and the matrix C be given:

9
Example-2(con’d)
ABC DE F G H I J K L M NO P Q R S T U V
8 7 5 13 9 16 18 22 4 23 11 3 21 1 6 15 12 19 2 14 17 20

W X Y Z
25 24 10 26
2 0 1
& 𝐶= 1 0 1
0 1 0

10
Example-2(con’d)
We put the text “BILA KOCKA” (a white cat) into the matrix A:
7 4 3
𝐴 = 8 11 6
5 11 8
and encode the text:
19 19 14
𝑍 = 𝐶𝐴 = 12 15 11
8 11 6
To decode the message we have to multiply the matrix Z by the
matrix C-1 on the left:

11
Example-2(con’d)
1 −1 0 19 19 14
𝐶 −1 𝑍 = 0 0 1 12 15 11 = 𝐴
−1 2 0 8 11 6
Since the matrix multiplication is not commutative, it is necessary
to keep the order of the matrices in the product. If we multiply
the matrices C−1 and Z in the opposite order, we obtain
19 19 14 1 −1 0 5 9 19
𝑍𝐶 −1 = 12 15 11 0 0 1 = 1 10 15
8 11 6 −1 2 0 2 4 11

and it means “CERNY PSIK”(a black dog).

12
Example-3
Let us consider a group of people P1, ..., Pn. We put aij = 1 if the
person Pi can send some information to the person Pj , and aij = 0
otherwise (for convenience, we put aii = 0 for all i = 1, ..., n).
Organizing this elements into a square matrix A, we obtain a so
called incidence matrix. Let Pi  Pj denotes the fact that Pi can
send information to Pj . Thus, for example, the elements of the
matrix
0 1 0 1
𝐴= 0 0 1 0
1 0 0 1
1 1 0 0

13
Example-3(con’d)
tell us that P1P2, P1P4, P2P3, P3P1, P3P4, P4P1, P4P2
(since P1P4 and P4P1, it is obvious that P1 and P4 can send
information to each other). How we may interpret the matrix
1 1 1 0
𝐴2 = 1 0 0 1
1 2 0 1
0 1 1 1
Denoting the elements of A2 by (a2)ij , we obtain for example
(a2)32 = a31a12 + a32a22 + a33a32 + a34a42 = 1 + 0 + 0 + 1 = 2
and this result shows that the person P3 can send information to P2
in two stages by two ways:
P3P1  P1 P2 (because a31a12 = 1) and
P3P4  P4P2 (because a34a42 = 1).
14
Example-3(con’d)
Similarly, since (a2)14 = 0, there is no possibility to send
information from P1 to P4 in two stages (but it is possible directly,
because a14 = 1). Hence, the element (a2)ij gives the number of
ways in which the person Pi can send information to Pj in two
stages.
Similarly, (a3)ij represents the number of ways in which the person
Pi can send information to Pj in three stages:

1 1 1 2
𝐴3 = 1 2 0 0
1 2 2 1
2 1 1 1

15
Example-3(con’d)
Hence, there are two ways to send information from P3 to P2 in
three stages: P3P4  P4P1  P1P2
(because (a2)31a12 = (a31a11+a32a21+a33a31+a34a41)a12 =
(0+0+0+1) ·1 = 1)
and P3P1  P1P4  P4P2
(because (a2)34a42 = (a31a14+a32a24+a33a34+a34a44)a42 =
(1 + 0 + 0 + 0) · 1 = 1).
In general, the number of ways in which Pi can send information
to Pj in at most k stages is given by the element in the i-th row
and j-th column of the matrix A+A2 +A3 + ... +Ak.
Thus, in the above example we deduce from the matrix
16
Example-3(con’d)
2 3 2 3
𝐴 + 𝐴2 + 𝐴3 = 2 2 1 1
3 4 2 3
3 3 2 2
that for example there are four ways in which P3 can send
information to P2 in at most three stages.

17
Example-4
Consider the following chemical equation
C2H6 + O2 → CO2 + H2O.
Balancing this chemical reaction means finding values of x, y, z
and t so that the number of atoms of each element is the same on
both sides of the equation:
xC2H6 + yO2 → zCO2 + tH2O.
This gives the following linear system:

18
Example-4(con’d)
The general solution of the above system is:

Since we are looking for whole values of the variables x, y z, and


t, choose x=2 and get y=7, z= 4 and t=6. The balanced equation is
then:

2C2H6 + 7O2 → 4CO2 + 6H2O.

19
20
Linear Equations
 Any straight line in xy-plane can be represented
algebraically by an equation of the form:
a1 x  a2 y  b
 General form: The linear equation with the n
variables: x1 , x2 ,..., xn
is a1 x1  a2 x2  ...  an xn  b

 Where a1 , a2 ,..., an , and b are real constants.


 The variables in a linear equation are sometimes
called unknowns.

21
Example-1: Linear Equations
1
 The equations x  3 y  7, y  x  3z  1, and x1  2 x2  3x3  x4  7
are linear. 2
 Observe that a linear equation does not involve any products or
roots of variables. All variables occur only to the first power and
do not appear as arguments for trigonometric, logarithmic, or
exponential functions.
 The equations x  3 y  5, 3x  2 y  z  xz  4, and y  sin x
are not linear.
 A solution of a linear equation is a sequence of n numbers
s1 , s2 ,..., sn such that the equation is satisfied. The set of all
solutions of the equation is called its solution set or general
solution of the equation.

22
Example-2: Finding a Solution Set
 Find the solution of (a ) 4 x  2 y  1

Solution(a)
we can assign an arbitrary value to x and solve for y , or
choose an arbitrary value for y and solve for x .If we follow
the first approach and assign x an arbitrary value ,we
obtain x  t , y  2t  1 or
1 1
x t  , y t
1 1 2 2
2 2 4
 arbitrary numbers t1, t 2 are called parameter.
11 11
 for example t1  3 yields the solution x  3, y  as t2 
2 2

23
Example-2: Finding a Solution Set (con’d)
 Find the solution of (b) x1  4 x2  7 x3  5.

Solution(b)
we can assign arbitrary values to any two variables
and solve for the third variable.
 for example
x1  5  4s  7t , x2  s, x3  t
 where s, t are arbitrary values

24
Linear Systems (1/2)
 A finite set of linear equations in
the variables x1 , x2 ,..., xn a11 x1  a12 x2  ...  a1n xn  b1
is called a system of linear
equations or a linear system . a21 x1  a22 x2  ...  a2 n xn  b2
   
 A sequence of numbers am1 x1  am 2 x2  ... amn xn  bm
s1 , s2 ,..., sn is called a solution of
the system.
An arbitrary system of m
linear equations in n unknowns
 A system has no solution is said to
be inconsistent ; if there is at least
one solution of the system, it is
called consistent.

25
Linear Systems (2/2)
 Every system of linear equations has either no
solutions, exactly one solution, or infinitely
many solutions.

 A general system of two linear equations:


(Figure1.1.1) a1 x  b1 y  c1 (a1 , b1 not both zero)
a2 x  b2 y  c2 (a2 , b2 not both zero)
 Two lines may be parallel -> no solution
 Two lines may intersect at only one point
-> one solution
 Two lines may coincide
-> infinitely many solution

26
Augmented Matrices
 The location of the +’s,
the x’s, and the =‘s can a11 x1  a12 x2  ...  a1n xn  b1
be abbreviated by writing a21 x1  a22 x2  ...  a2 n xn  b2
only the rectangular array    
of numbers.
am1 x1  am 2 x2  ... amn xn  bm
 This is called the
augmented matrix for the
system. 1th column

 Note: It must be written a11 a12 ... a1n b1  1th row


in the same order in each a a ... a 
 21 22 b2 
equation as the unknowns 2n

and the constants must be      


 
on the right.  m1 m 2
a a ... a mn b m

27
Elementary Row Operations
 The basic method for solving a system of linear equations is to
replace the given system by a new system that has the same
solution set but which is easier to solve.

 Since the rows of an augmented matrix correspond to the


equations in the associated system. New system is generally
obtained in a series of steps by applying the following three types
of operations to eliminate unknowns systematically. These are
called elementary row operations:
1. Multiply an equation through by an nonzero constant.
2. Interchange two equation.
3. Add a multiple of one equation to another.

28
Example-3: Using Elementary row
Operations(1/4)
System of Linear Equations

x  y  2z  9 add -2 times x  y  2z  9 add -3 times


the first equation the first equation
2 x  4 y  3z  1 2 y  7 z  1 7
3x  6 y  5 z  0

to the second
3x  6 y  5 z  0 
to the third

Augmented Matrix

1 1 2 9  add - 2 tim es 1 1 2 9  add -3 times


2 4  3 1 the first row 0 2  7  17 the first row
 
3 6  5 0 

to the second 
3 6  5

0  
to the third

29
Example-3: Using Elementary row
Operations(2/4)

x  y  2z  9 x  y  2z  9 add -3 times
multiply the second
2 y  7 z  17 1 y  72 z   172 the second equation

equation by to the third
3 y  11z  27  2
3 y  11z  0

1 1 2 9  multily the second 1 1 2 9  add -3 times


0 2  7  17  1 0 1  7  17  the second row
  row by  

 
2 2
2 to the third
0 3  11  27 0 3  11  27

30
Example-3: Using Elementary row
Operations(3/4)

x  y  2z  9 Multiply the third x  y  2z  9


Add -1 times the
second equation
y  72 z   172 

equation by - 2 y  72 z   172 
to the first

 12 z   32 z 3

1 1 2 9  Multily the third 1 1 2 9  Add -1 times the


0 1  7  172  0 1  7
 
row by - 2
  172  second row
 
2 2 to the first
0 0  12  32  0 0 1 3 

31
Example-3: Using Elementary row
Operations(4/4)
Add - 11
2
tim es
the third equation
x  112 z  35
2 to the first and 72 tim es x 1
y  72 z   172 the third equation y  2
    

to the second
z 3
z 3

Add - 11
2
tim es
the third row
1 0 112 35
2  to the first and 72 1 0 0 1
0 1  7  
17 tim es the third row 0 1 0 2 
 2 2
 
0 0 1 3     

to the second
0 0 1 3

 The solution x=1,y=2,z=3 is now evident.


32
33
Echelon Forms
 A matrix that has following properties is in reduced row-echelon
form :
1. If a row does not consist entirely of zeros, then the first nonzero
number in the row is a “1”. We call this a leading one.
2. If there are any rows that consist entirely of zeros, then they are
grouped together at the bottom of the matrix.
3. In any two successive rows that do not consist entirely of zeros, the
leading 1 in the lower row(s) occurs farther to the right than the
leading 1 in the higher row(s).
4. Each column that contains a leading 1 has zeros everywhere else.

 A matrix that has first three properties is said to be in row-echelon


form .
 A matrix in reduced row-echelon form is of necessity in row-
echelon form, but not conversely.

34
Example-1: Row-Echelon &
Reduced Row-Echelon form
 reduced row-echelon form:
0 1  2 0 1
1 0 0 4  1 0 0 
 0 1 0 7  , 0 1 0  ,  0 0 0 1 3 0 0
0 0 0 0 0 0
    0 ,
0 0 1  1 0 0 1  
0 0 0 0 0

 row-echelon form:
1 4  3 7 1 1 0 0 1 2 6 0
 0 1 6 2  , 0 1 0  ,  0 0 1  1 0 
     
0 0 1 5 0 0 0 0 0 0 0 1

35
Example-2: Row-Echelon and Reduced
Row-Echelon form
 All matrices of the following types are in row-echelon
form ( any real numbers substituted for the *’s. ) :
0 1 * * * * * * * *
1 * * * 1 * * * 1 * * * 
0 0 0 1 * * * * * *
1 * * 0 1 * * 0 1 * * 
0
 , , , 0 0 0 0 1 * * * * *
0 0 1 * 0 0 1 *  0 0 0 0  
      0 0 0 0 0 1 * * * *
0 0 0 1 0 0 0 0  0 0 0 0 
0 0 0 0 0 0 0 0 1 *

 All matrices of the following types are in reduced row-


echelon form ( any real numbers substituted for the *’s. ) :
0 1 * 0 0 0 * * 0 *
1 0 0 0 1 0 0 * 1 * 
0 0 1 0 0 * * 0 *
0 *
0 1 0 0 0 1 0 * 0 1 * * 
0
 , , , 0 0 0 0 1 0 * * 0 *
0 0 1 0 0 0 1 *  0 0 0 0  
      0 0 0 0 0 1 * * 0 *
0 0 0 1 0 0 0 0  0 0 0 0 
0 0 0 0 0 0 0 0 1 *
36
Example-3: Solutions of Linear Systems (a)

Suppose that the augmented matrix for a system of


linear equations have been reduced by row operations to
the given reduced row-echelon form. Solve the system.

1 0 0 5 
(a) 0 1 0  2
0 0 1 4 

Solution (a)
x  5
the corresponding system
y  -2
of equations is :
z 4

37
Example-3: Solutions of Four Linear
Systems (b1)
1 0 0 4  1
(b) 0 1 0 2 6 
0 0 1 3 2 

Solution (b)
free variables
1. The corresponding x1  4 x4  - 1
system of equations is : x2  2 x4  6
x3  3 x4  2

leading
variables

38
Example-3: Solutions of Four Linear
Systems (b2)
x1  - 1 - 4 x4 2. We see that the free variable can be
x2  6 - 2 x4 assigned an arbitrary value, say t, which
then determines values of the leading
x3  2 - 3 x4 variables.

3. There are infinitely many


x1  1  4t ,
solutions, and the general
solution is given by the x2  6  2t ,
formulas x3  2  3t ,
x4  t

39
Example-3: Solutions of Four Linear
Systems (c1)
1 6 0 0 4  2
0 0 1 0 3 1 
(c) 
0 0 0 1 5 2
 
0 0 0 0 0 0

Solution (c)
1. The 4th row of zeros leads to x1  6 x2  4 x5  - 2
the equation places no
restrictions on the solutions. x3  3x5  1
Thus, we can omit this x4  5 x5  2
equation.

40
Example-3: Solutions of Four Linear
Systems (c2)
Solution (c)
x1  - 2 - 6 x2 - 4 x5
2. Solving for the leading x3  1 - 3x5
variables in terms of the free
variables: x4  2 - 5 x5

3. The free variable can be x1  - 2 - 6 s - 4t ,


assigned an arbitrary value , x2  s
there are infinitely many
solutions, and the general x3  1 - 3t
solution is given by the x4  2 - 5t ,
formulas.
x5  t
41
Example-3: Solutions of Four Linear
Systems(d)
1 0 0 0 
(d) 0 1 2 0
0 0 0 1

Solution (d):
the last equation in the corresponding system of
equation is
0 x1  0 x2  0 x3  1

Since this equation cannot be satisfied, there is


no solution to the system.

42
Elimination Methods (1/7)
 We shall give a step-by-step elimination
procedure that can be used to reduce any
matrix to reduced row-echelon form.

0 0  2 0 7 12 
2 4  10 6 12 28
 
2 4  5 6  5  1

43
Elimination Methods (2/7)
 Step1. Locate the leftmost column that does not consist
entirely of zeros.
0 0  2 0 7 12 
2 4  10 6 12 28
 
2 4  5 6  5  1
Leftmost nonzero column

 Step2. Interchange the top row with another row, to bring a


nonzero entry to top of the column found in Step1.

2 4  10 6 12 28
0 0  2 0 7 12  The 1th and 2th rows in the
  preceding matrix were
2 4  5 6  5  1 interchanged.

44
Elimination Methods (3/7)
 Step3. If the entry that is now at the top of the column found
in Step1 is a, multiply the first row by 1/a in order to introduce
a leading 1.
1 2  5 3 6 14 
0 0  2 0 7 12 
  The 1st row of the preceding
2 4  5 6  5  1 matrix was multiplied by 1/2.

 Step4. Add suitable multiples of the top row to the rows


below so that all entires below the leading 1 become zeros.
1 2  5 3 6 14 
0 0  2 0 7  -2 times the 1st row of the
 12  preceding matrix was added to
0 0 5 0  17  29 the 3rd row.

45
Elimination Methods (4/7)

 Step5. Now cover the top row in the matrix and begin
again with Step1 applied to the submatrix that remains.
Continue in this way until the entire matrix is in row-
echelon form.
1 2  5 3 6 14 
0 0  2 0 7 12 
 
0 0  5 0  17  29 Leftmost nonzero
column in the submatrix

1 2  5 3 6 14 
0 0 1 0  7  The 1st row in the submatrix
 2  6  was multiplied by -1/2 to
0 0 5 0  17  29 introduce a leading 1.

46
Elimination Methods (5/7)
 Step5 (cont.)
-5 times the 1st row of the
1 2  5 3 6 14  submatrix was added to the 2nd
0 0 1 0  7  6  row of the submatrix to introduce
 2  a zero below the leading 1.
0 0 0 0 2 1
1 

1 2  5 3 6 14  The top row in the submatrix was


0 0 1 0  7  6
covered, and we returned again Step1.
 2
0 0 0 0 12 1 
Leftmost nonzero column in
the new submatrix
1 2  5 3 6 14 
0 0 1 0  7  6
 2 The first (and only) row in the
0 0 0 0 1 2  new submetrix was multiplied
by 2 to introduce a leading 1.

 The entire matrix is now in row-echelon form.


47
Elimination Methods (6/7)
 Step6. Beginning with las nonzero row and working upward, add
suitable multiples of each row to the rows above to introduce zeros
above the leading 1’s.
1 2  5 3 6 14 7/2 times the 3rd row of the
0 0 1 0 0 1  preceding matrix was added to
  the 2nd row.
0 0 0 0 1 2 
1 2  5 3 0 2 
0 0 1 0 0 1  -6 times the 3rd row was added
  to the 1st row.
0 0 0 0 1 2

1 2 0 3 0 7
0 0 1 0 0 1  5 times the 2nd row was added

0 0 0 0 1 to the 1st row.
2
 The last matrix is in reduced row-echelon form.
48
Elimination Methods (7/7)

 Step1~Step5: the above procedure produces a row-


echelon form and is called Gaussian elimination.
 Step1~Step6: the above procedure produces a reduced
row-echelon form and is called Gauss-Jordan
elimination.
 Every matrix has a unique reduced row-echelon
form but a row-echelon form of a given matrix is not
unique.

49
Example-4: Gauss-Jordan
Elimination(1/4)
 Solve by Gauss-Jordan Elimination
x1  3 x2  2 x3  2x 5  0
2 x1  6 x2  5 x3  2 x4  4 x5  3x6  1
5 x3  10 x4  15x6  5
2 x1  6 x2  8 x4  4 x5  18x6  6
Solution:
The augmented matrix for the system is

1 3 -2 0 0
2 0
2 6 - 5 - 2 4 - 3 - 1

0 0 5 10 0 15 5 
 
2 6 0 8 4 18 6 
50
Example 4
Gauss-Jordan Elimination(2/4)
 Adding -2 times the 1st row to the 2nd and 4th rows gives
1 3 - 2 0 2 0 0 
0 0 - 1 - 2 0 - 3 - 1
 
0 0 5 10 0 15 5 
 
 0 0 4 8 0 18 6 
 Multiplying the 2nd row by -1 and then adding -5 times the
new 2nd row to the 3rd row and -4 times the new 2nd row to
the 4th row gives
1 3 -2 0 2 00
0 0 1 2 0 - 3 1 

0 0 0 0 0 0 0
 
0 0 0 0 0 6 2
51
Example 4
Gauss-Jordan Elimination(3/4)
 Interchanging the 3rd and 4th rows and then multiplying the 3rd row
of the resulting matrix by 1/6 gives the row-echelon form.
1 3 - 2 0 2 0 0 
0 0 - 1 - 2 0 - 3 - 1
 
0 0 0 0 0 1 13 
 
 0 0 0 0 0 0 0 
 Adding -3 times the 3rd row to the 2nd row and then adding 2 times
the 2nd row of the resulting matrix to the 1st row yields the reduced
row-echelon form.
1 3 0 4 2 0 0 
0 0 1 2 0 0 0 
 
0 0 0 0 0 1 13 
 
 0 0 0 0 0 0 0 
52
Example 4
Gauss-Jordan Elimination(4/4)
 The corresponding system of equations is
x1  3x2  4 x4  2 x 5 0
x3  2 x4 0
x6  13
 Solution
The augmented matrix for the system is
x1  3x2  4 x4  2x 5
x3  2 x4
x6  13
 We assign the free variables, and the general solution is
given by the formulas:
x1  3r  4s  2t , x2  r , x3  2s, x4  s, x5  t , x6  13
53
Back-Substitution
 It is sometimes preferable to solve a system of linear equations by
using Gaussian elimination to bring the augmented matrix into
row-echelon form without continuing all the way to the
reduced row-echelon form.
 When this is done, the corresponding system of equations can be
solved by a technique called back-substitution.

54
Example 5
Ex4 solved by Back-substitution(1/2)
 From the computations in Example 4, a row-echelon form from the
augmented matrix is
1 3 -2 0 2 00
0 0 - 1 - 2 0 - 3 - 1

0 0 0 0 0 1 13 
 
0 0 0 0 0 0 0
 To solve the corresponding system of equations
x1  3x2  4 x4  2 x 5 0
x3  2 x4 0
x6  13
 Step1. Solve the equations for the leading variables.
x1  3 x2  2 x3  2 x 5
x3  1  2 x4  3 x6
x6  1
3
55
Example5
ex4 solved by Back-substitution(2/2)
 Step2. Beginning with the bottom equation and working upward,
successively substitute each equation into all the equations above it.
 Substituting x6=1/3 into the 2nd equation
x1  3 x2  2 x3  2 x 5
x3  2 x4
x6  13
 Substituting x3=-2 x4 into the 1st equation
x1  3x2  2 x3  2x 5
x3  2 x4
x6  13
 Step3. Assign free variables, the general solution is given by the
formulas.
x1  3r  4s  2t , x2  r , x3  2s, x4  s, x5  t , x6  13

56
Example 6
Gaussian elimination(1/2)
 Solve x  y  2 z  9 by Gaussian elimination and
2 x  4 y  3z  1 back-substitution. (ex3 of Section1.1)
3x  6 y  5 z  0
 Solution 1 1 2 9 
2 4  3 1
 We convert to the augmented matrix  
3 6  5 0
1 1 2 9 
 to the row-echelon form 0 1  72  172 

0 0 1 3 
 The system corresponding to this matrix is
x  y  2 z  9, y  72 z   172 , z  3
57
Example 6
Gaussian elimination(2/2)
 Solution
 Solving for the leading variables x  9  y  2 z,
y   172  72 z ,
z 3
 Substituting the bottom equation into those above

x  3  y,
y  2,
z 3
 Substituting the 2nd equation into the top

x  1, y  2, z  3
58
Homogeneous Linear Systems(1/2)
 A system of linear equations is said a11 x1  a12 x2  ...  a1n xn  0
to be homogeneous if the constant a21 x1  a22 x2  ...  a2 n xn  0
terms are all zero; that is , the    
system has the form :
am1 x1  am 2 x2  ... amn xn  0
 Every homogeneous system of linear equation is
consistent, since all such system have x1  0, x2  0,..., xn  0
as a solution. This solution is called the trivial solution; if
there are another solutions, they are called nontrivial
solutions.
 There are only two possibilities for its solutions:
 The system has only the trivial solution.
 The system has infinitely many solutions in addition to the
trivial solution.

59
Homogeneous Linear Systems(2/2)
 In a special case of a
homogeneous linear
system of two linear
equations in two
unknowns: (fig1.2.1)

a1 x  b1 y  0 (a1 , b1 not both zero)


a2 x  b2 y  0 (a2 , b2 not both zero)

60
Example 7
Gauss-Jordan Elimination(1/3)
2 x1  2 x2  x3  x5  0
 Solve the following
homogeneous system of linear  x1  x2  2 x3  3 x4  x5  0
equations by using Gauss- x1  x2  2 x3  x5  0
Jordan elimination. x3  x4  x5  0

 Solution
 2 2 1 0 1 0
 The augmented matrix  1  1 2  3 1 0

 1 1  2 0 1 0
 
0 0 0 1 0 0

 Reducing this matrix to 1 1 0 0 1 0


reduced row-echelon form 0 0 1 0 1 0

0 0 0 1 0 0
 
0 0 0 0 0 0
61
Example 7
Gauss-Jordan Elimination(2/3)
Solution (cont)
 The corresponding system of equation x1  x2  x5  0
x3  x5  0
x4 0
 Solving for the leading variables is x1   x2  x5
x3   x5
x4  0
 Thus the general solution is
x1   s  t , x2  s, x3  t , x4  0, x5  t
 Note: the trivial solution is obtained when s=t=0.
62
Example7
Gauss-Jordan Elimination(3/3)
 Two important points:
 None of the three row operations alters the final column
of zero, so the system of equations corresponding to the
reduced row-echelon form of the augmented matrix must
also be a homogeneous system.
 If the given homogeneous system has m equations in n
unknowns with m<n, and there are r nonzero rows in
reduced row-echelon form of the augmented matrix, we
will have r<n. It will have the form:
 xk 1   ()  0 xk 1   ()

 xk 2   ()  0 xk 2   ()
  
xr   ()  0 (1) xr   () (2)

63
Theorem 1.2.1
A homogeneous system of linear
equations with more unknowns than
equations has infinitely many solutions.

 Note: theorem 1.2.1 applies only to


homogeneous system
 Example 7 (3/3)

64
Computer Solution of Linear System
 Most computer algorithms for solving large linear
systems are based on Gaussian elimination or
Gauss-Jordan elimination.
 Issues
 Reducing roundoff errors
 Minimizing the use of computer memory space
 Solving the system with maximum speed

65
Matrix Products as Linear
Combinations (1/2)

66
Matrix Products as Linear
Combinations (2/2)

 In words, (10)tells us that the product A x of a matrix


A with a column matrix x is a linear combination of
the column matrices of A with the coefficients coming
from the matrix x .

67
Example 8
Linear Combination

68
Example 9
Columns of a Product AB as Linear
Combinations

69
Matrix form of a Linear System(1/2)

 Consider any system of m a11 x1  a12 x2  ...  a1n xn  b1


a21 x1  a22 x2  ...  a2 n xn  b2
linear equations in n unknowns.
   
am1 x1  am 2 x2  ... amn xn  bm
 Since two matrices are equal if
a11 x1  a12 x2  ...  a1n xn  b1 
a x  a x  ...  a x  b 
and only if their corresponding  21 1 22 2 2n n  2
      
entries are equal.    
am1 x1  am 2 x2  ... amn xn  bm 

 The m×1 matrix on the left side a11 a12 ... a1n   x1  b1 
a a ... a   x  b 
of this equation can be written  21 22 2n   2 
 2
        
as a product to give:     
 m1 m 2
a a ... a mn   xm  bm 
70
Matrix form of a Linear System(1/2)
 If w designate these matrices by A ,x ,and b ,respectively,
the original system of m equations in n unknowns has
been replaced by the single matrix equation
 The matrix A in this equation is called the coefficient
matrix of the system. The augmented matrix for the
system is obtained by adjoining b to A as the last column;
thus the augmented matrix is

71

You might also like