You are on page 1of 46

GEC220

Engineering Mathematics II

Matrices and Determinants: Solution of system of linear equations


by determinants. Linear dependence and independence, rank of a
matrix. General system of linear equations, existence and properties
of solution, Gaussian elimination. Matrix inverse by elementary
matrices, adjoint, and partitioning methods. Characteristic
polynomial, characteristic equation, eigenvalues and eigenvectors.

Olagoke Oladokun

Covenant University, Ota, Nigeria

©2021
GEC220

Engineering Mathematics II

3 Units

LH 45

Lecturers

• Prof. Vincent
• Dr. Adeeyo
• Dr. Olagoke

Partial Differentiation: Functions of several variables, continuity and partial derivatives.


Total differentials, approximate calculations using differentials. Chain rule. Implicit
differentiation. Series representation of functions (Maclaurin & Taylor’s), Taylor’s
Theorem. Extremum problems, (analytic method) without and with constraints, Lagrange
multipliers, global extremum. Ordinary Differential Equations: Definition, degree, order,
linear, non-linear, solution. First order equations, separable variables, equations reducible
to separable form, exact equations, integrating factors, homogenous differential
equations. Modeling of engineering systems leading to first order differential equations-
electric circuit, mixing/dilution, radioactive decay, bacterial culture. 2 nd order differential
equations with constant coefficients, homogeneous, non-homogeneous, complementary
functions, particular integrals, D-operator method. General linear second-order differential
equations (without using matrices). Power series solution, Legendre’s differential equation.
Modeling of engineering systems leading to 2nd order differential equations- electric circuit,
mechanical oscillations-free and forced, resonance. Pre-requisites: MAT 121 and MAT 122.

Matrices and Determinants: Solution of system of linear equations by determinants. Linear


dependence and independence, rank of a matrix. General system of linear equations,
existence and properties of solution, Gaussian elimination. Matrix inverse by elementary
matrices, adjoint, and partitioning methods. Characteristic polynomial, characteristic
equation, eigenvalues and eigenvectors.
Contents
1 Matrices ......................................................................................................................... 6

1.1 Matrix notation ....................................................................................................... 7

1.2 Addition and Subtraction of Matrices .................................................................... 7

1.3 Multiplication of Matrices ...................................................................................... 8

1.3.1 Scalar Multiplication ........................................................................................ 8

1.3.2 Two matrices multiplication ............................................................................ 8

1.4 Transpose of matrix .............................................................................................. 10

1.5 Square matrix ........................................................................................................ 10

1.5.1 Symmetry matrix ........................................................................................... 10

1.6 Triangular matrix................................................................................................... 11

1.7 Diagonal matrix ..................................................................................................... 11

1.8 Unit matrix ............................................................................................................ 11

1.9 Null matrix ............................................................................................................ 12

2 Determinants ............................................................................................................... 13

2.1 Determinants of the second order ....................................................................... 13

2.2 Determinants of the third order ........................................................................... 14

3 Solution of system of linear equations by determinants ............................................ 17

3.1 Determinant Equation Method ............................................................................ 18

3.1.1 Secondary Degree.......................................................................................... 18

3.1.2 Third Degree .................................................................................................. 19

3.2 Cramers Rule ......................................................................................................... 22


3.2.1 For second degree ......................................................................................... 22

3.2.2 Third degree .................................................................................................. 22

4 Linear dependence and independence ....................................................................... 25

5 Rank of a matrix........................................................................................................... 27

6 General system of linear equations, ........................................................................... 28

7 Existence and properties of solution ........................................................................... 31

7.1 Existence of solution ............................................................................................. 31

7.2 Other properties of the solution .......................................................................... 31

8 Gaussian elimination. .................................................................................................. 33

8.1 Algorithm of Gaussian Elimination ....................................................................... 33

8.2 Determinant from Gaussian Elimination .............................................................. 38

9 Matrix inverse by elementary matrices, adjoint, and partitioning methods. ............. 39

9.1 Inverse of a square matrix .................................................................................... 39

9.2 Cofactors ............................................................................................................... 39

9.3 Adjoint................................................................................................................... 41

10 Eigenvalues and Eigenvectors. .................................................................................... 43

10.1 Eigenvalues........................................................................................................ 43

10.1.1 Example ......................................................................................................... 43

10.2 Eigenvectors ...................................................................................................... 44

10.2.1 Example ......................................................................................................... 44


1

Chapter 1

1 Matrices

A matrix is a set of real or complex numbers (or elements) arranged in rows and columns
to form a rectangular array.

A matrix can be identified by its order denoted as m x n (m by n) matrix.

3 −3 −4
[1 −1 −1] (1.1)
2 −1 4

What is the order of matrix above.

Matrix has order 3 × 3.

The number of rows of A, m = 3 and number of column, n = 3

Similarly, the matrix C below is of order 4 × 2

1 2
4 3
[ ]= 𝑚×𝑛 = 4×2 (1.2)
−1 −5
3 3

1 2
4 3
𝐶=[ ] =𝑚×𝑛 = 4×2 (1.3)
−1 −5
3 3
1.1 Matrix notation

𝑎11 𝑎12 𝑎13


𝑎
𝐴 = [ 21 𝑎22 𝑎23 ] (1.4)
𝑎31 𝑎32 𝑎33

Matrix A is of order 3 x 3 with elements 𝑎ij where i and j represents the index of the row
and column it belongs in the matrix.

1.2 Addition and Subtraction of Matrices

Addition and subtraction of two matrices can only be achieved if they are the same order.

𝐴±𝐵

Only possible if (1.5)

𝐴|𝑚 == 𝐵|𝑚 𝑎𝑛𝑑 𝐴|𝑛 == 𝐵|𝑛

Example

1 −3
𝐴=[ ] (1.6)
4 −2

2 −3
𝐵=[ ] (1.7)
4.1 −4.5

Then

Check the order of A (2 x 2) and compare to order B (2 x 2)?

Since they are both equal the addition and subtraction is possible.

1 −3 2 −3 3 −6
[ ]+[ ]=[ ] (1.8)
4 −2 4.1 −4.5 8.1 −6.5
1 −3 2 −3 −1 0
[ ]−[ ]=[ ] (1.9)
4 −2 4.1 −4.5 −0.1 2.5

1.3 Multiplication of Matrices

1.3.1 Scalar Multiplication

1 −3 4 −12
4×𝐴 = 4×[ ]=[ ] (1.10)
4 −2 16 −8

1.3.2 Two matrices multiplication

To multiply any two matrices the number of columns the first matrix must be equal to the
number of rows of the second matrix. The product matrix will have number of rows of the
first matrix and number of columns of the second matrix

𝐴×𝐵 = 𝑃

Is possible if and only if (1.11)

𝐴|𝑛 == 𝐵|𝑚 ⇒ 𝑃 = 𝐴|𝑚 × 𝐵|𝑛

Example

1 2
4 3
𝐶=[ ] =𝑚×𝑛 = 4×2 (1.12)
−1 −5
3 3
1 −3
𝐴=[ ]=𝑚×𝑛 =2×2 (1.13)
4 −2

𝐴×𝐶

(2 × 2) × (4 × 2)
(1.14)
2 × (2 ≠ 4) × 2

(2 ≠ 4) ∶ 𝐴 × 𝐶 is not possible.

Interchanging

𝐶×𝐴

(4 × 2) × (2 × 2)

4 × (2 = 2) × 2 (1.15)

(2 = 4) ∶ 𝐶 × 𝐴 is possible.

𝐶×𝐴 ≡ 4×2

Let’s carryout the multiplication.

𝑐11 𝑐12
𝑐21 𝑐22 𝑎11 𝑎12
𝐶 × 𝐴 = [𝑐 𝑐32 ] × [𝑎21 𝑎22 ] (1.16)
31
𝑐41 𝑐42

𝑐11 𝑎11 + 𝑐12 𝑎21 𝑐11 𝑎12 + 𝑐12 𝑎22


𝑐21 𝑎11 + 𝑐22 𝑎21 𝑐21 𝑎12 + 𝑐22 𝑎22
𝐶 × 𝐴 = [𝑐 𝑎 + 𝑐 𝑎 𝑐31 𝑎12 + 𝑐32 𝑎22 ] (1.17)
31 11 32 21
𝑐41 𝑎11 + 𝑐42 𝑎21 𝑐41 𝑎12 + 𝑐42 𝑎22
𝑐11 𝑎11 + 𝑐12 𝑎21 𝑐11 𝑎12 + 𝑐12 𝑎22
𝑐21 𝑎11 + 𝑐22 𝑎21 𝑐21 𝑎12 + 𝑐22 𝑎22
𝐶 × 𝐴 = [𝑐 𝑎 + 𝑐 𝑎 𝑐31 𝑎12 + 𝑐32 𝑎22 ] (1.18)
31 11 32 21
𝑐41 𝑎11 + 𝑐42 𝑎21 𝑐41 𝑎12 + 𝑐42 𝑎22

1×1+2×4 1 × −3 + 2 × −2 9 −7
4×1+3×4 4 × −3 + 3 × −2 16 −18
𝐶×𝐴=[ ]=[ ] (1.19)
−1 × 1 + −5 × 4 −1 × −3 + −5 × −2 −21 13
3×1+3×4 3 × −3 + 3 × −2 15 −15

1.4 Transpose of matrix

Interchanging the rows and columns of a matrix is called transpose.

1 −3
𝐴=[ ] (1.20)
4 −2

1 4
𝐴𝑇 = [ ] (1.21)
−3 −2

1.5 Square matrix

Square matrix is a matrix of order m x m. It contains same number of rows and columns.

3 −3 −4
𝐴 = [1 −1 −1] = 3 × 3 (1.22)
2 −1 4

1.5.1 Symmetry matrix

A square matrix is symmetrical if 𝑎𝑖𝑗 = 𝑎𝑗𝑖 , meaning 𝑆 = 𝑆 𝑇 .


1 2 3
𝑆 = [2 4 5] (1.23)
3 5 6

1.6 Triangular matrix

A triangular matrix is a square matrix with all elements below the leading diagonal equal to
zero.

1 2 3
𝐴 = [0 4 5] (1.24)
0 0 6

1.7 Diagonal matrix

A diagonal matrix is a square matrix with all elements zero except the leading diagonal.

1 0 0
𝐴 = [0 4 0] (1.25)
0 0 6

1.8 Unit matrix

A Unit matrix is a special diagonal matrix with the leading diagonal element values all unity
or ones. The unit matrix is denoted by I.

1 0 0
𝑰 = [0 1 0] (1.26)
0 0 1
A useful property

𝑨. 𝑰 = 𝑰. 𝐴 = 𝐴 (1.27)

1.9 Null matrix

A null matrix is one whose elements are all zero.

0 0 0
𝑁 = [0 0 0] (1.28)
0 0 0

A useful property

𝑨. 𝑩 = 0, we cannot say 𝐴 = 0 𝑜𝑟 𝐵 = 0 (1.29)


2
2

Chapter 2

2 Determinants

The arrangement of numbers in an equal rows and columns bounded by a straight bar is
called determinant.

a11 a12
|a a22 | (2.1)
21

2.1 Determinants of the second order

The symbol above is determinant of a 2x2 (two by two matrix) with element 𝑎11 on row 1
and column 1 and 𝑎12 𝑖𝑠 𝑒𝑙𝑒𝑚𝑒𝑛𝑡 𝑜𝑛 𝑟𝑜𝑤1 𝑎𝑛𝑑 𝑐𝑜𝑙𝑢𝑚𝑛 2. mean each element is
identified by row and column number subscript i and j: 𝑎𝑖𝑗 .

By definition,

a11 a12
|a a22 | = a11 a22 − a12 a21 (2.2)
21

a11
a12
To find determinant of |a | , we must multiply the elements diagonally to form the
21 a 22
a
product terms in the expansion: we multiply | 11 | then subtract the
a22
a12
product| |
a21

Note:

a11 𝑏𝑒𝑓𝑜𝑟𝑒 a12 𝑖. 𝑒 𝑐𝑜𝑙𝑢𝑚𝑛 1 𝑏𝑒𝑓𝑜𝑟𝑒 2


1 −3
| | = (1)(−2) − (−3)(4) = −2 + 12 = 10 (2.3)
4 −2

Or

|1 |−| −3| = 1 × −2 − −3 × 4 = 10
(2.4)
−2 4

More example in class

2.2 Determinants of the third order

A determinant of the third order contains 3 rows and 3 columns.

𝑎11 𝑎12 𝑎13


|𝑎21 𝑎22 𝑎23 | (2.5)
𝑎31 𝑎32 𝑎33

In order to find the determinant of a higher order the matrix minor must be developed until
second order is reached.

Developing each element in the first row minor:

𝑎11 𝑎12 𝑎13


|𝑎21 𝑎22 𝑎23 | (2.6)
𝑎31 𝑎32 𝑎33
+ − +
|− + −| (2.7)
+ − +

For 𝑎11

𝑎11
| 𝑎22 𝑎23 | (2.8)
𝑎32 𝑎33

𝑎11 a22 a23


|a
32 a33 | = 𝑎11 (a22 a33 − a23 a32 ) (2.9)

For 𝑎12

𝑎12
|𝑎21 𝑎23 | (2.10)
𝑎31 𝑎33

−𝑎12 a21 a23


|a
31 a33 | = −𝑎12 (a21 a33 − a23 a31 ) (2.11)

For 𝑎13

𝑎13
|𝑎21 𝑎22 | (2.12)
𝑎31 𝑎32

𝑎13 a21 a22


|a
31 a32 | = 𝑎13 (a21 a32 − a22 a31 ) (2.13)

Summing all together:


𝑎11 𝑎12 𝑎13
𝑎 a a23 −𝑎12 a21 a23 +𝑎13 a21 a22
|𝑎21 𝑎22 𝑎23 | = 11 | 22
a32 a33 | |a
31 a33 | |a
31 a32 | (2.14)
𝑎31 𝑎32 𝑎33

3 −3 −4
|1 −1 −1| (2.15)
2 −1 4

3 −1 −1 − −3 1 −1 +−4 1 −1
= | | | | | |
−1 4 2 4 2 −1

= 3((−1 × 4) − (−1 × −1)) − −3((1 × 4) − (−1 × 2))


+ −4((1 × −1) − (−1 × 2))

= 3(−4 − 1) − −3(4 − (−2)) + −4(−1 − (−2))

= 3(−5) + 3(6) − 4(1)

= −15 + 18 − 4 = −1

Try

2 3 4
|6 1 0| = 0
2 3 4
3

Chapter 3

3 Solution of system of linear equations by determinants

A system of linear equations of the second degree of two unknowns can be written below:

𝑎11 𝑥 + 𝑎12 𝑦 = 𝑏1
(3.1)
𝑎21 𝑥 + 𝑎22 𝑦 = 𝑏2

and can further be written in matrices form as

𝑎11 𝑎11 𝑥 𝑏1
[𝑎 ]
𝑎11 𝑦[ ] = [ ] (3.2)
11 𝑏2

𝐴𝑥 = 𝑏 (3.3)

Solving Simultaneous Equation

2𝑥 + 3𝑦 = 10
(3.4)
4𝑥 + 𝑦 = 1

By elimination and substitution

7 38
𝑥=− , 𝑦= (3.5)
10 10
3.1 Determinant Equation Method

3.1.1 Secondary Degree

Equation (1.5) could be written as:

2𝑥 + 3𝑦 − 10 = 0 (𝑎)
(3.6)
4𝑥 + 𝑦 − 1 = 0 (𝑏)

and

𝑎11 𝑥 + 𝑎12 𝑦 + 𝑏1 = 0 (𝑎)


(3.7)
𝑎21 𝑥 + 𝑎22 𝑦 + 𝑏2 = 0 (𝑏)

The solution

𝑥 −𝑦 1
= = (3.8)
∆1 ∆2 ∆0

∆1 ∆2
𝑥= , 𝑦=− (3.9)
∆0 ∆0

where

𝑎11 𝑎12 𝑎 𝑏1 𝑎11 𝑏1


∆0 = |𝑎 𝑎22 | , ∆1 = | 12 |, ∆2 = | | (3.10)
21 𝑎22 𝑏2 𝑎21 𝑏2

Solving Equation 1.7

2 3
∆0 = | | = 2 × 1 − 3 × 4 = −10 (3.11)
4 1
−10 3
∆1 = | | = −10 × 1 − 3 × −1 = −7 (3.12)
−1 1

2 −10
∆2 = | | = 2 × −1 − 4 × −10 = 38 (3.13)
4 −1

∆1 −7 7 ∆2 38 38
𝑥= = = , 𝑦=− =− = (3.14)
∆0 −10 10 ∆0 −10 10

The solution for higher degree system of linear equations are:

For third degree:

𝑥 −𝑦 𝑧 −1
= = = (3.15)
∆1 ∆2 ∆2 ∆0

∆1 ∆2 ∆3
𝑥=− , 𝑦= , z=− (3.16)
∆0 ∆0 ∆0

Note: The positive and negative signs alternate has the degree
increases.

3.1.2 Third Degree

Solve

3𝑥 − 3𝑦 − 4𝑧 = 1
𝑥−𝑦− 𝑧 =2 (3.17)
2x − y + 4y = 3
Rearrange

3𝑥 − 3𝑦 − 4𝑧 − 1 = 0
𝑥−𝑦− 𝑧 −2 =0 (3.18)
2x − y + 4z − 3 = 0

Extract the matrix of coefficients: (3.19)

3 −3 −4 −1
[1 −1 −1 −2] (3.20)
2 −1 4 −3

From Example 1.2

3 −3 −4
∆0 = |1 −1 −1| = −1 (3.21)
2 −1 4

−3 −4 −1
∆1 = |−1 −1 −2| = (3.22)
−1 4 −3

−3 −1 −2 − −4 −1 −2 +−1 −1 −1
= | | | | | |
4 −3 −1 −3 −1 4

= −3(3 − −8) − −4(3 − 2) + −1(−4 − 1)

= −3(11) + 4(1) − (−5) = −24


3 −4 −1
∆2 = |1 −1 −2| (3.23)
2 4 −3

3 −1 −2 − −4 1 −2 +−1 1 −1
= | | | | | |
4 −3 2 −3 2 4

= 3(3 − −8) − −4(−3 − −4) + −1(4 − −2)

= 3(11) + 4(1) − (6) = 31

3 −3 −1
∆3 = |1 −1 −2| (3.24)
2 −1 −3

3 −1 −2 − −3 1 −2 +−1 1 −1
= | | | | | |
−1 −3 2 −3 2 −1

= 3(3 − 2) − −3(−3 − −4) + −1(−1 − −2)

= 3(1) + 3(1) − (1) = 5

From Equation 2.13

∆1 ∆2 ∆3 (3.25)
𝑥=− , 𝑦= , z=−
∆0 ∆0 ∆0
−24 31 5
𝑥=− , 𝑦= , z=− (3.26)
−1 −1 −1

𝑥 = −24, 𝑦 = −31, z = 5

3.2 Cramers Rule

3.2.1 For second degree

For a system of two linear equations in two unknowns (x, y) given below:

𝑎11 𝑥 + 𝑎12 𝑦 = 𝑏1
(3.27)
𝑎21 𝑥 + 𝑎22 𝑦 = 𝑏2

Cramer’s rule states that:

𝑏 𝑎12 𝑎 𝑏1
| 1 | | 11 |
𝑏2 𝑎22 𝑎21 𝑏2
𝑥= 𝑎 , 𝑦= 𝑎 (3.28)
11 𝑎12 11 𝑎12
|𝑎 | | 𝑎21 𝑎22 |
21 𝑎22

The denominator is the determinant of the coefficients of x and y. The numerator for x is
the determinant of coefficient matrix when coefficient of x is replaced by b. Similarly, the
numerator for y is the determinant of coefficient matrix when coefficient of y is replaced
by b.

3.2.2 Third degree

(3.29)
𝑎11 𝑥 + 𝑎12 𝑦 + 𝑎13 𝑧 = 𝑏1
𝑎21 𝑥 + 𝑎22 𝑦 + 𝑎23 𝑧 = 𝑏2
𝑎31 𝑥 + 𝑎32 𝑦 + 𝑎33 𝑧 = 𝑏3

𝑏1 𝑎12 𝑎13
|𝑏2 𝑎22 𝑎23 |
𝑏 𝑎 𝑎
𝑥 = 𝑎 3 𝑎32 𝑎33 , 𝑦 =?, 𝑧 =? (3.30)
11 12 13
|𝑎21 𝑎22 𝑎23 |
𝑎31 𝑎32 𝑎33

𝑎11 𝑏1 𝑎13
|𝑎21 𝑏2 𝑎23 |
𝑎 𝑏 𝑎
𝑦 = 𝑎 31 𝑎 3 𝑎33 , (3.31)
11 12 13
𝑎
| 21 𝑎 22 𝑎 23 |
𝑎31 𝑎32 𝑎33

𝑎11 𝑎12 𝑏1
|𝑎21 𝑎22 𝑏2 |
𝑎 𝑎 𝑏
𝑧 = 𝑎 31 𝑎 32 𝑎 3 , (3.32)
11 12 13
𝑎
| 21 𝑎 22 𝑎 23 |
𝑎31 𝑎32 𝑎33

The Cramer’s rule can be generalized:

𝐷𝑥 𝐷𝑦 𝐷𝑧
𝑥= , 𝑦= , 𝑧= (3.33)
𝐷 𝐷 𝐷

Solve

(3.34)
3𝑥 − 3𝑦 − 4𝑧 = 1
𝑥−𝑦− 𝑧 =2
2x − y + 4y = 3

1 −3 −4
|2 −1 −1|
𝑥= 3 −1 4 = 24 = −24
3 −3 −4 −1
|1 −1 −1|
2 −1 4

3 1 −4
|1 2 −1|
𝑦= 2 3 4 = 31 = −31
3 −3 −4 −1
|1 −1 −1|
2 −1 4

3 −3 1
|1 −1 2|
−5
𝑧 = 2 −1 3 = =5
3 −3 −4 −1
|1 −1 −1|
2 −1 4

Note: For both the determinant Equation Method and Cramer’s rule determinant, ∆0 or 𝐷
, the coefficient of the unknown must not equal zero.

∆0 ≠ 0; 𝐷 ≠ 0
4

Chapter 4

4 Linear dependence and independence

A matrix is said to be linearly dependent if the determinant is zero and linearly independent
if the determinant is not zero.

Linear dependence

𝐷 = |𝐴| = 0 (4.1)

And Linear independence

𝐷 = |𝐴| ≠ 0 (4.2)

Check if the matrices below are linear dependence or independence:

2 3 4
𝐴 = |6 1 0| (4.3)
2 3 4

3 −3 −4
𝐵 = |1 −1 −1| (4.4)
2 −1 4

What is your answer?

2 3 4
𝐴 = |6 1 0| = 0 (4.5)
2 3 4
3 −3 −4
𝐵 = |1 −1 −1| = −1 (4.6)
2 −1 4
5

Chapter 5

5 Rank of a matrix

The rank of an m x n matrix A is the order of the largest square, linear independence sub-
matrix. In order to get a matrix rank you must get a non-zero determinant matrix of the
original m x n matrix or a sub-matrix.

Check the rank of matrix B below:

3 −3 −4
𝐵 = |1 −1 −1| = −1 (5.1)
2 −1 4

Since the determinant is non-zero the rank = 3.

Similarly, check for matrix A.

2 3 4
𝐴 = |6 1 0| = 0 (5.2)
2 3 4

The determinant is zero, we need to check for the determinant of its sub-matrix:

2 3
𝐴1 = | | = −16 (5.3)
6 1

Since the determinant of the sub-matrix A1 is non-zero, we can conclude that matrix A is of
rank =2.
6

Chapter 6

6 General system of linear equations,

A system linear of equations below with three unknown x, y, z:

𝑎11 𝑥1 + 𝑎12 𝑥2 + 𝑎13 𝑥3 = 𝑏1


𝑎21 𝑥1 + 𝑎22 𝑥2 + 𝑎23 𝑥3 = 𝑏2 (6.1)
𝑎31 𝑥1 + 𝑎32 𝑥2 + 𝑎33 𝑥3 = 𝑏3

can be represented using matrix notation:

𝑎11 𝑎12 𝑎13 𝑥1 𝑏1


[𝑎21 𝑎22 𝑎23 ] [𝑥2 ] = [𝑏2 ] (6.2)
𝑎31 𝑎32 𝑎33 𝑥3 𝑏3

Similarly,

𝑎11 𝑥1 + 𝑎12 𝑥2 + 𝑎13 𝑥3 = 𝑏1


(6.3)
𝑎21 𝑥1 + 𝑎22 𝑥2 + 𝑎23 𝑥3 = 𝑏2

𝑥
𝑎11 𝑎12 𝑎13 1 𝑏1
[𝑎 𝑥
21 𝑎22 𝑎23 ] [ 2 ] = [𝑏2 ] (6.4)
𝑥3

Generally,
𝑎11 𝑥1 𝑎12 𝑥2 𝑎13 𝑥3 … 𝑎1𝑛 𝑥𝑛 = 𝑏1
𝑎21 𝑥1 𝑎22 𝑥2 𝑎23 𝑥3 … 𝑎2𝑛 𝑥𝑛 = 𝑏1
𝑎31 𝑥1 𝑎32 𝑥2 𝑎33 𝑥3 … 𝑎3𝑛 𝑥𝑛 = 𝑏1 (6.5)
⋮ ⋮ ⋮ ⋮ ⋮
𝑎𝑚1 𝑥1 𝑎𝑚2 𝑥2 𝑎𝑚3 𝑥3 … 𝑎𝑚𝑛 𝑥𝑛 = 𝑏𝑚

𝑎11 𝑎12 𝑎13 … 𝑎1𝑛 𝑥 𝑏1


1
𝑎21 𝑎22 𝑎23 … 𝑎2𝑛 𝑥2 𝑏2
𝑎31 𝑎32 𝑎33 … 𝑎3𝑛 𝑥3 = 𝑏3 (6.6)
⋮ ⋮ ⋮ ⋮ ⋮ ⋮
[𝑎𝑚1 𝑎𝑚2 𝑎𝑚3 … 𝑎𝑚𝑛 ] [𝑥𝑛 ] [𝑏𝑚 ]

𝐴∙𝑥 =𝑏 (6.7)

where

𝑎11 𝑎12 𝑎13 … 𝑎1𝑛 𝑥1 𝑏1


𝑎21 𝑎22 𝑎23 … 𝑎2𝑛 𝑥2 𝑏2
𝐴 = 𝑎31 𝑎32 𝑎33 … 𝑎3𝑛 ; 𝑥 = 𝑥3 ; 𝑏 = 𝑏3 (6.8)
⋮ ⋮ ⋮ ⋮ ⋮ ⋮
[𝑎𝑚1 𝑎𝑚2 𝑎𝑚3 … 𝑎𝑚𝑛 ] [𝑥𝑛 ] [𝑏𝑚 ]

If we multiply Eq (6.7) by A-1 the inverse of A.

𝐴-1 . 𝐴. 𝑥 = 𝐴-1 . 𝑏 (6.9)

𝐴-1 . 𝐴 = 𝑰 (6.10)

𝑰. 𝑥 = 𝐴-1 . 𝑏 (6.11)

𝑥 = 𝐴-1 . 𝑏 (6.12)

and
-1
CT
𝐴 = (6.13)
|𝐴|
7

Chapter 7

7 Existence and properties of solution

7.1 Existence of solution

Looking at the equations below:

𝐴. 𝑥 = 𝑏 (7.1)

𝑥 = 𝐴-1 . 𝑏 (7.2)

-1
CT
𝐴 = (7.3)
|𝐴|

Forming an augmented matrix 𝐴𝑏 .

𝐴𝑏 . = [𝐴|𝑏] (7.4)

For a solution to exist for a set of linear equations the following must be true:

1. Determinant of 𝐴 must not be equal to zero, i.e |𝐴| ≠ 0.


2. A unique solution exists:
𝑟𝑎𝑛𝑘 of 𝐴 = 𝑟𝑎𝑛𝑘 of 𝐴𝑏 = n
3. An infinite number of solutions exist:
𝑟𝑎𝑛𝑘 of 𝐴 = 𝑟𝑎𝑛𝑘 of 𝐴𝑏 = 𝑚 < 𝑛
4. No solution exists:
𝑟𝑎𝑛𝑘 𝐴 < 𝑟𝑎𝑛𝑘 𝐴𝑏

7.2 Other properties of the solution

𝑥 = 0, 𝐴-1 = 0 or 𝑏 = 0 (7.5)
8

Chapter 8

8 Gaussian elimination.

8.1 Algorithm of Gaussian Elimination

Gaussian elimination method converts the combine matrix of A and b, [𝐴|𝑏] to triangular
matrix. Then proceed with backward substitution to obtain x.

For a system of linear equations

𝑎11 𝑥1 + 𝑎12 𝑥2 + 𝑎13 𝑥3 = 𝑏1


𝑎21 𝑥1 + 𝑎22 𝑥2 + 𝑎23 𝑥3 = 𝑏2 (8.1)
𝑎31 𝑥1 + 𝑎32 𝑥2 + 𝑎33 𝑥3 = 𝑏3

Step 1: Write in matrix form.

𝑎11 𝑎12 𝑎13 𝑥1 𝑏1


𝑎
[ 21 𝑎22 𝑎23 ] [𝑥2 ] = [𝑏2 ] (8.2)
𝑎31 𝑎32 𝑎33 𝑥3 𝑏3

𝐴∙𝑥 =𝑏 (8.3)

Step 2: Arrange matrix A and b together to form augmented matrix 𝐴𝑏 .

𝐴𝑏 = [𝐴|𝑏] (8.4)

𝑎11 𝑎12 𝑎13 | 𝑏1


𝐴𝑏 = [𝑎21 𝑎22 𝑎23 | 𝑏2 ] (8.5)
𝑎31 𝑎32 𝑎33 | 𝑏3
̃𝑏 .
Step 3: Using matrix row equivalent operation reduce 𝐴𝑏 to triangular matrix 𝐴

̃𝑏
𝐴𝑏 → 𝐴 (8.6)

𝑎11 𝑎12 𝑎13 | 𝑏1 𝑎̃11 𝑎̃12 𝑎̃13 | 𝑏̃1


[𝑎21 𝑎22 𝑎23 | 𝑏2 ] → [ 0 𝑎̃22 𝑎̃23 | 𝑏̃2 ] (8.7)
𝑎31 𝑎32 𝑎33 | 𝑏3 0 0 𝑎̃33 | 𝑏̃3

𝑎̃11 𝑎̃12 𝑎̃13 | 𝑏̃1


̃ =[ 0
𝑀 𝑎̃22 𝑎̃23 | 𝑏̃2 ] (8.8)
0 0 𝑎̃33 | 𝑏̃3

Step 4: Back substitution

𝑎̃11 𝑥1 + 𝑎̃12 𝑥2 + 𝑎̃13 𝑥3 = 𝑏̃1


𝑎̃22 𝑥2 + 𝑎̃23 𝑥3 = 𝑏̃2 (8.9)
𝑎̃33 𝑥3 = 𝑏̃3

𝑏̃3⁄ (8.10)
𝑥3 = 𝑎̃33

𝑏̃2 − 𝑎̃23 𝑥3
𝑥2 = (8.11)
𝑎̃22

𝑏̃1 − 𝑎̃12 𝑥2 − 𝑎̃13 𝑥3


𝑥1 = (8.12)
𝑎̃11

Solve the set of equations.

3𝑥 − 3𝑦 − 4𝑧 = 1
𝑥−𝑦− 𝑧 =2 (8.13)
2x − y + 4y = 3
Step 1: Write in matrix form.

𝐴∙𝑥 =𝑏 (8.14)

3 −3 −4 𝑥 1
𝑦
[1 −1 −1] [ ] = [2] (8.15)
2 −1 4 𝑧 3

Step 2: Arrange matrix A and b together augmented matrix 𝐴𝑏 .

𝐴𝑏 = [𝐴|𝑏] (8.16)

3 −3 −4 | 1
𝐴𝑏 = [1 −1 −1 | 2] (8.17)
2 −1 4 | 3

̃.
Step 3: Using matrix row equivalent operation reduce 𝑀 to triangular matrix 𝑀

̃𝑏
𝐴𝑏 → 𝐴 (8.18)

𝑝𝑖𝑣𝑜𝑡, 𝑝 = 1, … , 𝑚 − 1

𝑖 = 𝑝 + 1, . . . , 𝑚

Note: (8.19)

𝑎𝑝𝑝 ≠ 0

If 𝑎𝑝𝑝 ≠ 0 interchange row with a none-zero pivot column element.

𝑎𝑖𝑝
𝑅𝑖 = 𝑅𝑖 − (𝑅𝑝 × ) (8.20)
𝑎𝑝𝑝
𝑝 = 1, . . . ,2; 𝑖 = 2, . . . ,3 (8.21)

̃𝑏
Reduce 𝐴 𝑝=1

𝑝 = 1; 𝑖 = 2 (8.22)

𝑎𝑝𝑝 = 𝑎11 = 3 (8.23)

1
𝑅2 = [1 −1 −1 | 2] − ([3 −3 −4 | 1] × )
3 (8.24)
= [0 0 0.33 | 1.67]

𝑝 = 1; 𝑖 = 3 (8.25)

2
𝑅3 = [2 −1 4 | 3] − ([3 −3 −4 | 1] × )
3 (8.26)
= [0 1 6.67 | 2.33]

3 −3 −4 | 1
̃𝑏
𝐴 = [0 0 0.33 | 1.67] (8.27)
𝑝=1
0 1 6.67 | 2.33

̃𝑏
Reduce 𝐴 𝑝=2

𝑝 = 2; 𝑖 = 3 (8.28)

𝑎𝑝𝑝 = 𝑎22 = 0 (8.29)

Interchange row 2 and 3


3 −3 −4 | 1
̃
𝐴𝑏 𝑝=1 = [0 1 6.67 | 2.33] (8.30)
0 0 0.33 | 1.67

𝑝 = 2; 𝑖 = 3 (8.31)

𝑎𝑝𝑝 = 𝑎22 = 1 (8.32)

0
𝑅3 = [0 0 0.33 | 1.67] − ([0 1 6.67 | 2.33] × )
1 (8.33)
= [0 0 0.33 | 1.67]

3 −3 −4 | 1
̃
𝐴𝑏 𝑝=2 = [0 1 6.67 | 2.33] (8.34)
0 0 0.33 | 1.67

Step 4: Back substitution

3𝑥1 − 3𝑥2 − 4𝑥3 = 1


𝑥2 + 6.67𝑥3 = 2.33 (8.35)
0.33𝑥3 = 1.67

𝑥3 = 1.67⁄
0.33 = 5.06 (8.36)

2.33 − 6.67(5.06)
𝑥2 = = −31.42 (8.37)
1

1 − −3(−31.42) − −4(5.06)
𝑥1 = = −24.34 (8.38)
3
8.2 Determinant from Gaussian Elimination

𝑎̃11 𝑎̃12 𝑎̃13 | 𝑏̃1


̃𝑏 = [ 0
𝐴 𝑎̃22 𝑎̃23 | 𝑏̃2 ] (8.39)
0 0 𝑎̃33 | 𝑏̃3

|𝐴| = (−1)k ∏ 𝑎̃𝑖𝑖 = 𝑎̃11 × 𝑎̃22 × 𝑎̃33 (8.40)


𝑖

where k is the number of times rows were interchanged.

From the example above and Eq (8.34)

𝑚=3

|𝐴| = (−1)1 ∏ 𝑎̃𝑖𝑖 = (−1)1 (3 × 1 × 0.33) = −0.99 (8.41)


𝑖=1
9

Chapter 9

9 Matrix inverse by elementary matrices, adjoint, and partitioning methods.

9.1 Inverse of a square matrix

Recall the solution to system of linear equation:

𝐴. 𝑥 = 𝑏 (9.1)

𝑥 = 𝐴-1 . 𝑏 (9.2)

-1
CT
𝐴 = (9.3)
|𝐴|

To solve Eq (9.3) the inverse of matrix A, (𝐴-1 ) must be evaluated.

where CT is the adjoint of matrix A, and Adjoint is the transpose of the co-factor of matrix
A.

9.2 Cofactors

Cofactor of a square matrix is obtained from the determinant of its elements.

𝑎11 𝑎12 𝑎13 … 𝑎1𝑛


𝑎21 𝑎22 𝑎23 … 𝑎2𝑛
|
|𝐴| = | 𝑎31 𝑎32 𝑎33 … 𝑎3𝑛 | (9.4)
|
⋮ ⋮ ⋮ ⋮
𝑎𝑛1 𝑎𝑛2 𝑎𝑛3 … 𝑎𝑛𝑛
c11 c12 c13 … c1𝑛
c21 c22 c23 … c2𝑛
Cofactor = c31 c32 c33 … c3𝑛 (9.5)
⋮ ⋮ ⋮ ⋮
c
[ 𝑛1 c𝑛2 c𝑛3 … c𝑛𝑛 ]

where each element of the cofactor is formed from the determinant of its sub-matrix
multiplied by element position sign. The element positional sign alternate between plus +
and minus −.

Evaluate the cofactor of the matrix A below:

3 −3 −4
𝐴 = [1 −1 −1] (9.6)
2 −1 4

For element 𝑎11 = 3;


(9.7)
−1 −1
c11 = + | | = −5
−1 4

For element 𝑎12 = −3;


(9.8)
1 −1
c12 = −| | = −6
2 4

For element 𝑎13 = −4;


(9.9)
1 −1
c13 = +| |=1
2 −1

For element 𝑎21 = 1;


(9.10)
−3 −4
c21 = − | | = 16
−1 4

For element 𝑎22 = −1; (9.11)


3 −4
c22 = + | | = 20
2 4

For element 𝑎23 = −1;


(9.12)
3 −3
c23 = − | | = −3
2 −1

For element 𝑎31 = 2;


(9.13)
−3 −4
c31 = + | | = −1
−1 −1

For element 𝑎32 = −1;


(9.14)
3 −4
c32 = −| | = −1
1 −1

For element 𝑎33 = 4;


(9.15)
3 −3
c13 = + | |=0
1 −1

The cofactor form is:

−5 −6 1
Cofactor 𝐴 = [ 16 20 −3] (9.16)
−1 −1 0

9.3 Adjoint

Adjoint of matrix A is the transpose of the cofactor of A.

From Eq (9.16)
−5 16 −1
𝐴𝑑𝑗 𝐴 = 𝐶 𝑇 = [−6 20 −1] (9.17)
1 −3 0

CT
𝐴-1 = (9.18)
|𝐴|

3 −3 −4
|𝐴| = |1 −1 −1| = −1 (9.19)
2 −1 4

Therefore

1 −5 16 −1 5 −16 1
𝐴-1 = [−6 20 −1] = [ 6 −20 1] (9.20)
−1
1 −3 0 −1 3 0

To solve the system linear of equation

𝑥 = 𝐴-1 . 𝑏 (9.21)

𝑥 5 −16 1 1
𝑦
[ ] = [ 6 −20 1] [2]
𝑧 −1 3 0 3
(9.22)
𝑥 (5 × 1) + (−16 × 2) + (1 × 3) −24
[𝑦] = [(6 × 1) + (−20 × 2) + (1 × 3)] = [−31]
𝑧 (−1 × 1) + (3 × 2) + (0 × 3) 5
10

10

Chapter 10

10 Eigenvalues and Eigenvectors.

10.1 Eigenvalues

Eigenvalues are characteristic scalar value (𝜆) of a square matrix (𝐴) that satisfy the
equation 10.1.

𝐴𝑥 = 𝜆𝑥 (10.1)

In other to find the eigenvalues, we develop the characteristic equation and solve the
characteristic polynomial of matrix A.

(𝐴 − 𝜆𝑰)𝑥 = 0 (10.2)

To prevent the trivial solution 𝑥 ≠ 0. Therefore we have the characteristic equation Eq


(10.3).

|𝐴 − 𝜆𝑰| = 0 (10.3)

The solution of Eq (10.3) gives the eigenvalues 𝜆.

10.1.1 Example

Find the eigenvalues of the matrix.

2 3
𝐴=[ ] (10.4)
4 1

2 3 1 0 (2 − 𝜆) 3
𝐴 − 𝜆𝑰 = [ ]−𝜆[ ]=[ ] (10.5)
4 1 0 1 4 (1 − 𝜆)
(2 − 𝜆) 3
|𝐴 − 𝜆𝑰| = | | = (2 − 𝜆)(1 − 𝜆) − 12
4 (1 − 𝜆)
= 2 − 2𝜆 − 𝜆 + 𝜆2 − 12 (10.6)

|𝐴 − 𝜆𝑰| = 𝜆2 − 3𝜆 − 10 = 0

The solutions to the characteristic polynomial in Eq 10.6

𝜆 = −2 𝑜𝑟 5 (10.7)

𝜆1 = −2, 𝜆2 = 5 (10.8)

10.2 Eigenvectors

Each eigenvalues obtained has a corresponding eigenvector or eigenline associated with it.

𝐴𝑥 = 𝜆𝑥 (10.9)

10.2.1 Example

When matrix A is:

2 3
𝐴=[ ]
4 1
(10.10)
𝜆1 = −2, 𝜆2 = 5

For 𝜆1 = −2

2 3 𝑥1 𝑥1
[ ] [𝑥 ] = −2 [𝑥 ] (10.11)
4 1 2 2
2𝑥1 + 3𝑥2 = −2𝑥1
4𝑥1 + 𝑥2 = −2𝑥2 (10.12)

4
𝑥2 = − 𝑥1 (10.13)
3

The eigenvector for 𝜆1 = −2

𝑘 1
𝑥1 = [−4𝑘] and the smallest: 𝑥1 = [−4] (10.14)
3 3

For 𝜆2 = 5

2 3 𝑥1 𝑥1
[ ] [𝑥 ] = 5 [𝑥 ] (10.15)
4 1 2 2

2𝑥1 + 3𝑥2 = 5𝑥1


4𝑥1 + 𝑥2 = 5𝑥2 (10.16)

𝑥2 = 𝑥1 (10.17)

The eigenvector for 𝜆2 = 5

𝑘 1
𝑥2 = [ ] and the smallest: 𝑥2 = [ ] (10.18)
𝑘 1

You might also like