UGCM1653 - Chapter 1 Linear Algebra - 202001 PDF
UGCM1653 - Chapter 1 Linear Algebra - 202001 PDF
UGCM1653 - Chapter 1 Linear Algebra - 202001 PDF
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
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
1
UGCM1653/UCCM1653 - Mathematics for Engineering I
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:
3 1
1. = (3)(2) – (1)( – 4) =10
−4 2
2 6
2. = (2)(0) – (6)(– 6) = 36
−6 0
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.
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
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
[
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 .
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.
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 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
Example 1.5:
1 2 −1
Let A = . Find A .
3 7
Solution:
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:
4
UGCM1653/UCCM1653 - Mathematics for Engineering I
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
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
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
− 18 − 6 − 10
adj A = − 17 − 10 − 1
−11 1
Thus, A =
A 94
− 6 − 2 28
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
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
We define
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.
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
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
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.
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
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.
10
UGCM1653/UCCM1653 - Mathematics for Engineering I
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
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
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
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
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
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
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
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
Definition:
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
Example 1.16:
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
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)
Example 1.17:
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 .
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
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
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:
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 .
22
UGCM1653/UCCM1653 - Mathematics for Engineering I
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.
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
Figure 1: Vector <x,y,z> from the origin (0,0,0) to the point (x,y,z)
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
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
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
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
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)
Based on
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:
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
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)
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
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
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
θ 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
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.
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:
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
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
Definition:
Two lines are said to be skew if they do not intersect and are not parallel.
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
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
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
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
37
UGCM1653/UCCM1653 - Mathematics for Engineering I
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° − α .
Example 15:
39
UGCM1653/UCCM1653 - Mathematics for Engineering I
Solution:
40