You are on page 1of 25

MT 1117: Linear Algebra for ICT

Instructor: A.V. Mathias


Department of Mathematics & Statistics
University of Dodoma

Lecture 4

December 1, 2021.

Instructor: A.V. Mathias Department of Mathematics & MT 1117:University


Statistics of Dodoma
Linear Algebra for ICT(Lecture 4) December 1, 2021. 1 / 25
Linear Equations

1 System of linear equations


Concept of linear system
Homogeneous linear system
Non-homogeneous linear system
Matrix and Augmented matrix forms

2 Solution to the linear system


Consistent and Inconsistent linear systems
Gauss elimination
Gauss-Jordan elimination
Inverses and linear system

Instructor: A.V. Mathias Department of Mathematics & MT 1117:University


Statistics of Dodoma
Linear Algebra for ICT(Lecture 4) December 1, 2021. 2 / 25
Concept of linear system
A linear system is the system of linear equations.
A system with m− linear equations in n− variables has the
general form


 a11 x1 + a12 x2 + . . . + a1n xn = b1
a21 x1 + a22 x2 + . . . + a2n xn = b2


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

where the coefficients aij for i = 1, 2, 3, . . . , m and
j = 1, 2, 3, . . . n and the quantities bi are all known scalars.
If m = n then the system is considered to be a square linear
system.
Note
A linear system does not include the product of variables
Instructor: A.V. Mathias Department of Mathematics & MT 1117:University
Statistics of Dodoma
Linear Algebra for ICT(Lecture 4) December 1, 2021. 3 / 25
Homogeneous linear system
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

If bi = 0, then the system is called a homogeneous linear system.
The system


 a11 x1 + a12 x2 + . . . + a1n xn = 0
a21 x1 + a22 x2 + . . . + a2n xn = 0


 . . ... .
am1 x1 + am2 x2 + . . . + amn xn = 0

is a homogeneous linear system.

Instructor: A.V. Mathias Department of Mathematics & MT 1117:University


Statistics of Dodoma
Linear Algebra for ICT(Lecture 4) December 1, 2021. 4 / 25
Non-homogeneous linear system

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

If bi 6= 0, then the system is called a Non-homogeneous linear
system.
The system

 4x1 + 5x2 + 7x3 = 4
2x1 + x2 + 9x3 = 7
x1 + 3x2 + 4x3 = 8

is an example of a Non-homogeneous linear system.

Instructor: A.V. Mathias Department of Mathematics & MT 1117:University


Statistics of Dodoma
Linear Algebra for ICT(Lecture 4) December 1, 2021. 5 / 25
Matrix and Augmented matrix forms

Matrix form

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

When we consider the definition of matrix multiplication, we can
decouple a system of linear equations so that all the variables are
packed together.
The
 linear system above   can therefore
  be written as
a11 a12 . . . a1n x1 b1
 a21 a22 . . . a2n  x2   b2 
   =  
 . . ... .  .   . 
am1 am2 . . . amn xn bm
Instructor: A.V. Mathias Department of Mathematics & MT 1117:University
Statistics of Dodoma
Linear Algebra for ICT(Lecture 4) December 1, 2021. 6 / 25
Matrix and Augmented matrix forms cont . . .
The
 matrix 
a11 a12 . . . a1n
 a21 a22 . . . a2n 
 
 . . ... . 
am1 am2 . . . amn
is the matrix of coefficients of the linear system and it is called the
coefficient matrix.
Let A be the coefficient matrix of the above linear system, x be the
column matrix of all the variables in the system and b be the
column matrix enumerating the constants of the right side of the
equations in the linear system, then the system can simply be
written as
Ax = b

Instructor: A.V. Mathias Department of Mathematics & MT 1117:University


Statistics of Dodoma
Linear Algebra for ICT(Lecture 4) December 1, 2021. 7 / 25
Matrix and Augmented matrix forms cont . . .

Augmented matrix form


An augmented matrix is the matrix obtained from the linear system
comprising of the coefficient matrix and numbers on the right side of
the linear system glued together.

Let Ax = b be the linear system, then its corresponding


augmented matrix has the form [A|b]
In other words, if A represents the coefficient matrix of the
general form of a linear system, then the augmented matrix can be
expressed
 as 
a11 a12 . . . a1n b1
 a21 a22 . . . a2n b1 
 
 . . ... . . 
am1 am2 . . . amn bm
Instructor: A.V. Mathias Department of Mathematics & MT 1117:University
Statistics of Dodoma
Linear Algebra for ICT(Lecture 4) December 1, 2021. 8 / 25
Consistent and Inconsistent linear systems

Definition
A solution to a linear system is a set of scalar values for the variables
that when substituted into each equation of the system makes each
equation true.

The solution to the linear system is a point of intersection of all


the lines in the system under consideration.
If the system has only one point of intersection then that system
has a unique solution.
If the system has many points of intersections then it has infinitely
many solutions.
A system of linear equations is consistent if it has atleast one
solution otherwise it is inconsistent.

Instructor: A.V. Mathias Department of Mathematics & MT 1117:University


Statistics of Dodoma
Linear Algebra for ICT(Lecture 4) December 1, 2021. 9 / 25
Consistent and Inconsistent linear systems cont
...
A linear system is inconsistent (has no solution) if the last column
of a row-echelon form of the augmented matrix is a pivot column.
A consistent linear system has a unique solution if every column
except the last column of r.e.f of an augmented matrix is a pivot
column.
A consistent linear system has infinitely many solutions if apart
from the last column, a row-echelon form of an augmented matrix
has atleast one more non-pivot column.
A consistent linear system has many solutions if the number of
variables in the linear system is greater than non-zero rows in the
row-echelon form of the augmented matrix.

Instructor: A.V. Mathias Department of Mathematics & MT 1117:University


Statistics of Dodoma
Linear Algebra for ICT(Lecture 4) December 1, 2021. 10 / 25
Gauss elimination
This is method of solving the system of linear equations and it is
named after the German Mathematician Friedrich Gauss who
invented it.
Gauss elimination
Is an algorithm for solving the linear system which involves four basic
steps:
Construct an augmented matrix for the given linear system.

Use elementary row operations to transform the augmented matrix to


augmented matrix in r.e.f.

Write the linear system associated with the resulting augmented matrix.

Solve the new set of equations (derived set) by back substitution.

Instructor: A.V. Mathias Department of Mathematics & MT 1117:University


Statistics of Dodoma
Linear Algebra for ICT(Lecture 4) December 1, 2021. 11 / 25
Gauss elimination cont . . .

Example
Use Gauss elimination to solve the homogeneous linear system

 2x3 + 2x4 = 0
x1 + + 3x3 + x4 = 0
x1 + x2 + 2x3 = 0

Matrix form  
 x
0 0 2 3  1
  
0
1 0 3 1 x2  = 0
x3 
1 1 2 0 0
x4
Augmented
 matrixform
0 0 2 3 0
 1 0 3 1 0 
1 1 2 0 0
Instructor: A.V. Mathias Department of Mathematics & MT 1117:University
Statistics of Dodoma
Linear Algebra for ICT(Lecture 4) December 1, 2021. 12 / 25
Gauss elimination cont . . .
We then apply the elementary row operations to the augmented
matrix to r.e.f
Apply R1 ↔ R3
   
0 0 2 3 0 1 1 2 0 0
 1 0 3 1 0 ∼ 1 0 3 1 0 
1 1 2 0 0 0 0 2 3 0
Apply R2 → R2 + (−R1 )
   
1 1 2 0 0 1 1 2 0 0
 1 0 3 1 0  ∼  0 −1 1 1 0 
0 0 2 3 0 0 0 2 3 0
This
 system is already in r.e.f, the derived set of equations is
 x1 + x2 + 2x3 = 0
− x2 + x3 + x4 = 0
2x3 + 3x4 = 0

Instructor: A.V. Mathias Department of Mathematics & MT 1117:University


Statistics of Dodoma
Linear Algebra for ICT(Lecture 4) December 1, 2021. 13 / 25
Gauss elimination cont . . .
By back substitution
Consider the third equation in the derived set
2x3 + 3x4 = 0, it implies that x3 = − 23 x4
Substitute x3 = − 32 x4 into the second equation
The equation becomes −x2 + (− 32 x4 ) + x4 = 0, implying that
x2 = − 21 x4
Substitute x2 = − 12 x4 and x3 = − 23 x4 into the first equation
The first equation becomes x1 + (− 12 x4 ) + 2(− 23 x4 ) = 0, implying
that x1 = 72 x4
Let x4 = t, the solution to the linear system can therefore be
written
  as 7   
x1 2
t 7
x2  − 1 t 1 −1
  =  23  = t  
x3  − t 2 −3
2
x4 t 2
Instructor: A.V. Mathias Department of Mathematics & MT 1117:University
Statistics of Dodoma
Linear Algebra for ICT(Lecture 4) December 1, 2021. 14 / 25
Gauss elimination cont . . .

Note
If the solution to the derived set involves at least one arbitrary
unknown, then the original system has infinitely many solutions.

Theorem
A homogeneous system of linear equations containing more variables
than equations has infinitely many solutions.

Note
If a derived set contains a false equation, then the original set of
equations has no solution and it is called an inconsistent linear system.

Instructor: A.V. Mathias Department of Mathematics & MT 1117:University


Statistics of Dodoma
Linear Algebra for ICT(Lecture 4) December 1, 2021. 15 / 25
Gauss elimination cont . . .

Example
Solve the following system by Gauss elimination.

 x + 2y + 3z = 9
2x − y + z = 8
3x − z = 3

Matrix form     

1 2 3 x 9
2 −1 1  y = 8
3 0 −1 z 3
Augmented
 matrix form

1 2 3 9
 2 −1 1 8 
3 0 −1 3
Instructor: A.V. Mathias Department of Mathematics & MT 1117:University
Statistics of Dodoma
Linear Algebra for ICT(Lecture 4) December 1, 2021. 16 / 25
Gauss elimination cont . . .
Reducing the augmented
  matrix
 to r.e.f we have

1 2 3 9 1 0 1 5
 2 −1 1 8  ∼ . . . ∼  0 1 1 2 
3 0 −1 3 0 0 2 6
The
 derived set becomes
 x + z = 5
y + z = 2
2z = 6

Solving
  the derived
 set by back substitution we have
x 2
y = −1
z 3

Note
This linear system has a unique solution
Instructor: A.V. Mathias Department of Mathematics & MT 1117:University
Statistics of Dodoma
Linear Algebra for ICT(Lecture 4) December 1, 2021. 17 / 25
Gauss elimination cont . . .

Example
Use Gauss elimination to solve the linear system

x + 2y = 2
3x + 6y = 7

Matrix form
    
1 2 x 2
=
3 6 y 7
Augmentedmatrix form

1 2 2
3 6 7
Reducing the
  augmented
 matrix to r.e.f we have
1 2 2 1 2 2
∼ ... ∼
3 6 7 0 0 1
Instructor: A.V. Mathias Department of Mathematics & MT 1117:University
Statistics of Dodoma
Linear Algebra for ICT(Lecture 4) December 1, 2021. 18 / 25
Gauss elimination cont . . .
The derived set of equations to this system is

x + 2y = 2
0 = 1
We observe that the last equation in the derived set of equations is
false equation, this implies that the original system is inconsistent
and has no solution.

Exercise
Given the quadratic surface with equation ax2 + by2 + cz2 where a, b
and c are real constants that passes through the points (1, 1, −1),
(1, 3, 3) and −2, 0, 2. Find the formula for the quadratic surface.

Instructor: A.V. Mathias Department of Mathematics & MT 1117:University


Statistics of Dodoma
Linear Algebra for ICT(Lecture 4) December 1, 2021. 19 / 25
Gauss-Jordan elimination

Gauss-Jordan elimination
Is one of the algorithms for solving linear system. The steps are:
Construct an augmented matrix for the given linear system.
Use elementary row operations to transform the augmented
matrix to augmented matrix in r.r.e.f.
Write the linear system associated with the resulting augmented
matrix.
Solve the new set of equations (derived set) by back substitution.

Note
In Gaussian elimination the system augmented matrix is reduced to
r.e.f while in Gauss-Jordan elimination it is reduced to r.r.e.f, other
procedures remains the same.
Instructor: A.V. Mathias Department of Mathematics & MT 1117:University
Statistics of Dodoma
Linear Algebra for ICT(Lecture 4) December 1, 2021. 20 / 25
Gauss-Jordan elimination cont . . .

Example
Solve the following system by Gauss-Jordan elimination.

 x1 + 2x2 + 3x3 = 9
2x1 − x2 + x3 = 8
3x1 − x3 = 3

Matrix form     

1 2 3 x1 9
2 −1 1  x2  = 8
3 0 −1 x3 3
Augmented
 matrix form
1 2 3 9
 2 −1 1 8 
3 0 −1 3
Instructor: A.V. Mathias Department of Mathematics & MT 1117:University
Statistics of Dodoma
Linear Algebra for ICT(Lecture 4) December 1, 2021. 21 / 25
Gauss elimination cont . . .
Reducing
 the augmented
 matrix
 to r.r.e.f we have

1 2 3 9 1 0 0 2
 2 −1 1 8  ∼ . . . ∼  0 1 0 −1 
3 0 −1 3 0 0 1 3
The
 derived set becomes
 x1 = 2
x2 = −1
x3 = 3

Solving
  the
 derived
 set by back substitution we have
x1 2
x2  = −1
x3 3

Note
This linear system has a unique solution
Instructor: A.V. Mathias Department of Mathematics & MT 1117:University
Statistics of Dodoma
Linear Algebra for ICT(Lecture 4) December 1, 2021. 22 / 25
Inverses and linear system

Note
Let A be n × n non-singular matrix, then the non-homogeneous system
Ax = b has a unique solution.

Given that A is non-singular matrix, implies that A−1 exists.


Now, consider the non-homogeneous linear system Ax = b
Multiplying to the left by A−1 , we obtain
A−1 Ax = A−1 b
In x = A−1 b; Definition of matrix inverse
x = A−1 b; Identity property of matrix multiplication
Therefore, x = A−1 b, where A is the coefficient matrix of a
non-homogeneous linear system.

Instructor: A.V. Mathias Department of Mathematics & MT 1117:University


Statistics of Dodoma
Linear Algebra for ICT(Lecture 4) December 1, 2021. 23 / 25
Inverses and linear system cont . . .

Note
Let A be n × n non-singular matrix, then the homogeneous system
Ax = 0 has a trivial solution.

Given that A is non-singular matrix, implies that A−1 exists.


Now, consider the homogeneous linear system Ax = 0
Multiplying to the left by A−1 , we obtain
A−1 Ax = A−1 0
In x = A−1 0; Definition of matrix inverse
x = 0; Identity property of matrix multiplication
Therefore, x = 0,implies the homogeneous system has a trivial
solution.
Note: If A is singular, then the homogeneous linear system
Ax = 0 has non-trivial solution.
Instructor: A.V. Mathias Department of Mathematics & MT 1117:University
Statistics of Dodoma
Linear Algebra for ICT(Lecture 4) December 1, 2021. 24 / 25
Thank you for your Attention.

Instructor: A.V. Mathias Department of Mathematics & MT 1117:University


Statistics of Dodoma
Linear Algebra for ICT(Lecture 4) December 1, 2021. 25 / 25

You might also like