Lecture Notes - LinearAlgebra
Lecture Notes - LinearAlgebra
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.
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
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
(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
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
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
an1 an 2 an 3 ann
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
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
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
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
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.
3. If two rows (or two columns) of a determinant are interchanged, the value of the determinant
changes sign.
(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
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).
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
Fx 4 N, Fy 3 N
3
Then, F | F | 42 32 5 and arctan
4
• Addition of vectors
8
SIF1001/sMES1103/KHChew/12092017/V1
• Unit vector
A
A
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
A B
cos
A B
9
SIF1001/sMES1103/KHChew/12092017/V1
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
A B A B Ax Bx Ay By Az Bz 0
Ax Ay Az
A / /B A cB
Bx By Bz
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
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 .
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,
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
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
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 operator
O A B O A O B and O kA kO A
X ax by , X a b x
or , or R Mr
Y cx dy , Y c d y
M : transformation matrix (linear operator)
14
SIF1001/sMES1103/KHChew/12092017/V1
Eigenvalues
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.
Eigenvectors
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