0% found this document useful (0 votes)
57 views26 pages

AI-ML Class-04

The document summarizes key concepts about systems of linear equations. It defines a system of linear equations as finding the intersection of two lines geometrically. It explains that a system can have no solution, one solution, or infinitely many solutions. Elementary row operations are described as methods to put a system in echelon or reduced row echelon form to solve for variables. Pivot positions indicate basic variables while non-pivot columns represent free variables.

Uploaded by

Mihir Patel
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)
57 views26 pages

AI-ML Class-04

The document summarizes key concepts about systems of linear equations. It defines a system of linear equations as finding the intersection of two lines geometrically. It explains that a system can have no solution, one solution, or infinitely many solutions. Elementary row operations are described as methods to put a system in echelon or reduced row echelon form to solve for variables. Pivot positions indicate basic variables while non-pivot columns represent free variables.

Uploaded by

Mihir Patel
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/ 26

System of Two linear Equations in Two variables

Illustration
Consider x1 − 2x2 = −1
−x1 + 3x2 = 3
This linear system has a single solution (3, 2). Geometrically it amounts to
find the intersection of 2 lines.

Dr. Sabitha D’Souza August 25, 2022 1 / 22


Example

Dr. Sabitha D’Souza August 25, 2022 2 / 22


Dr. Sabitha D’Souza August 25, 2022 3 / 22
Note

• Every system of linear equations has either no solution, exactly one


solution or infinitely many solutions

• A system of linear equations that has one or more solutions is called


consistent; otherwise the system is called inconsistent.

Dr. Sabitha D’Souza August 25, 2022 4 / 22


Elementary Row operations

• Interchange operation:Interchange of any two rows of the matrix-


denoted as Ri ⇐⇒ Rj

• Scaling operation: Multiply every entry of some row of the matrix


by the some non-zero scalar.-denoted as Ri =⇒ cRi

• Row addition operation:Add a multiple of one row of the matrix to


another row- denoted as Ri =⇒ Ri + cRj

Dr. Sabitha D’Souza August 25, 2022 5 / 22


Matrix notation of linear system of equations

Consider the linear system


a11 x1 + a12 x2 + . . . + a1n xn = b1
a21 x1 + a22 x2 + . . . + a2n xn = b2
..
.
am1 x1 + am2 x2 + . . . + amn xn = bm
It
 can be expressed as     
a11 a12 . . . a1n x1 b1
    
 a21 a22 . . . a2n  x2  b2 
    
 .. .. ..   ..  =  .. 
    
 . . ... .  .   . 
    
am1 am2 . . . amn xn bn
Dr. Sabitha D’Souza August 25, 2022 6 / 22
ie. Ax = b where A = (aij )m×n is called the coefficient matrix,
   
x1 b1
   
 x2  b2 
   
x =  ..  is the unknown vector and b =  ..  is the known vector.
  
. .
   
xn bn
An Augmented matrix of a system consists of the coefficient matrix with
an added column containing the constants from the RHS of the equations.
It is denoted by [A b].

Dr. Sabitha D’Souza August 25, 2022 7 / 22


Example
For the system of equations
x1 + 5x3 − x4 = 7
2x1 −x2 + 6x3 = −8, 
1 0 5 −1
A=  is the coefficient matrix
2 −1 6 0
 
1 0 5 −1 7
[A b] =   is the augmented matrix
2 −1 6 0 −8

Dr. Sabitha D’Souza August 25, 2022 8 / 22


Note

• Two systems of linear equations that have exactly the same solutions
are called Equivalent.

• Suppose [A′ b ′ ] is a new matrix got by applying elementary row


operations on [A b]. Then the solution set of Ax = b is same as
those of A′ x = b ′ .

• Each elementary row operation produces the augmented matrix of an


equivalent system of linear equations.

Dr. Sabitha D’Souza August 25, 2022 9 / 22


Echelon form

• A row of a matrix is called a Zero row if all its entries are 0;


otherwise it is a non-zero row.

• The left most nonzero entry of a nonzero row is its leading entry.
• A matrix is said to be in row echelon form if it satisfies the following
3 conditions
a Each non zero row lies above every zero row.
b The leading entry of a nonzero row lies in a column to the right of the
column containing the leading entry of any preceding row.
c If a column contains the leading entry of some row, then all entries of
that column below the leading entry are 0.
Dr. Sabitha D’Souza August 25, 2022 10 / 22
Reduced row echelon form

If a matrix also satisfies 2 additional conditions, then we say that it is in


reduced row echelon form.
(a) If a column contains the leading entry of some row, then all the other
entries of that column are 0.
(b) The leading entry of each non-zero row is 1.
  1 0 ∗ ∗ 0 0 ∗
1 ∗ 0 0 ∗  
  0 1 ∗ ∗ 0 0

∗

0 0 1 0 ∗ 
  
,  ∗ ∗ is an arbitrary entry.

 0 0 0 0 1 0

0 0 1 ∗ 

0 
   0 0 0 0 0 1 ∗

0 0 0 0 0  
0 0 0 0 0 0 0
Dr. Sabitha D’Souza August 25, 2022 11 / 22
Example
 
1 0 0 6 3 0
 
0 0 1 5 7 0
 
 
 
0 1 0 2 4 0
 
0 0 0 0 0 0
Is it an echelon form?
No. Since the leading entry of row 3 lies in a column left of the column 3.

Dr. Sabitha D’Souza August 25, 2022 12 / 22


Pivot positions, Basic variables and Free variables

• A Pivot position in a matrix A is a location in A that corresponds to


a leading 1 in the reduced echelon form of A.

• A Pivot column is a column of A that contains a pivot position

• The variables corresponding to pivot columns in an echelon matrix are


called Basic variables.

• The variables corresponding to non-pivot columns are called Free


variables.

Dr. Sabitha D’Souza August 25, 2022 13 / 22


Example
Consider the system of linear equations
x1 − 5x3 = 1
x2 + x3 = 4

x1 x2 x3 b
1 0 −5 1
  Here x1 , x2 are basic variables and x3 is free variable.
0 1 1 4

Dr. Sabitha D’Souza August 25, 2022 14 / 22


A system of linear equations can be easily solved if its augmented matrix
[A b] is in reduced row echelon form. Whenever a system is consistent,
the solution set can be described explicitly by solving the reduced system
of equations for the basic variables in terms of the free variables.

Dr. Sabitha D’Souza August 25, 2022 15 / 22


Example
Consider
 the augmented matrix of the system
1 −3 0 2 0 7
 
0 0 1 6 0 9
 
 
 
0 0 0 0 1 2
 
0 0 0 0 0 0
x1 , x2 , x3 are basic variables ; x2 , x4 are free variables.

Dr. Sabitha D’Souza August 25, 2022 16 / 22


Example
Consider
 the augmented matrix of the system
1 −3 0 2 0 7
 
0 0 1 6 0 9
 
 
 
0 0 0 0 1 2
 
0 0 0 0 0 0
x1 , x2 , x3 are basic variables ; x2 , x4 are free variables.
Re write the equations as x1 − 3x2 + 2x4 = 7 =⇒ x1 = 7 + 3x2 − 2x4
x2 is free
x3 + 6x4 = 9 =⇒ x3 = 9 − 6x4
x4 free
x5 = 2
0=0
Dr. Sabitha D’Souza August 25, 2022 16 / 22
The
 general
 solution canalsobe written
 in
 vector
 form

x1 7 + 3x2 − 2x4 7 3 −2
         
x2   x2  0 1 0
         
         
x3  =  9 − 6x4  = 9 + x2 0 + x4 −6
         
         
         
x4   x4  0 0 1
         
x5 2 2 0 0

Dr. Sabitha D’Souza August 25, 2022 17 / 22


The
 general
 solution canalsobe written
 in vector
 form

x1 7 + 3x2 − 2x4 7 3 −2
         
x2   x2  0 1 0
         
         
x3  =  9 − 6x4  = 9 + x2 0 + x4 −6
         
         
         
x4   x4  0 0 1
         
x5 2 2 0 0
   
x1 −1
   
x2  −2
   
   
Put x2 = −2,x4 = 1. Then x3  =  3  is a particular solution.
   
   
   
x4   1 
   
x5 2

Dr. Sabitha D’Souza August 25, 2022 17 / 22


Note

1 Every solution of the above system is the sum of [7 0 9 0 2]T and an


arbitrary linear combination of the vectors [3 1 0 0 0]T and
[−2 0 − 6 1 0]T with the coefficients being the free variables x2 and
x4 respectively.

Dr. Sabitha D’Souza August 25, 2022 18 / 22


Note

1 Every solution of the above system is the sum of [7 0 9 0 2]T and an


arbitrary linear combination of the vectors [3 1 0 0 0]T and
[−2 0 − 6 1 0]T with the coefficients being the free variables x2 and
x4 respectively.
2 Whenever an augmented matrix contains a row in which the
only non-zero entry lies in the last column, the corresponding
system of linear equations has no solution.

Dr. Sabitha D’Souza August 25, 2022 18 / 22


Note

1 Every solution of the above system is the sum of [7 0 9 0 2]T and an


arbitrary linear combination of the vectors [3 1 0 0 0]T and
[−2 0 − 6 1 0]T with the coefficients being the free variables x2 and
x4 respectively.
2 Whenever an augmented matrix contains a row in which the
only non-zero entry lies in the last column, the corresponding
system of linear equations has no solution.
3 Every matrix can be transformed into one and only one matrix in
reduced row echelon form by means of a sequence of elementary row
operations.
Dr. Sabitha D’Souza August 25, 2022 18 / 22
Procedure for solving a system of linear equations

1 Write the augmented matrix [A b] of the system.

2 Find the reduced echelon form [R c] of [A b].

3 If [R c] contains a row in which the only non zero entry lies in the last
column, then Ax = b has no solution. Otherwise, the system has at
least one solution. Write the system of linear equations corresponding
to the matrix [R c] and solve this system for the basic variables in
terms of the free variables to obtain a general solution of Ax = b.

Dr. Sabitha D’Souza August 25, 2022 19 / 22


Problems

Solve the following system of linear equations


1) x1 + 2x2 − x3 + 2x4 + x5 = 2
−x1 − 2x2 + x3 + 2x4 + 3x5 = 6
2x1 + 4x2 − 3x3 + 2x4 = 3
−3x1 − 6x2 + 2x3 + 3x5 = 9
Ans:[−5 + x5 − 2x2 , x2 , −3, 2, x5 ]T

Dr. Sabitha D’Souza August 25, 2022 20 / 22


2) x1 − x2 − 3x3 + x4 − x5 = −2
−2x1 + 2X2 + 6x3 − 6x5 = −6
3x1 − 2x2 − 8x3 + 3x4 − 5x5 = −7
Ans:[2 + 2x3 − x5 , −1 − x3 + 2x5 , x3 , −5 + 4x5 , x5 ]T

Dr. Sabitha D’Souza August 25, 2022 21 / 22


Practice problems

Determine whether the given system is consistent and if so, find its general
solution
i x1 + 3x2 + x3 + x4 = −1
−2x3 − 6x2 − x3 = 5
x1 + 3x2 + 2x3 + 3x4 = 2
ii x1 − x2 + x4 = −4
x1 − x2 + 2x4 + 2x5 = −5
3x1 − 3x2 + 2x4 − 2x5 = −11
iii x1 − x2 + x3 = 7, x1 − 2x2 − x3 = 8,
2x1 − x3 = 10 −x1 − 4x2 − x3 = 2
Dr. Sabitha D’Souza August 25, 2022 22 / 22

You might also like