0% found this document useful (0 votes)
9 views113 pages

MTH301_Chapter_2___2_1__2_2_

The document discusses methods for solving linear systems, focusing on matrix operations such as Gaussian elimination and row echelon form (REF). It defines key concepts like leading entries, elementary row operations, and the rank of a matrix, providing examples and theorems related to these topics. The document serves as a comprehensive guide for understanding and applying techniques for linear algebra problems.
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)
9 views113 pages

MTH301_Chapter_2___2_1__2_2_

The document discusses methods for solving linear systems, focusing on matrix operations such as Gaussian elimination and row echelon form (REF). It defines key concepts like leading entries, elementary row operations, and the rank of a matrix, providing examples and theorems related to these topics. The document serves as a comprehensive guide for understanding and applying techniques for linear algebra problems.
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/ 113

Solving linear Systems

Z. ABBAS

LAU

January 30, 2024

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 1 / 41


Contents

1 Echelon form of a matrix

2 Gaussian elimination with back substitution


Backward substitution
Overdetermined Systems
Under-determined Systems
Homogeneous systems
Reduced row echelon form, RREF

3 Gauss-Jordan Reduction

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 2 / 41


Definition
• The leading entry/coefficient of a row (resp. column) in a matrix is
the first nonzero entry in that row (resp. column).
• If the leading entry is equal to one we call it a leading 1.

Example:
In the matrix  
1 0
2 0 
0 2
the leading entries of 1st row, 2nd row and 3rd row are respectively:
1, 2 and 2.

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 3 / 41


R.E.F

Definition
a matrix A = (ai,j ) is said to be in row echelon form if A=0 or A ̸= 0 and
• All zero rows are placed at the bottom of A.
• Each leading entry of a row is to the right of the leading entry of the
preceding row.
• Each leading entry is one.

Remark: the last condition is an additional condition it depends on


the book used.

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 4 / 41


Question 1-A
1
 
1 4 2
0 3 6
A: not r.e.f because the leading entry of the second row is not 1
(Remark that such a matrix is regarded as r.e.f if we disregard the
third condition in the definition).
2
 
1 4 6 4
0 0 0 0
0 0 1 0
not r.e.f since a zero row is not placed at the bottom.
3
 
0 1 0 0 0
0 0 1 0 1
0 0 1 0 0
Not row echelon form the leading 1 of the third row is not to the
right of the leading 1 of row 2.
Z. ABBAS (LAU) Solving linear Systems January 30, 2024 5 / 41
Question 1-B

The following matrices are in r.e.f:


1
 
1 4 2
0 1 3
0 0 1
2
 
1 4 6 4
0 0 1 0
0 0 0 0
3
 
0 1 0 0 0 0
0 0 1 0 0 0
0 0 0 0 1 0

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 6 / 41


Elementary row operations

Definition
The Elementary Row Operation that we can apply on a matrix are:
1 Type I: interchange two rows: Rt ↔ Rs .
2 Type II: multiply a row with a nonzero constant αRt → Rt .
3 Type III: add a multiple of a row to another row Rt + αRs → Rt .

Remark that in Question 1-A, performing the following operations to each


matrix will lead to a matrix in row-echelon form:
1
1
3 R2 → R2 .
2 R2 ↔ R3 .
3 R3 − R2 → R3 then −R3 → R3 .
Also remark that we can use the following operation: aRt + bRs → Rt
where a is a non zero number.

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 7 / 41


Definition
Let A be a (m × n) matrix. A matrix B is said to be row-equivalent to A if
it’s obtained from A by a finite number of row operations.

Theorem
Every (m × n) matrix is row-equivalent to a matrix in row echelon
form.
Remarks:
Row echelon forms are not unique.
By analogy we can define column elementary operations and column
echelon forms; indeed a matrix is said to be in column e.f iff its
transpose is in r.e.f.

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 8 / 41


Remark: To get a r.e.f of any matrix,, you are allowed to use any kind of
elementary row operations, and you can choose those that simplifies your
work and calculation.

In the next slide we show that following few steps you’ll obtain a r.e.f of
any matrix A, an example is also given in the next slides with the same
steps followed. As mentioned in the remark, we might use different order
and different operations as you will see in other examples.

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 9 / 41


Gaussian elimination

To obtain a r.e.f of a given (m × n) matrix A = (aij ) it’s enough to follow


the following steps:
1 Find the first nonzero column of the matrix(pivot column) and the
first nonzero element in this column (pivot), atj .
Perfom R1 ↔ Rt .
2 The leading term of first row of the new obtained matrix B = (bij ) is
now b1j ̸= 0. Perform b11j R1 → R1 to get a leading one in first row.
3 In the new obtained matrix C = (cij ) and to eliminate all the entries
below the leading 1 one of the first row c1,j = 1:
Perform Rs − cs,j R1 → Rs to each row below the first row.
4 Now repeat the same procedure for the (m − 1 × n) matrix obtained
by deleting the first from the last matrix D obtained after third step.
5 Repeat till you get a R.E.F of A.

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 10 / 41


1

1
Ref:pg90, Elementary Linear algebra with applications- Bernard Kolman, David Hill
Z. ABBAS (LAU) Solving linear Systems January 30, 2024 11 / 41
2

2
Ref: pg90, Elementary Linear algebra with applications- Bernard Kolman, David Hill
Z. ABBAS (LAU) Solving linear Systems January 30, 2024 12 / 41
3

3
Ref: pg91, Elementary Linear algebra with applications- Bernard Kolman, David Hill
Z. ABBAS (LAU) Solving linear Systems January 30, 2024 13 / 41
4

4
Ref: pg91, Elementary Linear algebra with applications- Bernard Kolman, David Hill
Z. ABBAS (LAU) Solving linear Systems January 30, 2024 14 / 41
5

5
Ref: pg92, Elementary Linear algebra with applications- Bernard Kolman, David Hill
Z. ABBAS (LAU) Solving linear Systems January 30, 2024 15 / 41
Rank of a matrix

Definition
Rank The rank of a matrix is the number of non zero rows in a row
echelon form of this matrix.

Example
Find the rank of the following Matrix
 
1 −2 3 9
A = −1 3 0 −4
2 −5 5 17

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 16 / 41


Example

Let us find a R.E.F of the following Matrix. We have :


 
1 −2 3 9
A = −1 3 0 −4 R1 + R2 −→ R2 =⇒
2 −5 5 17

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 17 / 41


Example

Let us find a R.E.F of the following Matrix. We have :


   
1 −2 3 9 1 −2 3 9
A = −1 3 0 −4 R1 + R2 −→ R2 =⇒ A1 = 0 1 3 5 
2 −5 5 17 2 −5 5 17

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 17 / 41


Example

Let us find a R.E.F of the following Matrix. We have :


   
1 −2 3 9 1 −2 3 9
A = −1 3 0 −4 R1 + R2 −→ R2 =⇒ A1 = 0 1 3 5 
2 −5 5 17 2 −5 5 17

 
1 −2 3 9
A1 = 0 1 3 5  R3 − 2R1 −→ R3 =⇒
2 −5 5 17

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 17 / 41


Example

Let us find a R.E.F of the following Matrix. We have :


   
1 −2 3 9 1 −2 3 9
A = −1 3 0 −4 R1 + R2 −→ R2 =⇒ A1 = 0 1 3 5 
2 −5 5 17 2 −5 5 17

   
1 −2 3 9 1 −2 3 9
A1 = 0 1 3 5  R3 − 2R1 −→ R3 =⇒ A2 = 0 1 3 5
2 −5 5 17 0 −1 −1 −1

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 17 / 41


 
1 −2 3 9
A2 = 0 1 3 5
0 −1 −1 −1

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 18 / 41


 
1 −2 3 9
A2 = 0 1 3 5 R3 + R2 −→ R3
0 −1 −1 −1

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 18 / 41


   
1 −2 3 9 1 −2 3 9
A2 = 0 1 3 5 R3 + R2 −→ R3 =⇒ A3 = 0 1 3 5
0 −1 −1 −1 0 0 2 4

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 18 / 41


   
1 −2 3 9 1 −2 3 9
A2 = 0 1 3 5 R3 + R2 −→ R3 =⇒ A3 = 0 1 3 5
0 −1 −1 −1 0 0 2 4

 
1 −2 3 9
A3 = 0 1 3 5
0 0 2 4

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 18 / 41


   
1 −2 3 9 1 −2 3 9
A2 = 0 1 3 5 R3 + R2 −→ R3 =⇒ A3 = 0 1 3 5
0 −1 −1 −1 0 0 2 4

   
1 −2 3 9 1 −2 3 9
1
A3 = 0 1 3 5 R2 −→ R2 =⇒ A4 = 0 1 3 5
2
0 0 2 4 0 0 1 2

The rank of the matrix is 3. Remark that in example 5 of the book the ran
was 3 as well.
Remarks:Rank(A)=Rank(AT )≤ min{m, n}.

How can we benefit from REF to solve systems of Linear Equations?

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 18 / 41


Definition (Augmented Matrix)
Consider the system of equations

 a11 x1 + a12 x2 + ... + a1n xn = b1 ,




 a21 x1 + a22 x2 + ... + a2n xn = b2 ,
.

(S) :

 .
.





am1 x1 + am2 x2 + ... + amn xn = bm ,

The Augmented matrix of S is:


 
a11 a12 ... a1n : b1
 a21 a22 ... a2n : b2 
 
 .. .. 
 . : . 
am1 am2 ... amn : bm

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 19 / 41


Strategy
To solve a system of Linear equation using Gaussian Elimination with
back substitution, we apply the following steps:
a) Write the Augmented Matrix associated to the system.
b) Apply the Elementary Row Operation in order to transform the
Augmented Matrix to Row Echelon Form - REF.
c) Write the equivalent system associated to the REF Matrix.
d) Use substitution method to solve the obtained system.

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 20 / 41


1 Echelon form of a matrix

2 Gaussian elimination with back substitution


Backward substitution
Overdetermined Systems
Under-determined Systems
Homogeneous systems
Reduced row echelon form, RREF

3 Gauss-Jordan Reduction

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 21 / 41


Definition
A linear System is said to be Overdetermined if there are more equations
than unknowns, m > n. Overdetermined systems are usually (but not
always) inconsistent.

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 22 / 41


Example
Solve the following systems:
a) 
 x1 +x2 = 1,
x1 −x2 = 3,
−x1 +2x2 = −2.

Solution:
 .. 
1. 1 1

A= .. 
 1 −1 . 3 

..
−1 2 . −2

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 23 / 41


Example
Solve the following systems:
a) 
 x1 +x2 = 1,
x1 −x2 = 3,
−x1 +2x2 = −2.

Solution:
 .. 
1. 1 1

A= .. 
 R2 − R1 −→ R2
 1 −1 . 3 
..
−1 2 . −2

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 23 / 41


Example
Solve the following systems:
a) 
 x1 +x2 = 1,
x1 −x2 = 3,
−x1 +2x2 = −2.

Solution:
 .. 
1. 1 1
 
1 1 1
 .. 
 1 −1 . 3  R2 − R1 −→ R2 =⇒ 0 −2 2
A=   
. −1 2 −2
−1 2 .. −2
 
1 1 1
 0 −2 2  R3 + R1 −→ R3
−1 2 −2

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 23 / 41


Example
Solve the following systems:
a) 
 x1 +x2 = 1,
x1 −x2 = 3,
−x1 +2x2 = −2.

Solution:
 .. 
1. 1 1
 
1 1 1
 .. 
 1 −1 . 3  R2 − R1 −→ R2 =⇒ 0 −2 2
A=   
. −1 2 −2
−1 2 .. −2
   
1 1 1 1 1 1
 0 −2 2  R3 + R1 −→ R3 =⇒ 0 −2 2 
−1 2 −2 0 3 −1

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 23 / 41


Example
 
1 1 1
0 −2 2 
0 3 −1

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 24 / 41


Example
 
1 1 1
0 −2 2  R2 × − 1
2
0 3 −1

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 24 / 41


Example
   
1 1 1 1 1 1
0 −2 2  R2 × − 1 −→ R2 =⇒ 0 1 −1
2
0 3 −1 0 3 −1

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 24 / 41


Example
   
1 1 1 1 1 1
0 −2 2  R2 × − 1 −→ R2 =⇒ 0 1 −1
2
0 3 −1 0 3 −1

 
1 1 1
0 1 −1
0 3 −1

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 24 / 41


Example
   
1 1 1 1 1 1
0 −2 2  R2 × − 1 −→ R2 =⇒ 0 1 −1
2
0 3 −1 0 3 −1

 
1 1 1
0 1 −1 R3 − 3R2 −→ R3
0 3 −1

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 24 / 41


Example
   
1 1 1 1 1 1
0 −2 2  R2 × − 1 −→ R2 =⇒ 0 1 −1
2
0 3 −1 0 3 −1

   
1 1 1 1 1 1
0 1 −1 R3 − 3R2 −→ R3 =⇒ 0 1 −1
0 3 −1 0 0 2

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 24 / 41


Example
   
1 1 1 1 1 1
0 −2 2  R2 × − 1 −→ R2 =⇒ 0 1 −1
2
0 3 −1 0 3 −1

   
1 1 1 1 1 1
0 1 −1 R3 − 3R2 −→ R3 =⇒ 0 1 −1
0 3 −1 0 0 2

 
1 1 1
0 1 −1
0 0 2

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 24 / 41


Example
   
1 1 1 1 1 1
0 −2 2  R2 × − 1 −→ R2 =⇒ 0 1 −1
2
0 3 −1 0 3 −1

   
1 1 1 1 1 1
0 1 −1 R3 − 3R2 −→ R3 =⇒ 0 1 −1
0 3 −1 0 0 2

 
1 1 1
0 1 −1 R3 × 1 −→ R3 =⇒
2
0 0 2

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 24 / 41


Example
   
1 1 1 1 1 1
0 −2 2  R2 × − 1 −→ R2 =⇒ 0 1 −1
2
0 3 −1 0 3 −1

   
1 1 1 1 1 1
0 1 −1 R3 − 3R2 −→ R3 =⇒ 0 1 −1
0 3 −1 0 0 2

   
1 1 1 1 1 1
0 1 −1 R3 × 1 −→ R3 =⇒ 0 1 −1
2
0 0 2 0 0 1

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 24 / 41


Example
Step 3:
 . 
1 1 .. 1

x1 +x2 = 1,
0 1 ... −1 =⇒
 
  x2 = −1,
. 0 = 1.

0 0 .. 1

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 25 / 41


Example
Step 3:
 . 
1 1 .. 1

x1 +x2 = 1,
0 1 ... −1 =⇒
 
  x2 = −1,
. 0 = 1. X

0 0 .. 1

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 25 / 41


Example
Step 3:
 . 
1 1 .. 1

x1 +x2 = 1,
0 1 ... −1 =⇒
 
  x2 = −1,
. 0 = 1. X False Statement

0 0 .. 1

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 25 / 41


Example
Step 3:
 . 
1 1 .. 1

x1 +x2 = 1,
0 1 ... −1 =⇒
 
  x2 = −1,
. 0 = 1. X False Statement

0 0 .. 1

The system has no solution. The system is inconsistent.


b) 

 x1 +2x2 +x3 = 1,
2x1 −x2 +x3 = 2,

4x +3x2 +3x3 = 4,
 1


2x1 −x2 +3x3 = 5.
Solution:

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 25 / 41


Example
 
1 2 1 1
2 −1 1 2
4 3 3 4REF
 

2 −1 3 5

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 26 / 41


Example
   
1 2 1 1 1 2 1 1
2 −1 1 2 0 1 15 0
4 3 3 4REF =⇒ 0
   3

0 1 2
2 −1 3 5 0 0 0 0

 
1 2 1 1
0 1 15 0
3  =⇒
 
0 0 1 2
0 0 0 0

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 26 / 41


Example
   
1 2 1 1 1 2 1 1
2 −1 1 2 0 1 15 0
4 3 3 4REF =⇒ 0
   3

0 1 2
2 −1 3 5 0 0 0 0

  
1 2 1 1 x1 +2x2 +x3 = 1,
1 15 + 51 x3

0 0

x2 = 0,
3  =⇒
 
0 0 1 2 
 x3 = 23 ,
0 0 0 0 0 = 0.

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 26 / 41


Example
   
1 2 1 1 1 2 1 1
2 −1 1 2 0 1 15 0
4 3 3 4REF =⇒ 0
   3

0 1 2
2 −1 3 5 0 0 0 0

  
1 2 1 1 x1 +2x2 +x3 = 1,
1 15 + 51 x3

0 0

x2 = 0,
3  =⇒
 
0 0 1 2 
 x3 = 23 ,
0 0 0 0 0 = 0.

Using Back substitution, we deduce the system has a unique solution


1 3
x1 = 10 , x2 = − 10 and x3 = 32 .

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 26 / 41


Example
c) 

 x1 +2x2 +x3 = 1,
2x1 −x2 +x3 = 2,

4x +3x2 +3x3 = 4,
 1


3x1 +x2 +2x3 = 3.
Solution:

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 27 / 41


Example
c) 

 x1 +2x2 +x3 = 1,
2x1 −x2 +x3 = 2,

4x +3x2 +3x3 = 4,
 1


3x1 +x2 +2x3 = 3.
Solution:  
1 2 1 1
2 −1 1 2
 
4 3 3 4
3 1 2 3

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 27 / 41


Example
c) 

 x1 +2x2 +x3 = 1,
2x1 −x2 +x3 = 2,

4x +3x2 +3x3 = 4,
 1


3x1 +x2 +2x3 = 3.
Solution:  
1 2 1 1
2 −1 1 2
4 3 3 4REF
 

3 1 2 3

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 27 / 41


Example
c) 

 x1 +2x2 +x3 = 1,
2x1 −x2 +x3 = 2,

4x +3x2 +3x3 = 4,
 1


3x1 +x2 +2x3 = 3.
Solution:  
1 2 1 1
2 −1 1 2
4 3 3 4REF =⇒
 

3 1 2 3

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 27 / 41


Example
c) 

 x1 +2x2 +x3 = 1,
2x1 −x2 +x3 = 2,

4x +3x2 +3x3 = 4,
 1


3x1 +x2 +2x3 = 3.
Solution:    
1 2 1 1 1 2 1 1
2 −1 1 2 0 1 51 0
4 3 3 4REF =⇒ 0
   
0 0 0
3 1 2 3 0 0 0 0

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 27 / 41


Example
c) 

 x1 +2x2 +x3 = 1,
2x1 −x2 +x3 = 2,

4x +3x2 +3x3 = 4,
 1


3x1 +x2 +2x3 = 3.
Solution:    
1 2 1 1 1 2 1 1
2 −1 1 2 0 1 51 0
4 3 3 4REF =⇒ 0
   
0 0 0
3 1 2 3 0 0 0 0
 
1 2 1 1
0 1 1 0
 5 
0 0 0 0
0 0 0 0

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 27 / 41


Example
c) 

 x1 +2x2 +x3 = 1,
2x1 −x2 +x3 = 2,

4x +3x2 +3x3 = 4,
 1


3x1 +x2 +2x3 = 3.
Solution:    
1 2 1 1 1 2 1 1
2 −1 1 2 0 1 51 0
4 3 3 4REF =⇒ 0
   
0 0 0
3 1 2 3 0 0 0 0
  
1 2 1 1 x1 +2x2 +x3 = 1,
0 1 1 0 + 15 x3

x2 = 0,

5
0 0 0 0 =⇒ 
 
 0 = 0,
0 0 0 0 0 = 0.

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 27 / 41


Example
Setting x3 = t ∈ R. Then, the system has an infinite number of
solutions given by
6

x1 = 1 − 10 t,
2
x = − 10 t,
 2
x3 = t.

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 28 / 41


1 Echelon form of a matrix

2 Gaussian elimination with back substitution


Backward substitution
Overdetermined Systems
Under-determined Systems
Homogeneous systems
Reduced row echelon form, RREF

3 Gauss-Jordan Reduction

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 29 / 41


Definition
A system of Linear Equation is said to be under-determined if the
number of equations is less than the number of unknowns, i.e. if m < n.
Under-determined systems are usually (but not always) consistent with
infinitely number of solutions.

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 30 / 41


Definition
A system of Linear Equation is said to be under-determined if the
number of equations is less than the number of unknowns, i.e. if m < n.
Under-determined systems are usually (but not always) consistent with
infinitely number of solutions.

Remark:
It is not possible for an under-determined system to have a unique
solution.

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 30 / 41


Example
a) 
x1 +2x2 +x3 = 1,
2x1 +4x2 +2x3 = 3.
solution:

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 31 / 41


Example
a) 
x1 +2x2 +x3 = 1,
2x1 +4x2 +2x3 = 3.
solution:  
1 2 1 1
REF
2 4 2 3

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 31 / 41


Example
a) 
x1 +2x2 +x3 = 1,
2x1 +4x2 +2x3 = 3.
solution:    
1 2 1 1 1 2 1 1
REF =⇒
2 4 2 3 0 0 0 1

  
1 2 1 1 x +2x2 +x3 = 1,
=⇒ 1
0 0 0 1 0 = 1. X alertFalse Statement

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 31 / 41


Example
a) 
x1 +2x2 +x3 = 1,
2x1 +4x2 +2x3 = 3.
solution:    
1 2 1 1 1 2 1 1
REF =⇒
2 4 2 3 0 0 0 1

  
1 2 1 1 x +2x2 +x3 = 1,
=⇒ 1
0 0 0 1 0 = 1. X alertFalse Statement

The system is inconsistent. The system has no solutions.

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 31 / 41


Example
b) 
x1 +x2 +x3 +x4 +x5 = 2,
x1 +x2 +x3 +2x4 +2x5 = 3,
x1 +x2 +x3 +2x4 +3x5 = 2.

Solution:

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 32 / 41


Example
b) 
x1 +x2 +x3 +x4 +x5 = 2,
x1 +x2 +x3 +2x4 +2x5 = 3,
x1 +x2 +x3 +2x4 +3x5 = 2.

Solution:
 
1 1 1 1 1 2
1 1 1 2 2 3
1 1 1 2 3 2

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 32 / 41


Example
b) 
x1 +x2 +x3 +x4 +x5 = 2,
x1 +x2 +x3 +2x4 +2x5 = 3,
x1 +x2 +x3 +2x4 +3x5 = 2.

Solution:
 
1 1 1 1 1 2
1 1 1 2 2 3REF
1 1 1 2 3 2

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 32 / 41


Example
b) 
x1 +x2 +x3 +x4 +x5 = 2,
x1 +x2 +x3 +2x4 +2x5 = 3,
x1 +x2 +x3 +2x4 +3x5 = 2.

Solution:
   
1 1 1 1 1 2 1 1 1 1 1 2
1 1 1 2 2 3REF =⇒ 0 0 0 1 1 1 
1 1 1 2 3 2 0 0 0 0 1 −1

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 32 / 41


Example
b) 
x1 +x2 +x3 +x4 +x5 = 2,
x1 +x2 +x3 +2x4 +2x5 = 3,
x1 +x2 +x3 +2x4 +3x5 = 2.

Solution:
   
1 1 1 1 1 2 1 1 1 1 1 2
1 1 1 2 2 3REF =⇒ 0 0 0 1 1 1 
1 1 1 2 3 2 0 0 0 0 1 −1

 
1 1 1 1 1 2
0 0 0 1 1 1 
0 0 0 0 1 −1

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 32 / 41


Example
b) 
x1 +x2 +x3 +x4 +x5 = 2,
x1 +x2 +x3 +2x4 +2x5 = 3,
x1 +x2 +x3 +2x4 +3x5 = 2.

Solution:
   
1 1 1 1 1 2 1 1 1 1 1 2
1 1 1 2 2 3REF =⇒ 0 0 0 1 1 1 
1 1 1 2 3 2 0 0 0 0 1 −1

 
1 1 1 1 1 2
0 0 0 1 1 1  =⇒
0 0 0 0 1 −1

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 32 / 41


Example
b) 
x1 +x2 +x3 +x4 +x5 = 2,
x1 +x2 +x3 +2x4 +2x5 = 3,
x1 +x2 +x3 +2x4 +3x5 = 2.

Solution:
   
1 1 1 1 1 2 1 1 1 1 1 2
1 1 1 2 2 3REF =⇒ 0 0 0 1 1 1 
1 1 1 2 3 2 0 0 0 0 1 −1

  
1 1 1 1 1 2 x1 +x2 +x3 +x4 +x5 = 2,
0 0 0 1 1 1  =⇒ x4 +x5 = 1,
0 0 0 0 1 −1 x5 = −1.

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 32 / 41


Example

x1 +x2 +x3 +x4 +x5 = 2,
x4 +x5 = 1,
x5 = −1.

Setting x2 = t ∈ R and x3 = s ∈ R, then the system has an infinite


number of solutions given by


 x1 = 1 − t − s,
x2 = t,


x3 = s,
x = 2,

 4



x5 = −1.

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 33 / 41


Solve the following System of Linear Equations:

 x1 −2x2 +3x3 = 9,
(S1 ) −x1 +3x2 = −4,
2x1 −5x2 +5x3 = 17.

The Augmented matrix of system (S1 ) is given by


 . 
−2 3 .. 9
1

A= .. 
−1 3 0 . −4

.
2 −5 5 .. 17

Note: The coefficient matrix associated to system (S1 ) is given by


 
1 −2 3
B = −1 3 0
2 −5 5

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 34 / 41


Use the augmented matrix to solve system (S1 )

   
1 −2 3 9 1 −2 3 9
REF
A = −1 3 0 −4 −−−−−−−−−→ A4 = 0 1 3 5
2 −5 5 17 0 0 1 2

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 35 / 41


Use the augmented matrix to solve system (S1 )

   
1 −2 3 9 1 −2 3 9
REF
A = −1 3 0 −4 −−−−−−−−−→ A4 = 0 1 3 5
2 −5 5 17 0 0 1 2
So the following systems have the same solution0:
 
 x1 −2x2 +3x3 = 9, x1 −2x2 +3x3 = 9,
(S1 ) −x1 +3x2 = −4, (S4 ) x2 +3x3 5,
2x1 −5x2 +5x3 = 17. x3 = 2.
 

Using back substitution the solution of system (S4 ) is x1 = 1, x2 = −1 and


x3 = 2.
Thus the solution of (S1 ) is S = {(1, −1, 2)}

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 35 / 41


Homogeneous systems

Definition
A system AX=b is said to be homogeneous if b=0.

The zero vector is a trivial solution of every homogeneous system. Thus:

Every homogeneous system of linear equations is consistent. Moreover, if


the system has fewer equations than variables, then it must have an
infinite number of solutions.

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 36 / 41


Definition (RREF)
A matrix is said to be in reduced row echelon form if

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 37 / 41


Definition (RREF)
A matrix is said to be in reduced row echelon form if
a) The matrix is in row echelon form.

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 37 / 41


Definition (RREF)
A matrix is said to be in reduced row echelon form if
a) The matrix is in row echelon form.
b) The first nonzero entry in each row (leading one) is the only nonzero
entry in its columns.

Example
 
1 0 0 3
a) A = 0 1 0 2
0 0 1 1

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 37 / 41


Definition (RREF)
A matrix is said to be in reduced row echelon form if
a) The matrix is in row echelon form.
b) The first nonzero entry in each row (leading one) is the only nonzero
entry in its columns.

Example
 
1 0 0 3
a) A = 0 1 0 2 is in RREF.
0 0 1 1

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 37 / 41


Definition (RREF)
A matrix is said to be in reduced row echelon form if
a) The matrix is in row echelon form.
b) The first nonzero entry in each row (leading one) is the only nonzero
entry in its columns.

Example
 
1 0 0 3
a) A = 0 1 0 2 is in RREF.
0 0 1 1
 
1 3 1 3
b) B = 0 1 0 2
0 0 1 1

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 37 / 41


Definition (RREF)
A matrix is said to be in reduced row echelon form if
a) The matrix is in row echelon form.
b) The first nonzero entry in each row (leading one) is the only nonzero
entry in its columns.

Example
 
1 0 0 3
a) A = 0 1 0 2 is in RREF.
0 0 1 1
 
1 3 1 3
b) B = 0 1 0 2 is not in RREF ,
0 0 1 1

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 37 / 41


Definition (RREF)
A matrix is said to be in reduced row echelon form if
a) The matrix is in row echelon form.
b) The first nonzero entry in each row (leading one) is the only nonzero
entry in its columns.

Example
 
1 0 0 3
a) A = 0 1 0 2 is in RREF.
0 0 1 1
 
1 3 1 3
b) B = 0 1 0 2 is not in RREF , but it is in REF.
0 0 1 1

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 37 / 41


Gauss-Jordan Reduction

Strategy
To solve a system of Linear equation using Gauss-Jordan Reduction -
GJR , we apply the following steps:
a) Apply Gaussian Elimination method without back substitution.
b) Apply the Elementary Row Operation in order to eliminate the
nonzero entries above the leading ones of each row in the r.e.f.

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 38 / 41


Example
Use Gauss-Jordan Reduction to solve the system

−x1 +x2 −x3 +3x4 = 0,
3x1 +x2 −x3 −x4 = 0,
2x1 −x2 −2x3 −x4 = 0.

Solution:

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 39 / 41


Example
Use Gauss-Jordan Reduction to solve the system

−x1 +x2 −x3 +3x4 = 0,
3x1 +x2 −x3 −x4 = 0,
2x1 −x2 −2x3 −x4 = 0.

Solution:
 
−1 1 −1 3 0
3 1 −1 −1 0
2 −1 −2 −1 0

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 39 / 41


Example
Use Gauss-Jordan Reduction to solve the system

−x1 +x2 −x3 +3x4 = 0,
3x1 +x2 −x3 −x4 = 0,
2x1 −x2 −2x3 −x4 = 0.

Solution:
 
−1 1 −1 3 0
R + 3R1 −→ R2
3 1 −1 −1 0 2
R + 2R1 −→ R3
2 −1 −2 −1 0 3

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 39 / 41


Example
Use Gauss-Jordan Reduction to solve the system

−x1 +x2 −x3 +3x4 = 0,
3x1 +x2 −x3 −x4 = 0,
2x1 −x2 −2x3 −x4 = 0.

Solution:
 
−1 1 −1 3 0
R + 3R1 −→ R2
3 1 −1 −1 0 2 =⇒
R3 + 2R1 −→ R3
2 −1 −2 −1 0

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 39 / 41


Example
Use Gauss-Jordan Reduction to solve the system

−x1 +x2 −x3 +3x4 = 0,
3x1 +x2 −x3 −x4 = 0,
2x1 −x2 −2x3 −x4 = 0.

Solution:
   
−1 1 −1 3 0 −1 1 −1 3 0
R + 3R1 −→ R2
3 1 −1 −1 0 2 =⇒  0 4 −4 8 0
R3 + 2R1 −→ R3
2 −1 −2 −1 0 0 1 −4 5 0

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 39 / 41


Example
Use Gauss-Jordan Reduction to solve the system

−x1 +x2 −x3 +3x4 = 0,
3x1 +x2 −x3 −x4 = 0,
2x1 −x2 −2x3 −x4 = 0.

Solution:
   
−1 1 −1 3 0 −1 1 −1 3 0
R + 3R1 −→ R2
3 1 −1 −1 0 2 =⇒  0 4 −4 8 0
R3 + 2R1 −→ R3
2 −1 −2 −1 0 0 1 −4 5 0
 
−1 1 −1 3 0
1
0 4 −4 8 0 R2 × −→R4
4
0 1 −4 5 0

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 39 / 41


Example
Use Gauss-Jordan Reduction to solve the system

−x1 +x2 −x3 +3x4 = 0,
3x1 +x2 −x3 −x4 = 0,
2x1 −x2 −2x3 −x4 = 0.

Solution:
   
−1 1 −1 3 0 −1 1 −1 3 0
R + 3R1 −→ R2
3 1 −1 −1 0 2 =⇒  0 4 −4 8 0
R + 2R1 −→ R3
2 −1 −2 −1 0 3 0 1 −4 5 0
   
−1 1 −1 3 0 −1 1 −1 3 0
1
0 4 −4 8 0 R2 × −→R4 =⇒ 0 1
  −1 2 0
4
0 1 −4 5 0 0 1 −4 5 0

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 39 / 41


Example
 
−1 1 −1 3 0
 0 1 −1 2 0
0 1 −4 5 0

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 40 / 41


Example
 
−1 1 −1 3 0
 0 1 −1 2 0 R3 − R2 −→ R3
0 1 −4 5 0

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 40 / 41


Example
 
−1 1 −1 3 0
 0 1 −1 2 0 R3 − R2 −→ R3 =⇒
0 1 −4 5 0

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 40 / 41


Example
   
−1 1 −1 3 0 −1 1 −1 3 0
 0 1 −1 2 0 R3 − R2 −→ R3 =⇒  0 1 −1 2 0
0 1 −4 5 0 0 0 −3 3 0

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 40 / 41


Example
   
−1 1 −1 3 0 −1 1 −1 3 0
 0 1 −1 2 0 R3 − R2 −→ R3 =⇒  0 1 −1 2 0
0 1 −4 5 0 0 0 −3 3 0
 
−1 1 −1 3 0
 0 1 −1 2 0
0 0 −3 3 0

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 40 / 41


Example
   
−1 1 −1 3 0 −1 1 −1 3 0
 0 1 −1 2 0 R3 − R2 −→ R3 =⇒  0 1 −1 2 0
0 1 −4 5 0 0 0 −3 3 0
 
−1 1 −1 3 0 1
 0 1 −1 2 0 R3 × − 3 −→ R3
R × (−1) −→ R1
0 0 −3 3 0 1

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 40 / 41


Example
   
−1 1 −1 3 0 −1 1 −1 3 0
 0 1 −1 2 0 R3 − R2 −→ R3 =⇒  0 1 −1 2 0
0 1 −4 5 0 0 0 −3 3 0
 
−1 1 −1 3 0 1
 0 1 −1 2 0 R3 × − 3 −→ R3 =⇒
R × (−1) −→ R1
0 0 −3 3 0 1

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 40 / 41


Example
   
−1 1 −1 3 0 −1 1 −1 3 0
 0 1 −1 2 0 R3 − R2 −→ R3 =⇒  0 1 −1 2 0
0 1 −4 5 0 0 0 −3 3 0
   
−1 1 −1 3 0 1 1 −1 1 −3 0
 0 1 −1 2 0 R3 × − 3 −→ R3 =⇒ 0 1 −1 2 0
R × (−1) −→ R1
0 0 −3 3 0 1 0 0 1 −1 0

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 40 / 41


Example
   
−1 1 −1 3 0 −1 1 −1 3 0
 0 1 −1 2 0 R3 − R2 −→ R3 =⇒  0 1 −1 2 0
0 1 −4 5 0 0 0 −3 3 0
   
−1 1 −1 3 0 1 1 −1 1 −3 0
 0 1 −1 2 0 R3 × − 3 −→ R3 =⇒ 0 1 −1 2 0
R × (−1) −→ R1
0 0 −3 3 0 1 0 0 1 −1 0
 
1 −1 1 −3 0
0 1 −1 2 0
0 0 1 −1 0

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 40 / 41


Example
   
−1 1 −1 3 0 −1 1 −1 3 0
 0 1 −1 2 0 R3 − R2 −→ R3 =⇒  0 1 −1 2 0
0 1 −4 5 0 0 0 −3 3 0
   
−1 1 −1 3 0 1 1 −1 1 −3 0
 0 1 −1 2 0 R3 × − 3 −→ R3 =⇒ 0 1 −1 2 0
R × (−1) −→ R1
0 0 −3 3 0 1 0 0 1 −1 0
 
1 −1 1 −3 0
0 1 −1 2 0 R2 + R3 −→ R2
R − R3 −→ R1
0 0 1 −1 0 1

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 40 / 41


Example
   
−1 1 −1 3 0 −1 1 −1 3 0
 0 1 −1 2 0 R3 − R2 −→ R3 =⇒  0 1 −1 2 0
0 1 −4 5 0 0 0 −3 3 0
   
−1 1 −1 3 0 1 1 −1 1 −3 0
 0 1 −1 2 0 R3 × − 3 −→ R3 =⇒ 0 1 −1 2 0
R × (−1) −→ R1
0 0 −3 3 0 1 0 0 1 −1 0
 
1 −1 1 −3 0
0 1 −1 2 0 R2 + R3 −→ R2 =⇒
R − R3 −→ R1
0 0 1 −1 0 1

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 40 / 41


Example
   
−1 1 −1 3 0 −1 1 −1 3 0
 0 1 −1 2 0 R3 − R2 −→ R3 =⇒  0 1 −1 2 0
0 1 −4 5 0 0 0 −3 3 0
   
−1 1 −1 3 0 1 1 −1 1 −3 0
 0 1 −1 2 0 R3 × − 3 −→ R3 =⇒ 0 1 −1 2 0
R × (−1) −→ R1
0 0 −3 3 0 1 0 0 1 −1 0
   
1 −1 1 −3 0 1 −1 0 −2 0
0 1 −1 2 0 R2 + R3 −→ R2 =⇒ 0 1 0 1 0
R − R3 −→ R1
0 0 1 −1 0 1 0 0 1 −1 0

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 40 / 41


Example
 
1 −1 0 −2 0
0 1 0 1 0
0 0 1 −1 0

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 41 / 41


Example
 
1 −1 0 −2 0
0 1 0 1 0 R1 + R2 −→ R1
0 0 1 −1 0

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 41 / 41


Example
 
1 −1 0 −2 0
0 1 0 1 0 R1 + R2 −→ R1 =⇒
0 0 1 −1 0

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 41 / 41


Example
   
1 −1 0 −2 0 1 0 0 −1 0
0 1 0 1 0 R1 + R2 −→ R1 =⇒ 0 1 0 1 0
0 0 1 −1 0 0 0 1 −1 0

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 41 / 41


Example
   
1 −1 0 −2 0 1 0 0 −1 0
0 1 0 1 0 R1 + R2 −→ R1 =⇒ 0 1 0 1 0
0 0 1 −1 0 0 0 1 −1 0

 
1 0 0 −1 0
0 1 0 1 0
0 0 1 −1 0

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 41 / 41


Example
   
1 −1 0 −2 0 1 0 0 −1 0
0 1 0 1 0 R1 + R2 −→ R1 =⇒ 0 1 0 1 0
0 0 1 −1 0 0 0 1 −1 0

 
1 0 0 −1 0
0 1 0 1 0 =⇒
0 0 1 −1 0

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 41 / 41


Example
   
1 −1 0 −2 0 1 0 0 −1 0
0 1 0 1 0 R1 + R2 −→ R1 =⇒ 0 1 0 1 0
0 0 1 −1 0 0 0 1 −1 0

  
1 0 0 −1 0 x1 −x4 = 0,
0 1 0 1 0 =⇒ x2 +x4 = 0,
0 0 1 −1 0 x3 −x4 = 0.

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 41 / 41


Example
   
1 −1 0 −2 0 1 0 0 −1 0
0 1 0 1 0 R1 + R2 −→ R1 =⇒ 0 1 0 1 0
0 0 1 −1 0 0 0 1 −1 0

  
1 0 0 −1 0 x1 −x4 = 0,
0 1 0 1 0 =⇒ x2 +x4 = 0,
0 0 1 −1 0 x3 −x4 = 0.

Setting x4 = t ∈ R, then the system has an infinite number of solutions


given by

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 41 / 41


Example
   
1 −1 0 −2 0 1 0 0 −1 0
0 1 0 1 0 R1 + R2 −→ R1 =⇒ 0 1 0 1 0
0 0 1 −1 0 0 0 1 −1 0

  
1 0 0 −1 0 x1 −x4 = 0,
0 1 0 1 0 =⇒ x2 +x4 = 0,
0 0 1 −1 0 x3 −x4 = 0.

Setting x4 = t ∈ R, then the system has an infinite number of solutions


given by 

 x1 = t,
x2 = −t,

x = t,
 3


x4 = t.

Z. ABBAS (LAU) Solving linear Systems January 30, 2024 41 / 41

You might also like