UGCM1653 - Chapter 1 Linear Algebra - 202001 PDF

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

UGCM1653/UCCM1653 - Mathematics for Engineering I

CHAPTER 1: LINEAR ALGEBRA

Part 1: Linear Algebra

Review of matrices operations

Definition:
A matrix is a rectangular array of numbers denoted by
 a11 a12 L a1n 
a a 22 L a 2 n 
[ ]
A = aij =  21
 M M O M 
aij is called an entry or element.
 
a m1 a m 2 L a mn 

(a) Transpose of a Matrix

Definition:
If A = a  , then the transpose of A, AT is the n × m matrix defined by
m × n  ij 
AT = a  = a 
T
 ij   ji 
Thus the transpose of A is obtained from A by interchanging the rows and columns of A.

Example 1.1:

1 2
1 − 2 3 
If A =   , then A = − 2 − 1
T 
2 − 1 4 2×3  3 4  3×2

Properties of Transpose
If A , and B are matrices and c is a scalar, then
a) ( AT ) T = A
b) ( A + B ) T = AT + B T
c) ( AB) T = B T AT
d) (cA) T = cAT

DETERMINANTS

Determinant of a square matrix:

1
UGCM1653/UCCM1653 - Mathematics for Engineering I

(i) Determinant of a 2 × 2 matrix:

Definition:

 a11 a12 
If A =  is a square matrix of order 2, then
a 21 a 22 
a a
A = 11 12 = a11 a 22 − a12 a 21
a 21 a 22

Example 1.2:

Evaluate determinants of order 2.

3 1
1. = (3)(2) – (1)( – 4) =10
−4 2

2 6
2. = (2)(0) – (6)(– 6) = 36
−6 0

(ii) Determinant of a n × n matrix:

Evaluating determinants of a square matrix A of order n (n > 2)

With a given entry of A we associate the square matrix of order n − 1 obtained by deleting
the entries in the row and column in which the given entry lies.

For example, given the matrix

 a11 a12 a13 


A = a21 a22 a23 
a31 a32 a33 

With entry a11 , we delete the entries in row 1 and column 1, leaving the matrix of order 2
as follows:
a 22 a 23 
a 
 32 a33 

The determinant of this matrix is called the minor of a11 .


a22 a23
Minor of a11 = = a 22 a33 − a23 a32
a32 a33

2
UGCM1653/UCCM1653 - Mathematics for Engineering I

Similarly
a21 a23
Minor of a12 = = a21a33 − a23 a31
a31 a33

a21 a22
and Minor of a13 = = a21a32 − a22 a31
a31 a32

The cofactor of the entry aij is given by

[
cij = (−1) i + j × minor of aij ]
Where i + j is the sum of the row number I and column number j which the entry lies.

Example 1.3:
a12 a13
1. Cofactor of the entry a21 , c21 = (−1) 2+1 = (−1)(a12 a33 − a13 a32 )
a32 a33

a12 a13
2. Cofactor of the entry a31 , c31 = (−1) 3+1 = (1)(a12 a 23 − a13 a 22 )
a 22 a 23

Note: The only difference between a cofactor and minor is the factor (−1) i+ j .

Determinant of a Square Matrix:

To find the determinant of any square matrix A of order n ( n > 2), select any row ( or column) of
A and multiply each entry in the row ( column) by cofactor. The sum of these products is defined
to be the determinant of A and is called a determinant of order n.

For any square matrix A of order n (n>2), determinant of A is formulated as below:


A = ai1[cofactor ai1 ] + ai 2 [cofactor ai 2 ] + ai3[cofactor ai 3 ] + .......+ ain [cofactor ain ]

Example 1.4:
Evaluate the determinant of order 3 by using cofactor.

 12 − 1 3 
A =  − 3 1 − 1
− 10 2 − 3

3
UGCM1653/UCCM1653 - Mathematics for Engineering I

Solution:
A = a11 [cofactor of a11 ] + a12 [cofactor of a12 ] + a13 [cofactor of a13 ]
[ ] [ ] [
= (12) (−1)1+1 × minor of a11 + (−1) (−1)1+ 2 × minor of a12 + (3) (−1)1+3 × minor of a13 ]
1 −1 − 3 −1 − 3 11
= 12 + (−1) 2 + (3)
2 −3 − 10 − 3 − 10 2
= −12 − 1 + 12
= −1

Inverse of Matrices

(a) Finding the Inverse of a 2 × 2 Matrix:

a b 
If A =   , then the inverse of a matrix is given by
c d 

1  d − b
A −1 = − c a  where A = ad − bc ≠ 0
A  

If ad − bc = 0 , then A is singular, matrix A has no multiplicative inverse.

Example 1.5:

1 2 −1
Let A =   . Find A .
3 7 

Solution:

det A = A = (1)(7) − (2)(3) = 7 − 6 = 1 , thus

1  7 − 2 1  7 − 2  7 − 2
A −1 = × = =
A − 3 1  1 − 3 1  − 3 1 

(b) Finding the Multiplicative Inverse of a 3× 3 Matrix By Using the Cofactor Methods:

For a matrix of order 3,

 a11 a12 a13 


A = a21 a22 a23 
a31 a32 a33 

4
UGCM1653/UCCM1653 - Mathematics for Engineering I

The inverse of a matrix is given by

1
A −1 = adjoint of A
A

=
1
[Cofactors of A] T
A

=
1
A
[ ]
cij T

T
 c11 c12 c13 
1 
= c21 c22 c23 
A
c31 c32 c33 

Note:
a) The cofactor of the entry aij , cij = (−1) i + j × [ minor of aij ]
b) [c ] is called the adjoint of A (adj A).
ij
T

adjA = [c ]
T
ij

1
Thus, A −1 = adj A
A

Example 1.6:
3 − 2 1 
Find A if it is invertible, given that A = 5 6
−1
2  .
1 0 − 3
Solution:
1
A −1 = adj A where adjA = cij
A
T
[ ]
so, we have to determine
1) cofactor for each element  cofactor A  adj A
2) A

Firstly, we compute the cofactors of A, we have

6 2 5 2 5 6
c11 = (−1)1+1 = −18 c12 = (−1)1+ 2 = 17 c13 = (−1)1+3 = −6
0 −3 1 −3 1 0
c 21 = −6 c 22 = −10 c 23 = −2
c31 = −10 c32 = −1 c33 = 28

5
UGCM1653/UCCM1653 - Mathematics for Engineering I

 − 18 17 − 6
Cofactors of A =  − 6 − 10 − 2
− 10 − 1 28 

adj A = [Cofactors of A]T

Hence,
− 18 − 6 − 10
adj A =  17 − 10 − 1 
 − 6 − 2 28 
Secondly, by choosing the first row, compute the determinant of A, we have

A = a11c11 + a12 c12 + a13 c13 = (3)(−18) + (−2)(17) + (1)(−6) = −94

− 18 − 6 − 10
adj A = −  17 − 10 − 1 
−11 1 
Thus, A =
A 94
 − 6 − 2 28 

System of Linear Equations


A system of linear equations can be solved by three methods;
1. Inverse matrix, X = A −1 B .
2. Cramer’s Rule.
3. Gaussian Elimination.

Recall:
- A system of equation is a collection of two or more equation, each containing one or
more variables.
- A solution of a system of equation consists of values for the variable that reduce each
equation of the system to a true statement.
- To solve a system of equation means to find all solution of the system.
- When a system of equation has at least one solution, it is said to be consistent; otherwise
it is called inconsistent

Example of systems of linear equations

 x1 + x2 + x3 = 6
 2x + y = 5 
 3 x1 − 2 x2 + 4 x3 = 9
− 4 x + 6 y = − 2 x − x2 − x3 = 0
 1

6
UGCM1653/UCCM1653 - Mathematics for Engineering I

In general, a system of m linear equations in n unknowns can be conveniently written as:

a11 x1 + a12 x2 + K + a1n xn = b1


a21 x1 + a22 x2 + K + a 2 n xn = b2
M
am1 x1 + am 2 x2 + K + amn xn = bm

We define

 a11 a12 L a1n   x1   b1 


a a22 L a2 n  x  b 
A =  21 X =  2 B=  2 
 M M M M  M M
     
a m1 am 2 L amn  m×n  x n  n ×1 bm  m ×1

Thus, a system of linear equation can be written in matrix form: AX = B where A is the
coefficient matrix of the system, and B is the constant matrix. If B = 0, then the system is called a
homogeneous system of liner equations. Otherwise, it is called non-homogeneous system.

(i) Solving a System of Linear Equation Using Inverses

Linear system:

AX = B where A is n × n matrix
Suppose A is invertible, multiply both sides by A-1

A −1 AX = A −1 B
I n X = A −1 B
X = A −1 B
Thus, X = A −1 B is the solution of the linear system (a unique solution if A is non-singular)

Example 1.7:
Solve the following system by using the inverse matrix:

2x + 8z = 8
− x + 4 y = 36
2x + y = 9

7
UGCM1653/UCCM1653 - Mathematics for Engineering I

Solution:

We define:

 2 0 8  x 8
A = − 1 4 0 X =  y  B = 36
 2 1 0  z   9 

Since the solution is X = A −1 B and A −1 =


1
| A|
adj A =
1
| A|
cij [ ] T

1
 X = A −1 B = adj A ⋅ B , so we need to find the cofactor of matrix A and the
| A|
determinant of matrix A:

Cofactor
4 0 −1 0 −1 4
c11 = (−1)1+1 =0 c12 = (−1)1+ 2 =0 c13 = (−1)1+3 = −9
1 0 2 0 2 1
c 21 = 8 c 22 = −16 c 23 = −2
c 22 = −32 c32 = −8 c33 = 8

 0 0 − 9 0 8 − 32
[ ]
Cofactors of A = cij =  8 − 16 − 2  adj A = cij [ ] T
=  0 − 16 − 8 

− 32 − 8 8  − 9 − 2 8 
Det A = |A| = (0)(2) + (0)(0) + (-9)(8) = -72

1
Finally, the solution to the system is: X = A −1 B = adj A ⋅ B
| A|
0 8 − 32  8 
1 
=  0 − 16 − 8  36
− 72
− 9 − 2 8   9 
 x  0 
∴  y  = 9
 z  1
x = 0, y = 9 and z = 1

Note:
We can check the answer by substituting x = 0, y = 9 and z = 1 into all equations. The answer is
correct if the values can satisfy all equations.

8
UGCM1653/UCCM1653 - Mathematics for Engineering I

(ii) Cramer’s Rule

(a) Solving a linear system in two variable using determinants.


a1 x + b1 y = c1
a2 x + b2 y = c2
Then, the solution is
Dx Dy
x= and y=
D D
Where

c1 b1 a1 c1 a1 b1
Dx = Dy = D= ≠0
c2 b2 a2 c2 a2 b2
Note:
For Dx, replace the coefficient x elements in column with rand hand side value in
column. Same methodology applies for other variables.

(b) Solving Three Equations in Three variable using determinants.

a1 x + b1 y + c1 z = d1
a2 x + b2 y + c2 z = d 2
a3 x + b3 y + c3 z = d 3

Dx Dy Dz
Then, x= y= z=
D D D

a1 b1 c1
Where D = a2 b2 c2 ≠ 0
a3 b3 c3

d1 b1 c1 a1 d1 c1 a1 b1 d1
Dx = d 2 b2 c2 D y = a2 d2 c2 Dz = a 2 b2 d2
d3 b3 c3 a3 d3 c3 a3 b3 d3

Example 1.8:
Solve the following system with Cramer’s rule.
x + 2y + z = 4
3x − 4 y − 2 z = 2
5 x + 3 y + 5 z = −1
Solution:
D Dy D
x= x y= z= z
D D D

9
UGCM1653/UCCM1653 - Mathematics for Engineering I

1 2 1 4 2 1
D = 3 − 4 − 2 = −35 D x = 2 − 4 − 2 = −70
5 3 5 −1 3 5
1 4 1 1 2 4
Dy = 3 2 − 2 = −105 Dz = 3 − 4 2 = 140
5 −1 5 5 3 −1
− 70 − 105 140
So, x= =2 y= =3 z= = −4
− 35 − 35 − 35

(iii) Gaussian Elimination

Gaussian elimination is a systematic way of simplifying a system of equation so that a solution


can easily be found. Manipulation of the matrix is carried out by performance a matrix into a
form known as echelon form, Once in this form, the solution to the original equation is easily
found.

Procedure to use the Gaussian elimination methods:


1. Write down the augmented matrix.
2. Apply elementary row operation (ERO) to obtain row echelon form.
3. Solve the system.

Augmented matrix:
Consider the system of the linear equations:
4x + 3 y = 6
3x − 8 y = 1
This system may be represented in the matrix form
 4 3 6
 
3 − 8 1
This is an example of an augmented matrix.
Note: the elements of the augmented matrix comprise the coefficients of x and y and also the
right-hand sides of the equation.

Types of solution by augmented matrix:


1. A unique solution
2. An infinite number of solutions
3. No solution

Row-echelon form of an augmented matrix:

For a matrix to be in row-echelon form: (characteristic)


1. Any rows that consist entirely of zeros are the last rows of the matrix.
2. For a row that is not all zeros, the first non-zero element is a one. We call this a leading 1.
3. All elements below leading 1 are zero.
4. As you move down the rows of the matrix, the leading 1 is move progressively to the right.

10
UGCM1653/UCCM1653 - Mathematics for Engineering I

5. At least one row is non-zero.

Example:
 1 * *  1 * * * *  0 1 * *
     
A =  0 1 * B =  0 1 * * * C =  0 0 1 *
 0 0 1  0 0 0 1 *  0 0 0 0
     

Note: * denotes any number


Matrices A, B, and C are matrices in echelon form.

Elementary row operations:

Given any augmented matrix we would like to be able to transform it into row-echelon form as
the solution of the system can then easily be found. The way we effect this transformation is by
using elementary row operations.

The elementary row operations that change a system but leave the solution unaltered are as
follows:
1. Interchange the order of the equation. (first non-zero element is a one)
2. Multiply or divide an equation by non-zero constant.
3. Add, or subtract, a multiple of one equation to, or from, another equation.

When applied to a system, elementary row operations may change the equations but the solution
to the resulting system remains unchanged.

Example 1.9:

 2 5 12  1 1 3   1 1 3
    →      →  
1 1 3  R1 ↔ R2  2 5 12  R2 : R2 − 2 R1  0 3 6
1 1 3
  →  
R2 : R2 / 3  0 1 2

Rank of a Matrix

For the matrix in echelon form, the number of non-zero rows is called the rank of the matrix. It is
denoted by Rank (A) for matrix A. (Note: zero row means all the elements in the row are zero)

Given a system of linear equation AX=B, it can be written in augmented matrix. The rank of the
augmented matrix is written as Rank ( A B )

11
UGCM1653/UCCM1653 - Mathematics for Engineering I

Example 1.10:
1 2 1 
 
Given matrix A =  − 1 − 2 − 2  . Find the rank of matrix A.
 −1 −1 0 
 

Solution:
1 2 1  1 2 1 1 2 1 
     
A =  − 1 − 2 − 2     → 0 0 − 1     → 0 0 − 1
 − 1 − 1 0  R2 : R2 + R1  − 1 − 1 0 
R3 : R3 + R1  
   0 1 1 
1 2 1  1 2 1
   
  → 0 1 1     → 0 1 1
R2 ↔ R3   R3 :− R3  0 0
 0 0 − 1  1

 1 2 1
 
Matrix A in echelon form is  0 1 1
 0 0 1
 
Number of rows with non-zero = 3
Therefore, Rank (A) = 3

Example 1.11:
Find the rank of the augmented matrix below.
 1 −1 2 0
 
(A B) =  1 0 − 1 0 
 0 −1 3 0
 

Solution:
1 −1 2 0  1 −1 2 0 1 −1 2 0
     
 1 0 − 1 0      → 0 − 1 3 0     → 0 1 − 3 0 
 0 − 1 3 0  R2 :− R2 + R1  0 − 1 3 0  R2 :− R2  0 − 1 3 0 
     

 1 −1 2 0
 
   → 0 1 − 3 0 
R3 :R2 + R3 
0 0 0 0 
Number of rows with non-zero = 2
Therefore, Rank ( A B ) = 2

12
UGCM1653/UCCM1653 - Mathematics for Engineering I

Theorem: Non-homogeneous system of linear equations


For non-homogeneous system of linear equations, AX=B ( B ≠ 0 ), the system of linear equations
have
i) unique solution if
Rank (A) = Rank ( A B ) = number of variables
ii) infinite solution if
Rank (A) = Rank ( A B ) < number of variables
iii) no solution if
Rank (A) < Rank ( A B ) = number of variables

Theorem: Homogeneous system of linear equations


For homogeneous system of linear equations, AX=0, the system of linear equations have
ii) unique solution if
Rank (A) = number of variables
iii) infinite solution if
Rank (A) < number of variables

Example 1.12 (Case 1: unique solution)


Solve the system of linear equations below by using Gauss elimination methods.
x1 + 2 x2 − x3 = 6
3x1 + 8 x2 + 9 x3 = 10
2 x1 − x2 + 2 x3 = −2

Solution:
Augmented matrix is
 1 2 −1 6 
 
A B =  3 8 9 10 
 2 −1 2 − 2
 
Perform elementary row operation to obtain matrix in echelon form.
 1 2 −1 6   1 2 −1 6   1 2 −1 6 
     
 3 8 9 10     → 0 2 12 − 8    
− → 0 2 12 −8 
 2 − 1 2 − 2  R2 : R2 − 3R1  2 − 1 2 − 2 
R :R 2 R
3 3 1 0 − 5 4 − 14 
    
 1 2 −1 6  1 2 −1 6  1 2 −1 6 
     
 → 0 1 6 − 4     → 0 1 6 − 4   → 0 1 6 − 4
R R3 : R3 + 5 R2  R
R2 : 2  0 − 5 4 − 14   0 0 34 − 34  R3 : 3  0 0 1 − 1 
2 34

Rank (A) = 3, Rank ( A B ) = 3, number of variables = 3


Since Rank (A) = Rank ( A B ) = number of variables, therefore, there is unique solution for the
system of linear equations.
By using backward substitution,
Row 3:

13
UGCM1653/UCCM1653 - Mathematics for Engineering I

x3 = −1
Row 2:
x 2 + 6 x 3 = −4
x2 = −4 − 6 x3 = −4 − 6(−1)
x2 = 2

Row 1:
x1 + 2 x2 − x3 = 6
x1 = 6 − 2 x2 + x3 = 6 − 2(2) + (−1)
x1 = 1
The solution is x1 = 1, x2 = 2, x3 = −1

Example 1.13 (Case 2: infinite solution)


Solve the system of linear equations below by using Gauss elimination methods.
x1 + x2 − x3 + x4 = 7
x1 + 2 x2 + 2 x4 = 15
x1 + x2 = 17

Solution:
Augmented matrix is
1 1 − 1 1 7 
 
A B = 1 2 0 2 15 
1 1 0 0 17 
 
Perform elementary row operation to obtain matrix in echelon form.
1 1 − 1 1 7   1 1 −1 1 7  1 1 −1 1 7 
     
1 2 0 2 15   R :
R → 0 1 1 1 8     
−R → 0 1 1 1 8 
1 1 0 0 17  2 2 1  1 1 0 0 17  R3 :R3 − R1  0 0 1 − 1 10 
     

Rank (A) = 3, Rank ( A B ) = 3, number of variables = 4


Since Rank (A) = Rank ( A B ) < number of variables, therefore, there is infinite solution for the
system of linear equations

Let x4 = t where t is any number


By using backward substitution
Row 3:
x3 − x 4 = 10
x3 − t = 10
x3 = 10 + t
Row 2:

14
UGCM1653/UCCM1653 - Mathematics for Engineering I

x 2 + x3 + x 4 = 8
x 2 = 8 − x3 − x 4
x2 = 8 − (10 + t ) − t
x2 = −2 − 2t
Row 1:
x1 + x2 − x3 + x4 = 7
x1 = 7 − x 2 + x3 − x4
x1 = 7 − (−2 − 2t ) + (10 + t ) − t
x1 = 19 + 2t
The solution is x1 = 19 + 2t , x2 = −2 − 2t , x3 = 10 + t , x4 = t

Example 1.14 (Case 3: no solution)


Solve the system of linear equations below by using Gauss elimination methods.
x1 + x2 − x3 = 3
− x1 + x2 + x3 = 2
x1 + 3 x2 − x3 = 6

Solution:
Augmented matrix is
 1 1 −1 3
 
A B =  −1 1 1 2
 1 3 −1 6
 
Perform elementary row operation to obtain matrix in echelon form.
 1 1 −1 3  1 1 −1 3  1 1 − 1 3
     
 − 1 1 1 2      → 0 2 0 5     → 0 2 0 5 
 1 3 − 1 6  R2 :R2 + R1  1 3 − 1 6  R3 :R3 − R1  0 2 0 3 
     
 1 1 −1 3   1 1 −1 3 
   5 
   → 0 2 0 5    → 0 1 0 
R3 : R3 − R2   R2 : R2 / 2  2 
 0 0 0 − 2  0 0 0 − 2
 

Rank (A) = 2, Rank ( A B ) = 3, number of variables = 3


Since Rank (A) < Rank ( A B ) = number of variables, therefore, there is no solution for the
system of linear equations

Note:
Based on row 3,
0 x1 + 0 x2 + 0 x3 = −2 is impossible.
This is because 0 x1 + 0 x2 + 0 x3 = 0 . Therefore, there is no solution for the system of linear
equations.

15
UGCM1653/UCCM1653 - Mathematics for Engineering I

The eigenvalue problem

Definition:

Let A be a n × n matrix. A number λ is said to be an eigenvalue of A if there exists a nonzero


solution vector X of the linear system,
AX = λX
The vector X is said to be eigenvector corresponding (associated) to the eigenvalue λ .

From the definition, λ = 0 can be eigenvalue but the zero vector is Not an eigenvector for any
matrix.

Example 1.15:
1  0 − 1 − 3
   
Verify that X =  − 1 is an eigenvector of the matrix  2 3 3 ?
1 − 2 1 1 
  

Solution:
 0 − 1 − 3
 
Let A =  2 3 3 
− 2 1 1 

AX = λX

 0 − 1 − 3  1   − 2  1
      
AX =  2 3 3   − 1 =  2  = −2 − 1
− 2 1 1   1   − 2  1
  
Since AX = λX where λ = −2 , then X is an eigenvector of A.

16
UGCM1653/UCCM1653 - Mathematics for Engineering I

Characteristics polynomial and Characteristics equation of a matrix

The system of simultaneous equations


AX = λX
Where A is an n × n matrix and X = ( x1 , x2 ,K, xn )T is an n × 1 column vector can be written in the
form
λX − AX = 0
λIX − AX = 0
(λI − A) X = 0 (1)
Where I is the n × n identity matrix. 0 is called zero or null matrix (all elements are zero).
Equation (1) is set of homogeneous equations.
Note: We can also use ( A − λI ) X = 0

If det (λI − A) ≠ 0 then (1) has only the zero solution x = 0.


On the other hand if c(λ ) = det(λI − A) = 0 , then (1) has a non-trivial solution x ≠ 0 .
Therefore, (1) has non-zero solution if and only if det (λI − A) = 0 .

Here c(λ ) = det(λI − A) is called the characteristics polynomial of A.


The equation c (λ ) = det(λI − A) = 0 is called the characteristics equation of A.

Example 1.16:

Find the characteristics equation for the matrix


2 2 1
 
A = 1 3 1
1 2 2
 

Solution:
c(λ ) = det(λI − A) = 0 . Therefore, firstly, we have to find λI − A

1 0 0  2 2 1  λ − 2 − 2 −1 
     
λI − A = λ  0 1 0  −  1 3 1  =  − 1 λ − 3 − 1 
 0 0 1  1 2 2  −1 − 2 λ − 2 
    
c(λ ) = det(λI − A) = 0
λ −2 −2 −1
c (λ ) = − 1 λ −3 −1 = 0
−1 −2 λ−2

c(λ ) = λ3 − 7λ2 + 11λ − 5 = 0 is the required characteristic equation.


Continue solving this equation, it yields
c(λ ) = (λ − 5)(λ2 − 2λ + 1) = 0

17
UGCM1653/UCCM1653 - Mathematics for Engineering I

c(λ ) = (λ − 5)(λ − 1) 2 = 0
(λ − 5) = 0 or (λ − 1) 2 = 0
λ = 1 or λ = 5 (root of the equation)

Methods of finding eigenvalues and respective eigenvectors


Suppose A is n × n matrix.

Step 1: Find the roots of the characteristics equation


c (λ ) = λ I − A = 0
The roots λ1 , λ2 , λ3 , … , λn are the eigenvalus of A.
Step 2: For each λ j , j = 1,2, K , n , find the respective
eigenvector X j by solving
(λ j I − A) X = 0
 x1 
 
x 
where X =  2 
...
 
x 
 n

Example 1.17:

Determine the eigenvalues and eigenvectors for the matrix A.


 1 1 − 2
 
A =  −1 2 1 
 0 1 −1
 
Solution:
The characteristic equation, λI − A = 0
λ −1 −1 2
1 λ −2 −1 = 0
0 −1 λ +1
(λ − 1)[(λ − 2)(λ + 1) − 1] + (λ + 1) + 2(−1) = 0
(λ − 1)(λ2 − λ − 2) = 0
(λ − 1)(λ + 1)(λ − 2) = 0
λ − 1 = 0 or λ + 1 = 0 or λ − 2 = 0
Hence, the eigenvalues are λ = 2 , 1 and -1.

To find eigenvectors, use the formula below:


(λ j I − A) X = 0

18
UGCM1653/UCCM1653 - Mathematics for Engineering I

19
UGCM1653/UCCM1653 - Mathematics for Engineering I

The Diagonalization

A square matrix is called a diagonal matrix if all the off diagonal elements are zero. A diagonal
matrix has the appearance
d 1 0 L 0 0
0 d L 0 0 
 2

D=0 0 O 0 0
 
M M L d n −1 0 
 0 0 L 0 d n 
Diagonal matrices have many pleasant properties. Let A and B be n × n diagonal matrices with
diagonal elements, respectively aii and bii .

1. A + B is diagonal with diagonal elements aii + bii .


2. AB is diagonal with diagonal elements aii bii .
3. |A| = a11 a 22 a 33 ....a nn the product of the diagonal elements.
4. A is nonsingular (invertible) exactly when each diagonal element is nonzero (so A has
nonzero determinant). In this event, A-1 is the diagonal matrix having diagonal elements

20
UGCM1653/UCCM1653 - Mathematics for Engineering I

1
.
aii
5. The eigenvalues of A are its diagonal elements.

Most matrices are not diagonal. However, sometimes it is possible to transform a matrix to a
diagonal one. This will enable us to transform some problems to simpler one.

Definition:
An n × n matrix A is diagonalizable if there is an n × n matrix P such that

P −1 AP

is a diagonal matrix. In this case we say that P diagonalizes A.

Example 1.18:

Find the matrix P that diagonalizes the given matrix A below. Show that the matrix is
diagonalizable by determining P −1 AP .
 1 1 − 2
 
A =  −1 2 1 
 0 1 −1
 

Solution:
Step 1: Find the eigenvalues for matrix A.

Step 2: For each eigenvalue, find its corresponding eigenvector for matrix A.

Note: By referring to the solution from example 1.24, the eigenvectors are as below:

 3  3
   
For λ1 = 1 , Eigen vector is t  2  , Choose v =  2 
1 1
   

1 1
   
For λ 2 = −1 , Eigen vector t  0  , Choose  0
1 1
   

1 1
   
For λ3 = 2 , Eigen vector is t  3  . Choose v =  3 
1 1
   

21
UGCM1653/UCCM1653 - Mathematics for Engineering I

 3 1 1
 
Then P =  2 0 3 
 1 1 1
 
(Note: We can form the matrix P regardless of the eigenvector’s order.)

−1
Step 3: Determine P

Step 4: Determine P −1 AP
1 0 0
 
P −1 AP =  0 − 1 0 
 0 0 2
 

P −1 AP has been proven as diagonal matrix.

Part 2: Vector Analysis

Introduction
• In the physical world, there are quantities that have only magnitudes, but no directions.
These are known as scalar quantities or scalars. For examples, length, volume, mass,
energy and temperature are scalars.
• On the other hand, there exist many physical quantities that have both magnitudes as well
as directions. They are known as vector quantities or vectors. Examples of vector
quantities include velocity, acceleration, angular velocity, force, momentum and
electromagnetic field.

Definition:

A vector is a quantity that has both magnitude and direction.



Let A as a vector.
→ r r →
The magnitude of A is A = A. A =A A
r
A = A is a scalar quantity.

1. Two vectors a and b are equal; that is, a = b, if and only if a and b have the same magnitude
and direction.
If a // b and | a |=| b | , then a = b .

Note: Vector a (bold) can be written as a~


2. A zero vector or null vector 0 is a vector whose magnitude is zero and whose direction is
indeterminate.

22
UGCM1653/UCCM1653 - Mathematics for Engineering I

3. The magnitude of a two-dimensional vector a =< a1 , a 2 > is


a = a12 + a 22

Similarly, the magnitude of a three-dimensional vector a =< a1 , a 2 .a3 >


a = a12 + a 22 + a32

4. A unit vector, denoted by â , is a vector having unit magnitude, which is aˆ = 1


a a
aˆ = =
a a

5. The negative vector of a given vector a, denoted by − a is a vector having the same
magnitude as a, but a direction is opposite to that of a.
a =−b  b=−a

In particular the vector (position vector) from 0 to the point (x, y, z) is called the radius vector r
and is written as
r = x i + y j+ z k
~ ~ ~ ~

Magnitude r = r = x 2 + y 2 + z 2
~ ~

Properties of vector

1) Addition
Given two vectors a and b, the sum of vector a and b

c=a+b

is a unique vector c formed by placing the initial point of b on the terminal point of a and then
joining the initial point of a to the terminal point of b. This is called the triangle law of vector
addition. Geometrically, we have

23
UGCM1653/UCCM1653 - Mathematics for Engineering I

2) Subtraction
Given two vectors a and b, the difference of vectors a and b, represented by a − b, is defined as
the sum of a and − b; that is,
a − b = a + (− b)

Remark
(i). If a = b, then a − b is defined as the null vector. Therefore we obtain
a−a=0 for any vector a.
(ii). As a consequence of (i), we obtain the following properties:
If a + b = 0, then either a = − b or a = b = 0.

3) Multiplication of Vectors by Scalars

Let k be any scalar, and a be any vector. The product of a vector a by a scalar k is a vector ka
with magnitude k times the magnitude of a and pointing in the same direction if k is positive or
in the opposite direction (if k is negative). Any vector ka is called a scalar multiple of a.

Example 1:
3 1
For the vectors u = < − 2, 3> and v = <−1, − 7 >, find u and 3u + v
2 2
Solution

3 3 9 1 1 13 11
u = < −2 , 3 > = < −3 , > 3u + v = 3 < −2 , 3 > + < −1, − 7 >= < − , >
2 2 2 2 2 2 2

Example 2:
Find a unit vector for a = < 4, − 3> and b = < 1, 2, 2 >

Solution
a < 4, −3> 4 3 b < 1 ,2 , 2 > 1 2 3
aˆ = = =< , − > ; bˆ = = =< , , >
a 4 + (−3)
2 2 5 5 b 1 +2 +2
2 2 2 3 3 3

24
UGCM1653/UCCM1653 - Mathematics for Engineering I

Three- Dimensional Cartesian Coordinates and Position Vector

Figure 1: Vector <x,y,z> from the origin (0,0,0) to the point (x,y,z)

Figure 2: Unit Vectors i, j, k


A vector of length 1 is called a unit vector. The unit vectors along the positive axes are
shown in Figure 2 above and are labeled as

Vector F can also be written in the form F = (a, b, c)


In summary, any vector, F can be written in four forms as below
1) F = ai + bj + zk
2) F = <a, b, c>
3) F = (a, b, c)

a 
4) F = b 
 c 

Example 3:
Given a = 2 i − 3 j + k , b = i + 5 j − 2 k and c = 3 i − 4 j + 3k
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

(a) Find the vector d = a − 2 b + 3 c


~ ~ ~ ~

(b) Find the magnitude of d and unit vector of d


~ ~

25
UGCM1653/UCCM1653 - Mathematics for Engineering I

Solution:
d = a − 2 b + 3 c =  2 i − 3 j + k  − 2 i + 5 j − 2 k  + 3 3 i − 4 j + 3k  = 9 i − 25 j + 14k
~ ~ ~ ~  ~ ~ ~ ~ ~ ~  ~ ~ ~  ~ ~ ~

d < 9 , − 25 ,14 > 9 25 14


d= ~ = =< ,− , >
~
d 9 2 + (−25) 2 + (14) 2 902 902 902
~

Dot Product (scalar product)

If a =< a1 , a 2 , a 3 > and b =< b1 , b2 , b3 > , then the dot product of a and b is the value a • b given
by
a • b = a1b1 + a 2 b2 + a3b3 -----------(1)

Dot product can be also defined in terms of magnitude and angle between the two vectors.

---------------(2)
Note:
*Equation (2) is used if we need to find the angle between two vectors.

θ is the angle between two vectors (must follow the direction of the arrow as shown above)

If cos θ > 0  0 0 < θ ≤ 90 0


If cos θ < 0 ,  90 0 < θ ≤ 180 0

Based on

a.b = 0 if one of the three criteria below is satisfied


1) a = 0
2) b = 0
3) cos θ = 0  θ = 90 0 . This means vector a and b are perpendicular to each other.

26
UGCM1653/UCCM1653 - Mathematics for Engineering I

Properties of vector

For any vectors a, b, c and scalars m and n, the dot product has the following properties:

(i) a • b = b • a (Commutative Law)


(ii) a • (b + c ) = a • b + a • c (Distributive Law)
(iii) (a + b ) • c = a • c + b • c (Distributive Law)
(iv) m(a • b ) = (ma ) • b = a • (mb ) = (a • b )m
(v) a • (mb + nc ) = m(a • b ) + n(a • c ) (Linearity)

Example 4:
Given a = (1, 1, 1), b = (3, 2,-3) and c = (-1, 4,-1).
Show a • b = a • c

Solution:
a • b = (1,1,1) • (3 , 2 , − 3) = (1)(3) + (1)(2) + (1)(−3) = 2
a • c = (1,1,1) • (− 1, 4 , − 1) = (1)(−1) + (1)(4) + (1)(−1) = 2

Angle between two vectors:

Based on a . b = a . b cos θ ,
~ ~ ~ ~

a .b
cos θ = ~ ~

a .b
~ ~

27
UGCM1653/UCCM1653 - Mathematics for Engineering I

Example 5:
Find the angle between the vector F=− i+3j+k and G=2j− 4k

Solution:
Based on a . b = a . b cos θ ,
~ ~ ~ ~

a .b
cos θ = ~ ~

a .b
~ ~

Cross Product

If a =< a1 , a 2 , a 3 > and b =< b1 , b2 , b3 > , then the cross product of a and b is the vector given by
equation (1). The definition of (1) is (2) as shown below.

-------------------------(1)

-----------------------(2)

Magnitude of cross product is as below:

Interpretation of cross product:


Given vector a x b = c ,
It means c is a vector which is normal (perpendicular / 90 degree) to vector a and b.

Let say vector F and G are shown in the diagram below, vector F x G is perpendicular to both
vector F and G.

28
UGCM1653/UCCM1653 - Mathematics for Engineering I

Based on

a X b = 0 if one of the three criteria below is satisfied


1) a = 0
2) b = 0
3) sin θ = 0  θ = 0 0 or 180 0 . This means vector a and b are parallel to each other.

Vector a and b are parallel to each other when they are in same direction (00) or opposite
direction (1800).

a Or -a

b b

Properties of Cross Product


For any vectors a, b, c and scalars m and n, the vector product has the following properties:
(i) a × b = −(b × a)
(ii) a × (b + c) = (a × b) +(a × c) (Distributive Law)
(iii) a × 0 = 0 × a = 0
(iv) a×a=0
(v) i×i = j× j = k ×k = 0 and i× j = k, j×k = i, k ×i = j
(vi) If a × b = 0 and a and b are not zero vector then a and b are parallel.

Example 6:
Find a × b where a = 2i + 3k and b = 7i − j− 4k.

Solution
i j k
0 3 2 3 2 0
a×b = 2 0 3 = i− j+ k = 3i + 29 j − 2k
−1 − 4 7 −4 7 −1
7 −1 − 4

29
UGCM1653/UCCM1653 - Mathematics for Engineering I

Triple Products

The scalar triple product of the vectors a, b, and c is given by


a1 a 2 a3
a • (b × c ) = b1 b2 b3
c1 c2 c3

Application: Volume Interpretation of the Scalar Triple Product


Let a , b and c be nonzero vectors which do not all lie in the same plane. Then the absolute value
of the scalar triple product is the volume (V) of the parallelepiped, that is
V = a • (b × c )
axb

θ a
a cos θ c

b
Example 7:
Let a = < 2,3,−1> , b = < 0,3,1> and c = < 4,2,2 >. Find the volume of the parallelepiped
determined by a, b and c.

Solution: V = a • (b × c ) = < 2 ,3 ,−1 > •(< 0 ,3 ,1 > × < 4 ,2 ,2 > ) =< 2 ,3 ,−1 > • < 4 ,4 ,−12 >= 32

Geometry: Lines and Planes

Definition: Vector Equation for a Line

If position vector for point A and F are given, the line equation can be constructed for any point
which falls on this line.
→ → →
Position vectors are OA, OF , and OP
→ → →
Let OA = a, OF = f, OP = r

30
UGCM1653/UCCM1653 - Mathematics for Engineering I

→ → → → → → →
OP = OA+ AP [ AF is parallel with AP , therefore AP = t AF where t is a number]
→ → →
OP = OA+ tAF
→ →
 → →

OP = OA+ t  OF − OA 
 
r = a + t (f – a) [Let say b = f – a where b is a vector which is parallel to AF]
r=a+tb
In vector form r = a + t b -------------------------(1)

r = ( a1 i + a 2 j + a3 k) + t ( b1 i + b2 j + b3 k)
Given r = xi + yj + zk, compare it with (1), then

For i: x = a1 + tb1
For j: y = a 2 + tb2
For z: z = a3 + tb3
If we re-arrange the equation for t in terms of x,y,z,
In Cartesian form,
x − a1 y − a 2 z − a3
t= = = ……….(2)
b1 b2 b3
Two requirements to generate the line equation:
1) Any point which is located on the line
2) A vector which is parallel (same or opposite direction) with the line.
Interpretation on the vector equation for a line:
In vector form

r=a+tb where OP = r = xi + yj + zk = (x, y, z)
(x, y, z) = a + t b ……..(*)

Where

a = position vector OA or point A
b = vector that is parallel with the line which contains point A and F.
→ →
b = f – a = OF − OA

This means any point on the line OP can satisfy the line equation above (*). Each point (x, y, z)
has different t value.

Angle between two lines

31
UGCM1653/UCCM1653 - Mathematics for Engineering I

b1. b2 = b1 b2 cos θ
~ ~ ~ ~

b1. b2 ∧ ∧
cos θ = ~ ~
= b1 . b2
~ ~
b1 b2
~ ~

Example 8:
Find the angle between these two lines

Solution:

Intersection between two lines:


Let say the two line equations as below:
L1 : r1 = a1 + t b1
L2: r2 = a2 + s b2
Two lines intersect at the point M when r1 = r2
Based on this equation r1 = r2, there are 3 equations generated.
Determine the t and s values based on any 2 equations.
After that, substitute the t and s values into the remaining equation. If the equation is satisfied,
there is only intersection point between these two lines.

The intersection point M with the position vector is OM = r1 = r2

Example 9:
The line L1 passes through the points with position vectors (5,1,7) and (6,0,8) and the line L2
passes through the points with position vectors (3,1,3) and (-1,3,-3). Determine the intersection
point for these two lines.

Solution:
Apply r = a + t b where b = f - a
For L1 , let a1 = (5,1,7), f1 = (6,0,8)
For L2 , let a2 = (3,1,3), f2 = (-1,3,-3)

32
UGCM1653/UCCM1653 - Mathematics for Engineering I

L1 : r1 = (5,1,7) + t (6 − 5,0 − 1,8 − 7) = (5,1,7) + t (1,−1,1)


L2 : r2 = (3,1,3) + s (−1 − 3,3 − 1,−6) = (3,1,3) + s (−4,2,−6)

If both lines intersect, r1 = r2


So 5+ t = 3 – 4s (1)
1 – t = 1 + 2s (2)
7 + t = 3- 6s (3) (Note: Don’t use t for both L1 and L2 )

Solve (1) and (2) simultaneously, we getn t = 2 and s = -1


substitute the value of t = 2 and s = -1 into (3), we found that both values satisfy (3).
That means the intersection point of line L1 and L2 exists. (t = 2 and s = -1 satisfy all equations)
Substitute t = 2 and s = -1 into either r1 or r2 to find the intersection point.mThe intersection
point is (7,-1,9).

Shortest distance from a point to the line

Note:
∧ b ∧
Unit vector, b = ~
and b = 1
~ ~
b
~

Example 10:
0   1 
Find the distance from the point Q(1,5,1) to the line r = 5 + t − 2
~
2  1 

Solution:
Based on the line equation r = a + t b ,
~ ~ ~

0 
a = 5 = (0,5,2 ) and b = (1,−2,1) , q = (1,5,1)
~ ~ ~
2

33
UGCM1653/UCCM1653 - Mathematics for Engineering I

Shortest distance between two skew lines

Definition:
Two lines are said to be skew if they do not intersect and are not parallel.

Given the two line equations as below:


L1: r1 = a1 + t b1
~ ~ ~

L2: r2 = a 2 + s b2
~ ~ ~

Based on the diagram above, the shortest distance between the two skew lines is

d = AB cos θ ------------------ (1)

This means we need to determine AB and cos θ .

Step 1: Find AB .

34
UGCM1653/UCCM1653 - Mathematics for Engineering I

A and B are the points lie on L1 and L2 respectively, therefore,


→ → →
AB = OB − OA = a 2 − a1
~ ~

Step 2: Find cos θ .


Based on the diagram and using dot product,
→ → → →
PQ . AB = PQ AB cos θ
→ →
PQ. AB
cos θ = → →
----------------- (2)
PQ AB

Line PQ is perpendicular to b1 and b2 , therefore,



PQ = b1 x b2
~ ~

Substitute equation (2) into (1),



d = AB cos θ
→ → → →
→ PQ . AB PQ . AB
= AB . → →
= →
PQ AB PQ

1 → → 
d= →  AB . PQ  where d > 0
PQ

Notes:
If the d value is negative, just give the answer in positive value since the distance is positive.

Example 11:
Find the shortest distance between the two skew lines as below:
L1 : r1 = (0, 9, 2) + t (3, -1, 1)
L2 : r2 = (-6, -5, 10) + s (-3, 2,4)

Solution:
→ → →
AB = OB − OA = a 2 − a1
~ ~
= (-6, -5, 10) - (0, 9, 2) = (-6, -14, 8)

AB = (-6, -14, 8)


PQ = b1 x b2
~ ~

35
UGCM1653/UCCM1653 - Mathematics for Engineering I

i j k
~ ~
−1 1
~ 3 1 3 −1
= 3 −1 1 = i− j+ k
2 4 ~ −3 4 ~ −3 2 ~
−3 2 4

PQ = (-6, -15, 3)

PQ = (− 6)2 + (− 15)2 + 32 = 270

1 → → 
d= → 
AB . PQ 
PQ  

= [(− 6,−14,8)(. − 6,−15,3)] = 16.4317


1
270
The shortest distance, d = 16.4317

Definition: Equations for a Plane

O is origin, A is given fixed point on the


plane and P is an arbitrary point on the
n plane. Vector n is perpendicular to the
plane.
P
Hence, AP • n = 0
A
This becomes
(r – a).n = 0
a pr r.n – a.n = 0
r.n = a.n
Let say a.n = p
O
AP = OP − OA = r – a Then the general form for the equation of
→ → plane with normal n.
AP . n = AP . n cos 90 0 = 0 r.n = a.n or r.n = p ----------------(1)
~ ~

In Cartesian form, if n = (a,b,c) and r =


(x,y,z), then the equation of the plane is
r.n = a.n
(x,y,z).(a,b,c) = p
ax + by + cz = p ------------------(2)

Note:
Based on equation (2), if the plane equation is given as ax + by + cz = p , then the normal vector
n is n = (a,b,c) = ai + bj + ck

36
UGCM1653/UCCM1653 - Mathematics for Engineering I

Two requirements to generate the plane equation:


1) Any point which is located on the plane.
2) A normal line vector which is perpendicular to the plane.

Interpretation on the vector equation for a plane:


In vector form

r.n = a.n where OP = r = xi + yj + zk = (x, y, z)

In Cartesian form
ax + by + cz = p where p = a.n

Where

a = position vector OA or point A which is located on the plane
n = normal line vector that is perpendicular to the plane which contains point A.

This means any point P, OP = r = xi + yj + zk = (x, y, z) on the plane can satisfy the plane
equation above.

Example 12:
Find an equation for the plane through P0 (-3, 0, 7) normal to n = 5i + 2j−k .

Solution
The equation is r.n = a.n
<x, y, z> . <5, 2, -1> = <-3, 0, 7> . <5, 2, -1>
5x + 2y - z = -22 (in Cartesian form)
Or r. (5i + 2j−k) = -22 (in vector form)

Example 13:
Find an equation for the plane through A(0,0,1), B(2,0,0) and C(0,3,0) .

Solution
Based on plane equation r.n = a.n , we have found the normal vector, n.

→ →
n = AB X AC
→ → →
AB = OB − OA = 2i – k
→ → →
AC = OC − OA = 3j - k

i j k
Normal vector n = AB × AC = 2 0 − 1 = 3i + 2 j + 6k
0 3 −1

plane equation r.n = a.n


<x, y, z> . <3, 2, 6> = <0, 0, 1>. <3, 2, 6>

37
UGCM1653/UCCM1653 - Mathematics for Engineering I

<x, y, z> . <3, 2, 6> = 0(3) + 0(2) + 1(6) = 6


3x + 2y + 6z = 6

Angle between a line and a plane

Angle between a line and a plane is θ .


Using dot product;
b.n
b . n = b . n cos α , then cos α = ~ ~
~ ~ ~ ~
b.n
~ ~

Angle is θ = 90° − α

Example 14:

Solution:

(vector b)
(vector n )

Using b . n = b . n cos α ,
~ ~ ~ ~

cos α =
b.n
~ ~
=
(4,1,−1)(. 3,−5,4) =
3
= 0.10
b.n (4,1,−1). (3,−5,4) 18. 50
~ ~

α = 84.26°
38
UGCM1653/UCCM1653 - Mathematics for Engineering I

then θ = 90° − α .

θ = 90° − 84.26° = 5.74°

The angle is 5.74° .

Angle between two planes

Example 15:

39
UGCM1653/UCCM1653 - Mathematics for Engineering I

Solution:

Intersection line between two planes

Vector n1 x n2 is the intersection line between two planes.

40

You might also like