SIF1001/sMES1103/KHChew/12092017/V1
Lecture Notes
SMES1103 BEGINNING MATHEMATICAL METHODS
SIF1001 MATHEMATICAL METHODS I
LINEAR ALGEBRA
Main Textbook
Chapter 3, Mathematical methods in the physical sciences (3rd ed) by Mary L. Boas
Contents
• Introduction
• Matrix and Row Reduction
o transpose of matrix; sets linear equations; augmented matrix; Determinants;
Cramer’s rule
• Vectors
o Notation; magnitude; addition of vectors; multiplication by a constant &
substration; unit vector; vector in tems of components; multiplication of vector;
perpendicular and parallel vectors
• Matrix operations
o Matrix equations; multiplication of a matrix by a number; addition of matrices;
multiplication of matrices; zero matrix; identity matrix or unit matrix; operation
with determinants; applications of matrix multiplication; inverse of matrix
• Linear combinations, Linear functions, linear operators; Matrix operators, linear
transformations; eigenvalues and eigenvectors; Special matrices
1
SIF1001/sMES1103/KHChew/12092017/V1
Introduction
• Problems in various fields of science and mathematics involve the solution of sets of linear
equations. It is algebra, but, it has a useful geometric interpretation
• Vectors are defined to have both a magnitude and a direction. A scalar (such as speed) just has a
magnitude given by its value.
Matrix and Row Reduction
• A matrix is a rectangular array of quantities, usually enclosed in large parentheses
1 5 2
A 2 3 (2 by 3) matrix
3 0 6
Aij : i row number, j column number
A11 1, A12 5, A13 2, A21 3, A22 0, A23 6.
• Transpose of a matrix
1 3
A 5 0 3 2 matrix
T
2 6
A T
ij
A ji
• Sets of Linear Equations
2 x z 2
6 x 5 y 3z 7
2 x y 4
2 0 1 x 2
Mr k, 6 5 3 y 7 ,
2 1 0 z 4
2 0 1 x 2
where M 6 5 3 , r y , k 7 .
2 1 0 z 4
M x
j 1
ij j ki , i 1,2,3.
2
SIF1001/sMES1103/KHChew/12092017/V1
• Augmented matrix
2 x z 2 2 0 1 2
6 x 5 y 3z 7 A 6 5 3 7
2 x y 4 2 1 0 4
(a) Eliminate the x terms in the other two equations by using the first equation.
e.g. eq.(2) – eq.(1) x 3 eq.(2) , eq.(3) – eq.(1) eq.(3)
2 x z 2 2 0 1 2
5y 6z 1 0 5 6 1
y 2
z 0 1 1 2
(b) For convenience, interchange the second and third equations
2 x z 2 2 0 1 2
y z 2 0 1 1 2
6z 1
5y 0 5 6 1
(c) Eliminate the y terms by using the second equation.
e.g. eq.(3) – eq.(2) x 5 eq.(3)
2 x z 2 2 0 1 2
y z 2 0 1 1 2
11z 11
0 0 11 11
(d) Eliminate the z terms by using the third equation.
e.g. eq.(1) + eq.(3) / 11 eq.(1) , eq.(2) – eq.(3) / 11 eq.(2)
2 x 3 2 0 0 3
y 1 0 1 0 1
11z 11 0 0 11 11
(e) finalizing
2 x 3 1 0 0 3 / 2
y 1 0 1 0 1
z 1
1 0 0 1
Allowed rules:
i. Interchange two rows
ii. Multiply (or divide) a row by a (nonzero) constant
iii. Add a multiple of one row to another; this includes subtracting, that is, using a negative
multiple.
3
SIF1001/sMES1103/KHChew/12092017/V1
Example 2.
x y 4z 5
2 x 3 y 8z 4
x 2y 4z 9
1 1 4 5 1 1 4 5 1 1 4 5
with the 1st row with the 2nd row
2 3 8 4 0 1 0 6 0 1 0 6
1 2 4 9 0 1 0 4 0 0 0 10
We cannot get an answer the equations are inconsistent.
Determinants
• Recall that a matrix is simply a display of a set of numbers; it does not have numerical value.
o For a square matrix, however, there is a useful number called the determinant of the
matrix.
• Evaluating determinants:
(i) 2 by 2 matrix
a b a b
A , det A ad bc.
c d c d
(ii) nth order matrix
a11 a12 a13 a1n
a21 a22 a23 a2 n
a31 a32 a33 a3 n
an1 an 2 an 3 ann
When removing the row and the column containing the element a ij, we have the remaining
determinant, Mij, called a minor of aij. For example
a11 a12 a13 a1n
a21 a22 a23 a2 n
M33 a31 a32 a33 a3 n
an1 an 2 an 3 ann
(n-1) by (n-1) determinant
4
SIF1001/sMES1103/KHChew/12092017/V1
Sign
etc
etc
Cofactor:
1
i j
Mij
Finally, multiply each element of one row (or one column) by its cofactor and add the results.
1
i j
det A aij M ij
i ( or j )
Example 1.
1 5 2
1 5
7 3 4 a23 4, M23
2 1
2 1 5
(i) Approach 1 (third column)
1 5 2
7 3 1 5 1 5
7 3 4 2 4 5 2 1 4 11 5 38 148.
2 1 2 1 7 3
2 1 5
(ii) Approach 2 (first row)
1 5 2
3 4 7 4 7 3
7 3 4 1 5 2 11 135 2 148.
1 5 2 5 2 1
2 1 5
5
SIF1001/sMES1103/KHChew/12092017/V1
Example 4. Evaluate the determinant
4 3 0 1
9 7 2 3
D
4 0 2 1
3 1 4 0
0 3 2 1
0 3 2 0 3 2
3 7 4 3
1 3 7 4 1 3 7 4
0 0 0 1
3 1 4 0 6 0
3 1 4 0
0 2
1 1 6 36
3 4
1. Subtract 4 times the fourth column from the first column, and subtract 2 times the fourth column
from the third column
2. Do a Laplace development using the third row
3. Add the second row to the third row.
4. Do a Laplace development using the third row.
Useful facts about determinants:
1. If each element of one row (or one column) of a determinant is multiplied by a number k, the
value of the determinant is multiplied by k.
2. The value of a determinant is zero if,
(a) all elements of one row are zero
(b) two rows ( or two columns) are identical
(c) two rows (or two columns) are proportional.
3. If two rows (or two columns) of a determinant are interchanged, the value of the determinant
changes sign.
4. The value of a determinant is unchanged if
(a) rows are written as columns are columns as rows
(b) we add to each element of one row, k times the corresponding element of another row, where k
is any number (and a similar statement for columns).
6
SIF1001/sMES1103/KHChew/12092017/V1
Cramer’s rule
a1x b1y c1 a b1 x c1
1 Mr k
a2 x b2 y c2 a2 b2 y c2
solving the set of linear equations give
c1b2 c2 b1 a c a2c1
x ,y 1 2
a1b2 a2b1 a1b2 a2b1
or
c1 b1 a1 c1
c2 b2 1 c1 b1 a2 c2 1 a1 c1
x , y .
a1 b1 D c2 b2 a1 b1 D a2 c2
a2 b2 a2 b2
a1 b1
where D
a2 b2
Denominator: determinant of the matrix with coefficients in the left side (M)
- Numerator: for x, replace x part in M with right side part, and take the determinant.
for y, replace y part in M with right side part, and take the determinant.
We can use this method when you get the solution for the n linear equations (in case that D 0).
Example 5. Solve the set of equations
2 x 3 y 3,
x 2y 5.
We have
2 x 3 y 3, 2 3 x 3
x 2y 5. 1 2 y 5
2 3
D 4 3 7
1 2
1 3 3 6 15 1 2 3 10 3
x 3, y 1.
D5 2 7 D 1 5 7
7
SIF1001/sMES1103/KHChew/12092017/V1
Vectors
• Notation
A A Ax , Ay
• Magnitude
A A Ax2 Ay2 Az2
Example 1. If a force F has an x component of 4 N and a y
component of 3 N. Determine the magnitude of |F|.
Fx 4 N, Fy 3 N
3
Then, F | F | 42 32 5 and arctan
4
• Addition of vectors
A B B A : commutative law for addition
A B C A B C : associative law for addtion
• Multiplication by a constant & subtraction
8
SIF1001/sMES1103/KHChew/12092017/V1
• Unit vector
A
A
• Vectors in terms of components
A iAx jAy kAz
A B i Ax Bx j Ay By k Az Bz
• Multiplication of vectors 1: Scalar Product (or dot product)
A B A B cos
A B B A
A B A projection of B on A A cos
B projection of A on B
A A A2
B cos
A B C A B A C
A B Ax Bx Ay By AzBz
• Angles between two vectors using scalar product
A B
cos
A B
9
SIF1001/sMES1103/KHChew/12092017/V1
Example 3. Find the angles between these two vectors
A ( Ax , Ay , Az ) 3,6,9 3i 6 j 9k, B 2,3,1 2i 3 j k
A B 3 2 6 3 9 1 21
A 32 62 92 3 14, B 14
A B 21 1
cos , 60
A B 3 14 14 2
• Perpendicular and Parallel vectors
A B A B Ax Bx Ay By Az Bz 0
Ax Ay Az
A / /B A cB
Bx By Bz
• Multiplication of vectors 2 : Vector Product (or cross product)
A B : vector product (right-handed rule)
A B A B sin ,
where A B A, B and is positive 180
A B 0 A / /B
AA 0
A B B A
ii j j k k 0
i j k, j k i, k i j, j i k.
10
SIF1001/sMES1103/KHChew/12092017/V1
i j k
A B iAx jAy kAz iBx jBy kBz Ax Ay Az
Bx By Bz
Example 4. Find a vector perpendicular to both A and B, where
A 2,1, 1 , B 1,3, 2
Solution:
i j k
A B 2 1 1 i 3 j 5k.
1 3 2
Matrix operations
• Matrix equations
x r u 2 1 5
y s v 3 7i 1 i
x 2, y 3, r 1, s 7i , u 5, v 1 i .
• Multiplication of a matrix by a number
2
A 2i 3 j A or AT 2 3
3
a c e ka kc ke
k
b d f kb kd kf
• Addition of Matrices
1 3 2 2 1 4 1 2 3 1 2 4 3 2 2
4 7 1 3 7 2 4 3 7 7 1 2 7 0 1
1 3 2 2 1
note: ?
4 7 1 3 5
11
SIF1001/sMES1103/KHChew/12092017/V1
• Multiplication of matrices
o The element in row i and column j of the product matrix AB is equal to row i of A times
column j of B. [(number of row i of A) = (number of column j of B)] .
o In index notation,
AB ij Aik Bkj
k
For example,
a c e f ae cg af ch
AB C
b d g h be dg bf dh
Example 1.
4 2 1 5 3
A , B
3 1 2 7 4
4 2 1 5 3 4 1 2 2 4 5 2 7 4 3 2 4 8 34 4
AB
3 1 2 7 4 3 1 1 2 3 5 1 7 3 3 1 4 1 8 13
Example 2. Find AB and BA
3 1 5 2
A , B
4 2 7 3
22 3 7 1
AB , BA “not commutative”
34 2 33 13
• Zero matrix
o zero or null matrix means one with all its elements equal to zero.
NOTE:
2 4 0 0
M M but, M 0
2
1 2 0 0
• Identity matrix or Unit matrix
1 0 0
I 0 1 0 , IA AI A
0 0 1
• Operation with Determinants
det AB det BA det A det B
• Applications of matrix multiplication
12
SIF1001/sMES1103/KHChew/12092017/V1
1 0 1 x 5
2 3 0 y 1
1 3 2 z 10
xz 5
Method 1 2 x 3 y 1
x 3 y 2z 10
1 0 1 x 5
1
Method 2 2 3 0 y 1 Mr k, Then r M k
1 3 2 z 10
• Inverse of a Matrix
MM1 M1M I
1
where Cij cofactor of mij , 1
i j
M1 CT Mij
det M
Example 3. Find M-1
1 0 1
M 2 3 0 , det M 3
1 3 2
Finding the cofactor
3 0 2 0 2 3
1st row : 6, 4, 3,
3 2 1 2 1 3
0 1 1 1 1 0
2nd row : 3, 3, 3,
3 2 1 2 1 3
0 1 1 1 1 0
3rd row : 3, 2, 3.
3 0 2 0 2 3
6 4 3 6 3 3
1 1
C 3 3 3 so M-1 CT 4 3 2
3 2 3 det M 3
3 3 3
13
SIF1001/sMES1103/KHChew/12092017/V1
Linear combinations, linear functions, linear operators
• A function of a vector, say f(r), is called linear if
f r1 r2 f r1 f r2 , and f ar af r
• F(r) is a linear vector function if
F r1 r2 F r1 F r2 , and F ar aF r
• Linear operator
O A B O A O B and O kA kO A
Matrix operators, Linear transformations
• One set coordinate & r R
Moving a point to some other point mapping or transformation
X ax by , X a b x
or , or R Mr
Y cx dy , Y c d y
M : transformation matrix (linear operator)
Eigenvalues and eigenvectors
• Definition of eigenvalue and eigenvector
Some vectors are not changed in direction by transformation
R Mr R r where const. r : eigenvectors (characteristic vector)
: eigenvalues
14
SIF1001/sMES1103/KHChew/12092017/V1
Eigenvalues
According to the definition, consider a transformation
X 5 2 x
.
Y 2 2 y
X 5 2 x x x
Eigenvector condition: R r
Y 2 2 y y y
5 x - 2y μx, (5 ) x - 2y 0,
or
2 x 2y y , 2 x (2 )y 0.
Condition for a solution other than x y 0,
5 2
0 characteristic equation of matrix M.
2 2
(5 )(2 ) 4 2 7 6 0,
1 or 6. eigenvalues
Eigenvectors
From the above results
2x y 0 for 1
x 2y 0 for 6.
R r on 2 x y 0 5 2
through .
R 6r on x 2y 0 2 2
Any points in two straight lines can be eigenvectors
Example
5 2 1 5-4 1
for 1
2 2 2 -2 4 2
5 2 2 10 2 12 2
6 for 6
2 2 -1 -4-2 6 1
15
SIF1001/sMES1103/KHChew/12092017/V1
Special matrices
Below are list of special matrices, their notation and names.
16