Download as pdf or txt
Download as pdf or txt
You are on page 1of 59

ELEN 30073

Lesson 3
Linear System
Introduction
 This module is all about the system of linear algebraic equations which can be either linear or nonlinear in
nature.

Overview
 Many of the fundamental equations of electrical engineering are based on conservation law and some of the
familiar quantities that conform to such laws are mass, energy and momentum.
Introduction
 This module is all about the system of linear algebraic equations which can be either linear or nonlinear in
nature.

Overview
 Many of the fundamental equations of electrical engineering are based on conservation law and some of the
familiar quantities that conform to such laws are mass, energy and momentum.
 When these dependencies are expressed mathematically, the resulting equations often of the linear algebraic
form where x’s are usually measures of the magnitudes of the responses of the individual components.
Introduction
 This module is all about the system of linear algebraic equations which can be either linear or nonlinear in
nature.

Overview
 Many of the fundamental equations of electrical engineering are based on conservation law and some of the
familiar quantities that conform to such laws are mass, energy and momentum.
 When these dependencies are expressed mathematically, the resulting equations often of the linear algebraic
form where x’s are usually measures of the magnitudes of the responses of the individual components.
Introduction
 This module is all about the system of linear algebraic equations which can be either linear or nonlinear in
nature.

Overview
 Many of the fundamental equations of electrical engineering are based on conservation law and some of the
familiar quantities that conform to such laws are mass, energy and momentum.
 When these dependencies are expressed mathematically, the resulting equations often of the linear algebraic
form where x’s are usually measures of the magnitudes of the responses of the individual components.
 These result when mathematical functions are required to satisfy several conditions simultaneously. Each
condition results in an equation that contains known coefficients and unknown variables.
Introduction
 This module is all about the system of linear algebraic equations which can be either linear or nonlinear in
nature.

Overview
 Many of the fundamental equations of electrical engineering are based on conservation law and some of the
familiar quantities that conform to such laws are mass, energy and momentum.
 When these dependencies are expressed mathematically, the resulting equations often of the linear algebraic
form where x’s are usually measures of the magnitudes of the responses of the individual components.
 These result when mathematical functions are required to satisfy several conditions simultaneously. Each
condition results in an equation that contains known coefficients and unknown variables.

𝑎11 𝑥1 + 𝑎12 𝑥2 + ⋯ . +𝑎1𝑛 𝑥𝑛 = 𝑏1


𝑎21 𝑥1 + 𝑎22 𝑥2 + ⋯ . +𝑎2𝑛 𝑥𝑛 = 𝑏1
. .
. .
. .
𝑎𝑛1 𝑥1 + 𝑎𝑛2 𝑥2 + ⋯ . +𝑎𝑛𝑛 𝑥𝑛 = 𝑏𝑛
Objectives
• Define matrix and its use in linear algebraic equations
• Discuss the importance of Gauss elimination and its application on solving simultaneous linear
equation
• Formulate and discuss LU factorization from Gauss elimination.
• Describe how LU factorization can be employed to efficiently calculate the matrix inverse.
• Describe different iterative solution techniques in solving linear algebraic problem.
Matrix Notation
 A matrix consists of a rectangular array of elements represented by a single symbol. As shown, [A] is the
shorthand notation for the matrix and ai j designates an individual element of the matrix.

8
Matrix Notation
 A matrix consists of a rectangular array of elements represented by a single symbol. As depicted, [A] is the
shorthand notation for the matrix and ai j designates an individual element of the matrix.
 The matrix has m rows and n columns and is said to have a dimension of m by n (or m × n). It is referred to
as an m by n matrix.

9
VECTORS

Vector : a one dimensiona l array of numbers


Examples :
 2
row vector 1 4 2 column vec tor  
1 
1 0  0  0 
0  1 0  0 
Identity vectors e1 =  , e2 =  , e3 =  , e4 =  
0  0  1 0 
       
0  0  0  1
10
 Matrices where m = n are called square matrices. The diagonal consisting of the elements a11, a22, and a33 is
termed the principal or main diagonal of the matrix. For example, a 3 × 3 matrix is:

 Asymmetric matrix is one where the rows equal the columns.that is, 𝑎𝑖𝑗 = 𝑎𝑗𝑖 for all i.s and j.s. For example,

 A diagonal matrix is a square matrix where all elements off the main diagonal are equal to zero, as in

11
 An identity matrix is a diagonal matrix where all elements on the main diagonal are equal to 1, as in:

 The identity matrix has properties similar to unity. That is, [A][I]=[I][A]=[A]
 An upper triangular matrix is one where all the elements below the main diagonal are zero, as in:

12
 A lower triangular matrix is one where all elements above the main diagonal are zero, as in:

 A banded matrix has all elements equal to zero, with the exception of a band centered on the main diagonal:

13
Matrix Operation
 Now that we have specified what we mean by a matrix, we can define some operating rules that govern its use.
Two m by n matrices are equal if, and only if, every element in the first is equal to every element in the
second.that is, [A] = [B] if ai j = bi j for all i and j.
 Addition of two matrices, say, [A] and [B], is accomplished by adding corresponding terms in each matrix. The
elements of the resulting matrix [C] are computed as:
𝑐𝑖𝑗 = 𝑎𝑖𝑗 + 𝑏𝑖𝑗
 Both addition and subtraction are commutative:
[A] + [B] = [B] + [A]
 and associative:
 ([A] + [B]) + [C] = [A] + ([B] + [C])
 The multiplication of a matrix [A] by a scalar g is obtained by multiplying every element of [A] by g. For
example, for a 3 × 3 matrix:

14
Example problems

1. Add the matrices

 4 −3 1   −1 2 3
 0 5 −2  +  6 −7 9 
   
 5 −6 0   0 −4 8 
Example problems

1. Add the matrices Solution: Adding corresponding


entries we have

 4 −3 1   −1 2 3
 0 5 −2  +  6 −7 9   3 −1 4 
    6 −2 7 
 5 −6 0   0 −4 8   
5 −10 8 
Example problems

2. Subtract the same two


matrices

 4 −3 1   −1 2 3
 0 5 −2  −  6 −7 9 
   
 5 −6 0   0 −4 8 
Example problems

Subtract corresponding entries as follows:

 4 − (−1) −3 − 2 1− 3 
 0−6 5 − (−7) −2 − 9 

 5 − 0 −6 − (−4) 0 − 8 
 5 −5 −2 
=  −6 12 −11
 
 5 −2 −8 
Example problems

3. Find (-1)A where


A=  −1 2 3 
 6 −7 9 
 
 0 −4 8 
Example problems

Solution:
(-1)A=

 −1 2 3 
-1  6 −7 9 
 
 0 −4 8 

 −1 2 3  1 −2 −3
   
= (−1)  6 −7 9  =  −6 7 −9 
 0 −4 8   0 4 −8
 Visual Depiction of how the rows and columns line up in matrix multiplication:
 Matrix Multiplication can be performed only if the inner dimensions are equal (k=k):

 The product of two matrices is represented as [C] = [A][B], where the elements of [C] are defined as:

𝑐𝑖𝑗 = ෍ 𝑎𝑖𝑘 𝑏𝑘𝑗


𝑘=1

21
Example problems
4. Determine the product following
matrices

4 -3 1 -1 2 3
A= 0 5 -2 B= 6 -7 9
5 -6 0 0 -4 8
Example problems

4 -3 1 -1 2 3
A= 0 5 -2 B= 6 -7 9
5 -6 0 0 -4 8

=(4X-1)+(-3X6)+(1X0) -22
=
Example problems

4 -3 1 -1 2 3
A= 0 5 -2 B= 6 -7 9
5 -6 0 0 -4 8

=(4X-1)+(-3X6)+(1X0) =(2X4)+(-7X-3)+(-4X1) -22 25


=
Example problems

4 -3 1 -1 2 3
A= 0 5 -2 B= 6 -7 9
5 -6 0 0 -4 8

=(4X-1)+(-3X6)+(1X0) =(2X4)+(-7X-3)+(-4X1) =(3X4)+(9X-3)+(8X1) -22 25 -7


Example problems

4 -3 1 -1 2 3
A= 0 5 -2 B= 6 -7 9
5 -6 0 0 -4 8

=(4X-1)+(-3X6)+(1X0) =(2X4)+(-7X-3)+(-4X1) =(3X4)+(9X-3)+(8X1) -22 25 -7


=(-1X0)+(6X5)+(0X-2) = 30
Example problems

4 -3 1 -1 2 3
A= 0 5 -2 B= 6 -7 9
5 -6 0 0 -4 8

=(4X-1)+(-3X6)+(1X0) =(2X4)+(-7X-3)+(-4X1) =(3X4)+(9X-3)+(8X1) -22 25 -7


=(-1X0)+(6X5)+(0X-2) =(2X0)+(-7X5)+(-4X-2) = 30 -27
Example problems

4 -3 1 -1 2 3
A= 0 5 -2 B= 6 -7 9
5 -6 0 0 -4 8

=(4X-1)+(-3X6)+(1X0) =(2X4)+(-7X-3)+(-4X1) =(3X4)+(9X-3)+(8X1) -22 25 -7


=(-1X0)+(6X5)+(0X-2) =(2X0)+(-7X5)+(-4X-2) =(3X0)+(9X5)+(8X-2) = 30 -27 29
Example problems

4 -3 1 -1 2 3
A= 0 5 -2 B= 6 -7 9
5 -6 0 0 -4 8

=(4X-1)+(-3X6)+(1X0) =(2X4)+(-7X-3)+(-4X1) =(3X4)+(9X-3)+(8X1) -22 25 -7


=(-1X0)+(6X5)+(0X-2) =(2X0)+(-7X5)+(-4X-2) =(3X0)+(9X5)+(8X-2) = 30 -27 29
=(-1X5)+(6X-6)+(0X0) -41
Example problems

4 -3 1 -1 2 3
A= 0 5 -2 B= 6 -7 9
5 -6 0 0 -4 8

=(4X-1)+(-3X6)+(1X0) =(2X4)+(-7X-3)+(-4X1) =(3X4)+(9X-3)+(8X1) -22 25 -7


=(-1X0)+(6X5)+(0X-2) =(2X0)+(-7X5)+(-4X-2) =(3X0)+(9X5)+(8X-2) = 30 -27 29
=(-1X5)+(6X-6)+(0X0) =(2X5)+(-7X-6)+(-4X0) -41 52
Example problems

4 -3 1 -1 2 3
A= 0 5 -2 B= 6 -7 9
5 -6 0 0 -4 8

=(4X-1)+(-3X6)+(1X0) =(2X4)+(-7X-3)+(-4X1) =(3X4)+(9X-3)+(8X1) -22 25 -7


=(-1X0)+(6X5)+(0X-2) =(2X0)+(-7X5)+(-4X-2) =(3X0)+(9X5)+(8X-2) = 30 -27 29
=(-1X5)+(6X-6)+(0X0) =(2X5)+(-7X-6)+(-4X0) =(3X5)+(9X-6)+(8X0) -41 52 -39
Example problems
Hence, this resulted in 3x3 matrix

4 -3 1 -1 2 3
A= 0 5 -2 X B= 6 -7 9
5 -6 0 0 -4 8

-22 25 -7
30 -27 29
-41 52 -39
Example problems
5. Determine the product following matrices

A= 1 2 3 4B= 1 2 3
5 6 7 8 4 5 6
7 8 9
10 11 12
Example problems

A= 1 2 3 4 B= 1 2 3
5 6 7 8 4 5 6
7 8 9
10 11 12

=(1X1)+(4X2)+(7X3)+(10X4) = 70
Example problems

A= 1 2 3 4 B= 1 2 3
5 6 7 8 4 5 6
7 8 9
10 11 12

=(1X1)+(4X2)+(7X3)+(10X4) =(2X1)+(5X2)+(8X3)+(11X4) = 70 80
Example problems

A= 1 2 3 4 B= 1 2 3
5 6 7 8 4 5 6
7 8 9
10 11 12

=(1X1)+(4X2)+(7X3)+(10X4) =(2X1)+(5X2)+(8X3)+(11X4) =(3X1)+(6X2)+(9X3)+(12X4) = 70 80 90


Example problems

A= 1 2 3 4 B= 1 2 3
5 6 7 8 4 5 6
7 8 9
10 11 12

=(1X1)+(4X2)+(7X3)+(10X4) =(2X1)+(5X2)+(8X3)+(11X4) =(3X1)+(6X2)+(9X3)+(12X4) = 70 80 90


=(1X5)+(4X6)+(7X7)+(10X8) 158
Example problems

A= 1 2 3 4 B= 1 2 3
5 6 7 8 4 5 6
7 8 9
10 11 12

=(1X1)+(4X2)+(7X3)+(10X4) =(2X1)+(5X2)+(8X3)+(11X4) =(3X1)+(6X2)+(9X3)+(12X4) = 70 80 90


=(1X5)+(4X6)+(7X7)+(10X8) =(2X5)+(5X6)+(8X7)+(11X8) 158 184
Example problems

A= 1 2 3 4 B= 1 2 3
5 6 7 8 4 5 6
7 8 9
10 11 12

=(1X1)+(4X2)+(7X3)+(10X4) =(2X1)+(5X2)+(8X3)+(11X4) =(3X1)+(6X2)+(9X3)+(12X4) = 70 80 90


=(1X5)+(4X6)+(7X7)+(10X8) =(2X5)+(5X6)+(8X7)+(11X8) =(3X5)+(6X6)+(9X7)+(12X8) 158 184 210
Example problems
Hence, this resulted in 2x3 matrix

A= 1 2 3 4 B= 1 2 3
5 6 7 8 4 5 6
7 8 9
10 11 12

70 80 90
158 184 210
Example problems
6. Determine the product C of the following
matrices

A= 3 1 -1 5B= 5 6 8
2 0 3 6 3 2 8
5 6 3 8 7 9 5
Example problems
Note that 𝐴3 𝑥 4 𝑥 𝐵3 𝑋 3 cannot be done since done mathematically since the
inner dimension don’t agree such.
Example problems
Note that 𝐴3 𝑥 4 𝑥 𝐵3 𝑋 3 cannot be done since done mathematically since the
inner dimension don’t agree such.
However, we can swap the position of the two matrices such as 𝐵3 𝑥 3 𝑥 𝐴3 𝑋 4
to perform the operation hence A𝑥𝐵 ≠ 𝐵𝑥𝐴,
Example problems
Note that 𝐴3 𝑥 4 𝑥 𝐵3 𝑋 3 cannot be done since done mathematically since the
inner dimension don’t agree such.
However, we can swap the position of the two matrices such as 𝐵3 𝑥 3 𝑥 𝐴3 𝑋 4
to perform the operation hence A𝑥𝐵 ≠ 𝐵𝑥𝐴,

B= 5 6 8A= 3 1 -1 5
3 2 8 2 0 3 6
7 9 5 5 6 3 8
Example problems

B= 5 6 8 A= 3 1 -1 5
3 2 8 2 0 3 6
7 9 5 5 6 3 8

=(3x5)+(2x6)+(5x8) 67
=
Example problems

B= 5 6 8 A= 3 1 -1 5
3 2 8 2 0 3 6
7 9 5 5 6 3 8

=(3x5)+(2x6)+(5x8) =(1x5)+(0x6)+(6x8) 67 53
=
Example problems

B= 5 6 8 A= 3 1 -1 5
3 2 8 2 0 3 6
7 9 5 5 6 3 8

=(3x5)+(2x6)+(5x8) =(1x5)+(0x6)+(6x8) =(-1x5)+(3x6)+(3x8) 67 53 37


=
Example problems

B= 5 6 8 A= 3 1 -1 5
3 2 8 2 0 3 6
7 9 5 5 6 3 8

=(3x5)+(2x6)+(5x8) =(1x5)+(0x6)+(6x8) =(-1x5)+(3x6)+(3x8) =(5x5)+(6x6)+(8x8) 67 53 37 125


=
Example problems

B= 5 6 8 A= 3 1 -1 5
3 2 8 2 0 3 6
7 9 5 5 6 3 8

=(3x5)+(2x6)+(5x8) =(1x5)+(0x6)+(6x8) =(-1x5)+(3x6)+(3x8) =(5x5)+(6x6)+(8x8) 67 53 37 125


=(3x3)+(2x2)+(5x8) = 53
Example problems

B= 5 6 8 A= 3 1 -1 5
3 2 8 2 0 3 6
7 9 5 5 6 3 8

=(3x5)+(2x6)+(5x8) =(1x5)+(0x6)+(6x8) =(-1x5)+(3x6)+(3x8) =(5x5)+(6x6)+(8x8) 67 53 37 125


=(3x3)+(2x2)+(5x8) =(1x3)+(0x2)+(6x8) = 53 51
Example problems

B= 5 6 8 A= 3 1 -1 5
3 2 8 2 0 3 6
7 9 5 5 6 3 8

=(3x5)+(2x6)+(5x8) =(1x5)+(0x6)+(6x8) =(-1x5)+(3x6)+(3x8) =(5x5)+(6x6)+(8x8) 67 53 37 125


=(3x3)+(2x2)+(5x8) =(1x3)+(0x2)+(6x8) =(-1x3)+(3x2)+(3x8) = 53 51 27
Example problems

B= 5 6 8 A= 3 1 -1 5
3 2 8 2 0 3 6
7 9 5 5 6 3 8

=(3x5)+(2x6)+(5x8) =(1x5)+(0x6)+(6x8) =(-1x5)+(3x6)+(3x8) =(5x5)+(6x6)+(8x8) 67 53 37 125


=(3x3)+(2x2)+(5x8) =(1x3)+(0x2)+(6x8) =(-1x3)+(3x2)+(3x8) =(5x3)+(6x2)+(8x8) = 53 51 27 91
Example problems

B= 5 6 8 A= 3 1 -1 5
3 2 8 2 0 3 6
7 9 5 5 6 3 8

=(3x5)+(2x6)+(5x8) =(1x5)+(0x6)+(6x8) =(-1x5)+(3x6)+(3x8) =(5x5)+(6x6)+(8x8) 67 53 37 125


=(3x3)+(2x2)+(5x8) =(1x3)+(0x2)+(6x8) =(-1x3)+(3x2)+(3x8) =(5x3)+(6x2)+(8x8) = 53 51 27 91
=(3x7)+(2x9)+(5x5) 64
Example problems

B= 5 6 8 A= 3 1 -1 5
3 2 8 2 0 3 6
7 9 5 5 6 3 8

=(3x5)+(2x6)+(5x8) =(1x5)+(0x6)+(6x8) =(-1x5)+(3x6)+(3x8) =(5x5)+(6x6)+(8x8) 67 53 37 125


=(3x3)+(2x2)+(5x8) =(1x3)+(0x2)+(6x8) =(-1x3)+(3x2)+(3x8) =(5x3)+(6x2)+(8x8) = 53 51 27 91
=(3x7)+(2x9)+(5x5) =(1x7)+(0x9)+(6x5) 64 37
Example problems

B= 5 6 8 A= 3 1 -1 5
3 2 8 2 0 3 6
7 9 5 5 6 3 8

=(3x5)+(2x6)+(5x8) =(1x5)+(0x6)+(6x8) =(-1x5)+(3x6)+(3x8) =(5x5)+(6x6)+(8x8) 67 53 37 125


=(3x3)+(2x2)+(5x8) =(1x3)+(0x2)+(6x8) =(-1x3)+(3x2)+(3x8) =(5x3)+(6x2)+(8x8) = 53 51 27 91
=(3x7)+(2x9)+(5x5) =(1x7)+(0x9)+(6x5) =(-1x7)+(3x9)+(3x5) 64 37 35
Example problems

B= 5 6 8 A= 3 1 -1 5
3 2 8 2 0 3 6
7 9 5 5 6 3 8

=(3x5)+(2x6)+(5x8) =(1x5)+(0x6)+(6x8) =(-1x5)+(3x6)+(3x8) =(5x5)+(6x6)+(8x8) 67 53 37 125


=(3x3)+(2x2)+(5x8) =(1x3)+(0x2)+(6x8) =(-1x3)+(3x2)+(3x8) =(5x3)+(6x2)+(8x8) = 53 51 27 91
=(3x7)+(2x9)+(5x5) =(1x7)+(0x9)+(6x5) =(-1x7)+(3x9)+(3x5) =(5x7)+(6x9)+(8x5) 64 37 35 129
Example problems
Hence,𝐵3 𝑥 3 x 𝐴3 𝑥 4 = 𝐶3 𝑥 4 will be

B= 5 6 8 A= 3 1 -1 5
3 2 8 2 0 3 6
7 9 5 5 6 3 8

67 53 37 125
C= 53 51 27 91
64 37 35 129
 Although multiplication is possible, matrix division is not a defined operation. However, if a matrix [A] is square
and nonsingular, there is another matrix [A]−1, called the inverse of [A], for which
 [A]{[A]^−1} = {[A]^−1}[A] = [I ]
 Thus, the multiplication of a matrix by the inverse is analogous to division, in the sense that a number divided
by itself is equal to 1. That is, multiplication of a matrix by its inverse leads to the identity matrix.
 The transpose of a matrix involves transforming its rows into columns and its columns into rows. For example,
for the 3 × 3 matrix:

58
 A permutation matrix (also called a transposition matrix) is an identity matrix with rows and columns
interchanged. For example, here is a permutation matrix that is constructed by switching the first and third
rows and columns of a 3 × 3 identity matrix:

59

You might also like