You are on page 1of 24

Course Code: As 222

Course Title: Linear Algebra

Class Day: Timing:

Lecture / Week No. 3rd

Instructor Name:

Department of Computer Science


Contents

1. System Of Linear Equation


2. Homogenous
3. Non homogenous
Reference No. 1 Topic: System Of Linear Equation
1.1 Introduction to Systems of Linear Equations
a linear equation in n variables:
a1 x1+a2 x2 + a3 x3 + + an xn =b
a1,a2,a3,…,an, b: real number

a1:leading coefficient

x1:leading variable
Notes:
(1) Linear equations have no products or roots of variables and
no variables involved in trigonometric, exponential, or
logarithmic functions.

(2) Variables appear only to the first power.


Reference No. 1 Topic: System Of Linear Equation

Notes:

Every system of linear equations has either


(1) exactly one solution,
(2) infinitely many solutions, or
(3) no solution.
Reference No. 1 Topic: System Of Linear Equation

Equivalent:
Two systems of linear equations are called equivalent
if they have precisely the same solution set.

Notes:
Each of the following operations on a system of linear
equations produces an equivalent system.
(1) Interchange two equations.
(2) Multiply an equation by a nonzero constant.

(3) Add a multiple of an equation to another equation.


Reference No. 1 Topic: System Of Linear Equation
1.2 Gaussian Elimination and Gauss-Jordan Elimination
mn matrix:
 a11 a12 a13 a1n 
 a21 a22 a23 a2n 
a a a a3n  m rows
 31 32 33

a 
 m1 am2 am3 amn 
n columns
Notes:
(1) Every entry aij in a matrix is a number.
(2) A matrix with m rows and n columns is said to be of size
m(3)nIf. m = n , then the matrix is called square of order n.
(4) For a square matrix, the entries a11, a22, …, ann are called
the main diagonal entries.
Reference No. 1 Topic: System Of Linear Equation

Ex 1: Matrix Size
[2] 11
0 0
0 0 22

1 − 3 0 1 
 1 4
2
 e 
2 2 3 2
−7 4 
Note:
One very common use of matrices is to represent a system
of linear equations.
Reference No. 1 Topic: System Of Linear Equation

a system of m equations in n variables:


a11 x1 + a12 x2 + a13 x3 + + a1n xn = b1
a21 x1 + a22 x2 + a23 x3 + + a2n xn = b2
a31x1 + a32 x2 + a33 x3 + + a3n xn = b3

am1 x1 + am2 x2 + am3 x3 + + amn xn = bm

Matrix form: Ax = b

 a11 a12 a13 a1n 


 a21 a22 a23 a2n   x1   b1 

A= a a a a  x =  x2  b = b2 

31 32 33 3n
    
a  xn  bm
 m1 am2 am3 amn 
Reference No. 1 Topic: System Of Linear Equation

Augmented matrix:

 a11 a12 a13 a1n b1 


 a21 a22 a23 a2n b2 
a a32 a33 a3n b3  = [ A b]
 
31

a bm 
 m1 am2 am3 amn

Coefficient matrix:

 a11 a12 a13 a1n 


 a21 a22 a23 a2n 
a a32 a33 a3n  = A

31

a 
 m1 am2 am3 amn 
Reference No. 1 Topic: System Of Linear Equation

Elementary row operation:

(1) Interchange two rows. rij : Ri  R j


r ( k ) :(k )R → R
(2) Multiply a row by a nonzero constant. i i i

(3) Add a multiple of a row to another row. rij :(k )Ri + R j → R j


( k)

Row equivalent:
Two matrices are said to be row equivalent if one can be obtained
from the other by a finite sequence of elementary row operation.
Reference No. 1 Topic: System Of Linear Equation

Row-echelon form: (1, 2, 3)


Reduced row-echelon form: (1, 2, 3, 4)

(1) All row consisting entirely of zeros occur at the bottom


of the matrix.
(2) For each row that does not consist entirely of zeros,
the first nonzero entry is 1 (called a leading 1).
(3) For two successive (nonzero) rows, the leading 1 in the higher
row is farther to the left than the leading 1 in the lower row.
(4) Every column that has a leading 1 has zeros in every position
above and below its leading 1.
Reference No. 1 Topic: System Of Linear Equation

Ex 4: (Row-echelon form or reduced row-echelon form)


 1 2 −1 4 (row -echelon 0 1 0 5 (reduced row -
0 1 0 3 0 0 1 3
0 0 1 − 2 form) 0 0 0 0 echelon form)

 1 − 5 2 −1 3 1 0 0 −1
0 0 1 3 −2 (row - echelon 0 1 0 2 (reduced row -
0 0 0 1 4 form) 0 0 1 3 echelon form)
0 0 0 0 1 0 0 0 0

 1 2 − 3 4  1 2 −1 2
0 2 1 −1 0 0 0 0
0 0 1 − 3 0 1 2 − 4
Reference No. 1 Topic: System Of Linear Equation

Gaussian elimination:
The procedure for reducing a matrix to a row-echelon form.
• Gauss-Jordan elimination:
• The procedure for reducing a matrix to a reduced row-echelon fo

Notes:
(1) Every matrix has an unique reduced row echelon
f(o2r)mA. row-echelon form of a given matrix is not unique.

(Different sequences of row operations can produce


different row-echelon forms.)
Reference No. 1 Topic: System Of Linear Equation
(Procedure of Gaussian elimination and
Ex:

Gauss-Jordan elimination)
Produce leading 1
0 0 − 2 0 8 12
r12 2 8 − 6 4 12 28
2 8 − 6 4 12 28 0 0 − 2 0 8 12
   
2 4 − 5 6 −5 4 2 4 − 5 6 − 5 4
The first nonzero column

leading 1 Produce leading 1


( 12)
r1 1 4 − 3 2 6 14 r13( −2) 1 4 − 3 2 6 14
0 0 − 2 0 8 12  0 0 − 2 0 8 12
   
2 4 −5 6 −5 4 0 0 5 0 −17 − 24
Zeros elements below leading 1 The first nonzero Submatrix
column
Reference No. 1 Topic: System Of Linear Equation

leading 1
( −12 ) 1 4 − 3 2 6 14 r23( −5) 1 4 − 3 2 6 14
r 0 0 0 0
2
 1 0 −4 − 6  1 0 − 4 − 6 

0 0 5 0 −17 − 24 0 0 0 0 3 6
Zeros elements below leading 1 Submatrix
Produce leading 1
Zeros elsewhere
1
( )
1 4 − 3 2 6 14 r31(−6) 1 4 − 3 2 0 2
r3 3
0 0 0 0 1 0 − 4 − 6
1 0 − 4 − 6
   
0 0 0 0 1 2 0 0 0 0 1 2
leading 1
(row - echelon form) (row - echelon form)

r32(4)  1 4 − 3 2 0 2  1 4 0 2 0 8
0 0 1 0 0 2
r21(3) 0 0 1 0 0 2
   
0 0 0 0 1 2 0 0 0 0 1 2
(row - echelon form) (reduced row - echelon form)
Reference No. 1 Topic: System Of Linear Equation

Ex 7: Solve a system by Gauss-Jordan elimination method


(only one solution)
x − 2 y + 3z = 9
− x + 3y = −4
2x − 5y + 5z = 17
Sol:
augmented matrix
r23(1)  1 − 2 3 9
 1 − 2 3 9 r12(1) , r13(−2)  1 − 2 3 9
0 
 −1 3 0 − 4 0  1 3 5
 1 3 5
  
 2 − 5 5 17 0 −1 −1 −1 0 0 2 4
(1)
r 2  1 − 2 3 9 r21(2) , r32(−3) , r31(−9)  1 0 0 1 x = 1
0 1 0 −1
3
0 1 3 5 y = −1
0 0 1 2 0 0 1 2 z = 2
(row - echelon form) (reduced row - echelon form)
Reference No. 1 Topic: System Of Linear Equation

Ex 8 : Solve a system by Gauss-Jordan elimination method


(infinitely many solutions)
2x1 + 4x1 − 2x3 = 0
3x1 + 5x2 = 1
Sol: augmented matrix
( 12) (−3) (−1) (−2)
2 4 − 2 0 1 12 2
r ,r ,r ,r21  1 0 5 2 (reduced row -
3 5 0 1 0 1 − 3 − 1echelonform)

the corresponding system of equations is


x1 + 5x3 = 2
x2 − 3x3 = −1
leading variable:x1 , x2
free variable:x3
Reference No. 1 Topic: System Of Linear Equation

x1 = 2 − 5x3
x2 = −1 + 3x3

Let x3 = t
x1 = 2 − 5t,
x2 = −1+ 3t, tR
x3 = t,

So this system has infinitely many solutions.


Reference No. 1 Topic: System Of Linear Equation

Homogeneous systems of linear equations:


A system of linear equations is said to be homogeneous
if all the constant terms are zero.

a11 x1 + a12 x2 + a13 x3 + + a1n xn = 0


a21 x1 + a22 x2 + a23 x3 + + a2n xn = 0
a31 x1 + a32 x2 + a33 x3 + + a3n xn = 0

am1 x1 + am2 x2 + am3 x3 + + amn xn = 0


Reference No. 1 Topic: System Of Linear Equation

Trivial solution:
x1 = x2 = x3 = = xn = 0

Nontrivial solution:
other solutions
Notes:
(1) Every homogeneous system of linear equations is consistent.
(2)If the homogenous system has fewer equations than
variables,
(a) The system has only the trivial solution.
(b) The system has infinitely many nontrivial solutions in
addition to the trivial solution.
Reference No. 1 Topic: System Of Linear Equation

Ex 9: Solve the following homogeneous system


x1 − x2 + 3x3 = 0
2x1 + x2 + 3x3 = 0
Sol: augmented matrix
(−2) ( 13)
 1 −1 3 0 r12 , r ,r21(1)
2  1 0 2 0 (reduced row -
2 1 3 0 0 1 −1 0echelon form)
leading variable:x1 , x2
free variable:x3
Let x3 = t
x1 = −2t, x2 = t, x3 = t, t  R
When t = 0, x1 = x2 = x3 = 0 (trivial solution)
Reference No. 1 Topic: System Of Linear Equation
Homogeneous Nonhomogeneous
3x1 + 5x2 − 4x3 = 0 3x1 + 5x2 − 4x3 =7
− 3x − 2x + 4x = 0 
 1 2 3 − 3x1 − 2x 2 + 4x3 = −1
 6x + x − 8x =−4
6x1 + x2 − 8x3 = 0  1 2 3


 1
-4 
0  -4 

0
  1 0 -1
 3   3 


  
 0 1 0 0  
 0 1 0 2

 0 0 0 0 
x = − 4 x  0 
 0 0 0
 1 3
3 x = − x −1
4
  1 3
 x2 = 0 
3
x = free x2 = 2
 3 
 x3 = free

 x1  − 4 / 3
 x1  −1 − 4 / 3
x  = x  0  x  =  2  + x  0 
 2 3   2    3 
x3   1   x3   0   1 
Reference No. 1 Topic: System Of Linear Equation
Solutions of Nonhomogeneous Systems
Example 3: Describe all solutions for 3x1 + 5x2 − 4x3 = 7
− 3x − 2x + 4x = −1
 1 2 3
6x + x − 8x = −4
 1 2 3

i.e. Describe all solutions of Ax = where

 7
 3 5 −4  
A = −3 −2 4 
and b = −1
6 1 −8 −4
References / Resources

• All Material is taken from text book Linear algebra and its applications by David C
Lay 4th edition

You might also like