Professional Documents
Culture Documents
Sma3013 Linear Algebra: SEMESTER 1 2020/2021
Sma3013 Linear Algebra: SEMESTER 1 2020/2021
ALGEBRA
SEMESTER 1 2020/2021
CHAPTER 1
MATRICES
Chapter 1: Matrices
• 1.1 Matrix notation & terminology
• 1.2 Types of matrices
• 1.3 Operations with matrices
• 1.4 Properties of matrix operations
• 1.5 Elementary row operation
• 1.6 Row Echelon Form (REF) and Reduced Row Echelon
Form (RREF)
• 1.7 The determinant
• 1.8 Inverse
• 1.9 Elementary matrices
1.1 Matrix Notation & Terminalogy
Definition (Matrix):
An m x n matrix is an array of numbers with m rows
and n columns.
Note:
The entries – taken from R, C, Z etc
Example:
1.2 Types of Matrices
matrix; .
diagonal matrix – a matrix in which the entries outside the
main diagonal are all zero.
Example : 8 0 0
D 0 6 0
0 0 3
-Matrices B & C are not equal because they are of different sizes.
-Matrices D & E are equal if and only if x = 5 and y = 1.
1.3 Operations with Matrices
Then,
1.3 Operations with Matrices (cont.)
1.3.2 Scalar Multiplication
Examples
2 5 0
Let B and c = 5 .
1 4 1
Then, .
1.3 Operations with Matrices (cont.)
Examples
Let B 2 5 0 , K 6 2 3 and c = 5 .
1 5 2
1 4 1
Then,
.
1.3 Operations with Matrices (cont.)
1.3.3 Matrix Multiplication
- to find the entry in the ith row and the jth column of AB, multiply
the entries in the ith row of A by the corresponding entries in the jth
column of B and then add the results.
- the product AB is defined if the size of column A = the size of row B.
1.3 Operations with Matrices (cont.)
1.3.3 Matrix Multiplication (cont.)
Example
Find the product AB where and .
Solution
A has size and B has size , so ABhas size .
to find , multiply corresponding entries in the 1st row of A and
the 1st column of B, and then add the results. That is
1.3 Operations with Matrices (cont.)
1.3.3 Matrix Multiplication (cont.)
Similarly, to find , multiply corresponding entries in the 1 st row of A the
2nd column of B, and then add the results. That is
Thus,
.
* Can we find the product BA?
1.3 Operations with Matrices (cont.)
1.3.4 Matrix Power
Example:
2.
1.3 Operations with Matrices (cont.)
1.3.5 The Transpose of a Matrix
The transpose of an m n matrix A is the n m matrix AT obtained
by interchanging the rows and columns of A. That is, the i th column
of AT is the i th row of A for all i.
Example.
Find the transpose of each matrix.
2 5 0 3 1
B C
1 4 1 4 5
Answer:
1.3 Operations with Matrices (cont.)
Note:
A square matrix A is symmetric if and only if
Examples
1 3 2
1 2
A 3 5 0 B
1 3
2 0 4
Exercises:
1 2
1. Let 3 0 4 2 1
A , B , C 3 4
1 5 0 2 3
5 6
0 3 1
D , E
4 2
, F
2 1 2
i.A + 2D
ii.C – D
iii.D + BC
iv.BTCT – (CB)T
1.3 Operations with Matrices (cont.)
2. Let 2 4 2
1 0 3
A & B 1 0 0
2 1 2 1 1 1
Find (i) c21 (ii) c13 , where C = AB.
3. Let
6. Consider .
i. Find
ii. Determine whether is symmetric.
1.3 Operations with Matrices (cont.)
Exercise (Answer):
20 2 2
1.
3 6 3. (a) (i) 20 (ii) 2 B T B 2 10 3
i. 2 3 1
5 7 (b) (i) 17 (ii) 5
17 5
BB T
ii. Not pos s ible 5 14
3 3 4. x = 3 ; y = 2 ; z = 1
iii.
19 27 2 4
5 4 3 3
0 0 0 5. ( i) X ( ii) X
3 5 10 4
iv. 0 0 0 3
0 0 0
6. i. .
2.(i) c21 = -3
ii. is symmetric.
(ii)c13 = -1
1.4 Properties of Matrix Operations
1.4.1 Properties of Matrix Addition & scalar Multiplication
Theorem:
Let A, B and C be matrices of the same size and let c and d be scalars. Then,
a. A+B = B+A (Commutative property of addition)
b. (A+B)+C = A+(B+C) (Associative property of addition)
c. c(A+B) = cA + cB (Distributive property)
d. (c+d)A = cA + dA (Distributive property)
e. c(dA) = (cd)A (Associative property of multiplication)
f. 1A = A (Multiplicative identity)
1.4 Properties of Matrix Operations(cont.)
1.4.1 Properties of Matrix Addition & scalar Multiplication
Note:
Generally, if A1, A2, … , Ak are matrices of the same size and
c1, c2, …, ck are scalars,
we may form the linear combination:
c1 A1 c2 A2 ... ck Ak
where
c1, c2, …, ck are called as the coefficients of the linear
combination.
1.4 Properties of Matrix Operations(cont.)
1.4.1 Properties of Matrix Addition & scalar Multiplication
Example :
Let
4 1 1 2 5 1
BA 2 1 3 1
1 2
Solution:
Then, AB BA.
1.4 Properties of Matrix Operations(cont.)
Example :
The additive identity for the set of all 2x3 matrices.
1.4 Properties of Matrix Operations(cont.)
Theorem
a. If A is a square matrix, then A + AT is a symmetric matrix.
b. For any matrix A, AAT and ATA are symmetric matrices.
Proof (a):
(A + AT)T = AT + (AT)T (by property of transpose (no. 2))
= AT + A (by property of transpose (no. 1))
= A + AT. (commutativity of matrix add.)
Then,
A + AT is symmetric .
1.4 Properties of Matrix Operations(cont.)
Proof (b):
(AAT)T = (AT)T AT (by property of transpose (no. 4))
= A AT (by property of transpose (n0. 1))
Then,
A AT is symmetric .
1.5 Elementary Row Operations (ERO)
Note:
ERO – a procedure (an allowable operations) to reduce any matrix to a
matrix in row echelon form (ref) or reduced row echelon form
(rref).
- can be performed on a system of linear equations to transform it
into an equivalent system.
0 2 4 3 5 1
R1 R2
3 5 1
0 2 4
12 4 2 12 4 2
3 5 1 1 3 5 1
0 2 4 R3 0 2 4
2
12 4 2 6 2 1
1.5 Elementary Row Operations (cont.)
c. Add -2 times the first row to the third row to produce a new third row.
3 5 1 3 5 1
0 2 4 R3 ( 2 )R1 0 2 4
6 2 1 0 12 1
1.6 Row Echelon Form (REF) and Reduced Row
Echelon Form (RREF)
Definition. (Row Echelon Form (REF))
A matrix is in row echelon form if it satisfies the following properties:
1. Any rows consisting entirely of zeros are at the bottom.
2. The first nonzero entry (called the leading entry/ pivot ) of a
nonzero row is always to the right of any leading entries of the row
above it.
Example.
The following matrices are in row echelon form.
2 4 1 1 0 1 1 1 2 1 0 2 0 1 1 3
0 1 2 0 1 5 0 0 1 3 0 0 1 1 2 2
0 0 0 0 0 1 0 0 0 0 0 0 0 0 4 0
0 0 0 0 0 5
1.6 Row Echelon Form (REF) and Reduced Row
Echelon Form (RREF)
Strategy:
Work column by column,
Example from left to right and from
Reduce the following matrix to row echelon form. top to bottom to create a
leading entry in a column
1 1 1 and then use it to create
2 3 1 zeros below it.
- Use the 2nd ERO to make
1 1 2
leading entry a 1 (not
strictly necessary)
Solution
1 1 1 1 1 1 1 1 1
2 3 1 R2 ( 2) R1
0 1 1
R3 ( 1) R1
0 1 1
1 1 2 1 1 2 0 2 3
1 1 1
R3 2 R2
0 1 1
REF
0 0 5
1.6 Row Echelon Form (REF) and Reduced Row
Echelon Form (RREF)
Remarks:
The row echelon form (ref) of a matrix is not unique.
The leading entry in each row is used to create the zeros
below it.
The pivots are not necessarily the entries that are originally in the
positions eventually occupied by the leading entries.
Once we have pivoted and introduced zeros below the leading
entry in a column, that column does not change. (The row echelon
form emerges from left to right, top to bottom).
1.6 Row Echelon Form (REF) and Reduced Row
Echelon Form (RREF)
Definition (Row Equivalent)
Example
1 1 1 1 1 1
2 3 1 0 1 1
and
1 1 2 0 0 5
Example.
The following matrices are in reduced row echelon form (rref).
Note:
1 0 0 1 0 1 1 3 0
0 i. ref not necessary
0 1 0 0 1 5 0 0 1 0 rref
0 0 1 0 0 0 0 0 0 1 ii. Not ref →not rref
iii. rref→ref
1.6 Row Echelon Form (REF) and Reduced Row
Echelon Form (RREF)
Exercises (ERO , REF and RREF):
1 0 0 0 2 0 1 3
0 1 0 0
( i) 0 1 1 2 ( ii) ( iii) 0 1 1 4
0 0 0 0 1 0 2 1
0 0 0 1
1 0 2 1 0 0 1 0 0 1 0 0 0
( iv ) 0 1 3 4 ( v ) 0 0 0 1 0 ( vi) 0 0 0 1
0 0 1 0 0 0 0 2 0 0 0 0 0
1.6 Row Echelon Form (REF) and Reduced Row
Echelon Form (RREF)
Exercises (ERO , REF and RREF):
2. Reduce the following matrices into REF.
0 2 3 1 1 1 2
1 2 1
( i) ( ii) 2 3 1 ( iii) 2 2 1 3
2 3 1
1 1 2 1 1 1 0
3. Show that the given matrices are row equivalent by showing these two
matrices can be reduced to the same REF.
2 0 1 3 1 1
A 1 1 0 B 3 5 1
1 1 1 2 2 0
1.6 Row Echelon Form (REF) and Reduced Row
Echelon Form (RREF)
Exercises (ERO , REF and RREF):
1. (i) RREF (ii) neither (iii) REF but not RREF (iv) REF but not RREF
3. Hint: Reduce both matrices until you get the following REF
1
1 0 2
0 1 1
2
0 0 0
1.6 Row Echelon Form (REF) and Reduced Row
Echelon Form (RREF)
Exercises (ERO, REF, RREF) (Answer):
Example
Compute the determinant of
𝐴=
[ 2
1
−3
2 ]
| 𝐴|=2 ( 2 ) − 1 ( − 3 ) =4 +3=7
1.7 The Determinant of a Matrix
To define the determinant of a square matrix of order higher than
2, it is convenient to use minors and cofactors.
If A is a square matrix, then the minor Mij of the entry aij , is the
determinant of the matrix obtained by deleting the ith row and jth
column of A. The cofactor Cij of the entry aij is
Cij = (-1)i + j Mij
|
𝑀 21 =
𝑎 12
𝑎3 2 |
𝑎1 3
𝑎 33
= 𝑎12 𝑎33 − 𝑎 3 2 𝑎1 3
Cofactor of
𝑀 22 =
|𝑎1 1
𝑎 31
𝑎1 3
𝑎 33 |
=𝑎 11 𝑎 33 − 𝑎 31 𝑎 1 3
Cofactor of
1.7 The Determinant of a Matrix
As you can see, the minors and cofactors of a matrix can differ
only sign. To obtain the cofactors of a matrix, 1st find the minors
and then apply the checkerboard pattern of +’s and –’s.
Note:
The odd positions(i+j is odd) have negative signs, and even
positions(i+j is even) have positive signs.
[ ]
0 2 1
𝐴= 3 −1 2
4 0 1
[ ]
0 2 1
2 =−1 0
[ ]
2 1
3
4
−1
0 1
11
0|
2 𝑀 = − 1
1 | 3 −1
|
2 𝑀 12 = 3
4 |
2 =− 5
1
4 0 1
[ ] [ ]
0 2 1
0 2 1
3
4
−1
0
2 𝑀 = 2
1
21
0 | |
1
1
=2 3
4
−1
0 1
|
2 𝑀 22 = 0
4 |
1 =− 4
1
[ ] [ ]
0 2 1 0 2 1
3
4
−1
0 1
|
2 𝑀 31= 2
−1 2 |
1 =5
3
4
−1
0
2 𝑀 = 0
1
32
3 | 12|=− 3
1.7 The Determinant of a Matrix
[ ]
0 2 1
3
4
−1
0
2 𝑀 = 3
1
13
4 | 0 |
−1 = 4
[ ]
0 2 1
3
4
−1
0
2 𝑀 = 0
1
23
4 | |
2
0
=−8
[ ]
0 2 1
3 −1 2 6
4 0 1
Example
[ ]
0 2 1
Find the determinant of 𝐴= 3 −1 2
4 0 1
1.7 The Determinant of a Matrix
*The row (or column) containing the most zeros is usually the
best choice for expansion by cofactors.
1.7 The Determinant of a Matrix
Example
Example
To compute the determinant of
det A = 1(4)(1) = 4
1 1 3
A 0 4 2
0 0 1
1.7 The Determinant of a Matrix (cont.)
Exercises (Triangular Matrix):
7 8 4 3 1
iii. 0 1 5 3 13
4
C
0 0 2 5 4
0 0 0 1 1
0 0 0 0 2
1.7 The Determinant of a Matrix (cont.)
Theorem (Conditions that Yield a Zero Determinant)
Let A is a square matrix and one of the following conditions is true, then
det(A) = 0.
Example.
The first row The first & third The 3rd column is a multiple
has all zeros row are the same of the first column
1.7 The Determinant of a Matrix (cont.)
1.7.1 Properties of Determinant
Theorem (Determinant of matrix product)
If A & B are square matrices of order n, then
det(AB) = det(A). det(B)
Example.
- Non-square matrices
do not have inverses.
- Not all square matrix
does have an inverse.
1.8 The Inverse of a Matrix
Example
2 5 3 5
If A , then A ' is an inverse of A since
1 3 1 2
1 0 1 0
AA’= and A’A=
0 1 0 1
1.8 The Inverse of a Matrix
Theorem (Uniqueness of Inverse Matrix)
If A is invertible matrix, then its inverse is unique. The inverse of A is
denoted by
NOTE:
- Matrix A will have an inverse if
and only if its determinant is
not equal to zero.
- Matrix A will have an inverse if
and only if it is row equivalent
to the identity matrix
1.8 The Inverse of a Matrix
Example
Determine whether and are invertible.
Solution
We have , so A is invertible
On the other hand, so B is not invertible.
OR
Since the RREF of matrix B is not the identity matrix, B is not invertible .
1.8 The Inverse of a Matrix (cont.)
Theorem
If A
a b , then A is invertible if
ad bc 0 , in which
c d
case 1 1 d . b
A
ad bc c a
If
ad bc 0 , then A is not invertible.
Examples
1 2
Find the inverses of A .
3 4
2 1
1 4 2 3
A1 1
2 3 1
2 2
1.8 The Inverse of a Matrix (cont.)
Theorem (Adjoint/Adjugate Method)
1 2 1
A 2 2 4
1 3 3
Solution:
From the computation, det A = -2. Now, the nine cofactors will be,
2 4 2 4 2 2
C11 18 C12 10 C13 4
3 3 1 3 1 3
1.8 The Inverse of a Matrix (cont.)
1 1 1 2
2 1 C22 2 C23 1
C21 3 1 3 1 3
3 3
1 1 1 2
2 1 C32 6 C33 2
C31 10 2 4 2 2
2 4
The adjoint is the transpose of the matrix cofactors – namely,
T
18 10 4 18 3 10
adjA 3 2 1 10 2 6
10 6 2 4 1 2
Then,
3
9 5
1 18 3 10 2
1
A adjA 1 10 2 6
det A 5 1 3
2
4 1 2 1
2 1
2
1.8 The Inverse of a Matrix (cont.)
Theorem (Gauss-Jordan Method)
Let A be a square matrix. If a sequence of elementary row
operations reduces A to I, then the same sequence of elementary
row operations transforms I into A-1.
Example
Find the inverse of
1 2 1
A 2 2 4
1 3 3
1 2 1 1 0 0 R3 + 2R2 1 0 3 3 0 2
R2 R3 0 1 2 1 0 1 0 1 2 1 0 1
R1 -2R2
0 2 6 2 1 0 0 0 2 4 1 2
R3 /3 1 0 3 3 0 2 1 0 0 9 3 / 2 5
R2 + 2R3
0 1 2 1 0 1 0 1 0 5 1 3
R1 – 3R3
0 0 1 2 1/ 2 1 0 0 1 2 1/ 2 1
9 3 / 2 5
Therefore,
A1 5 1 3
2 1/ 2 1
1.8 The Inverse of a Matrix (cont.)
1. ( A1 ) 1 A
2.
3. 1 1
1
(cA) A
c
4.
1.8 The Inverse of a Matrix (cont.)
Example.
Given .
Compute A-2 in two different ways and show that the results are equal.
Solution:
1st way – find A2 and then (A2)-1 :
2nd way – find A-1 and then (A-1)2 : Note that each
method
produces the
same result.
1.8 The Inverse of a Matrix (cont.)
Note:
Previous theorem can be generalized to products of finitely many
invertible matrices:
If A1 , A2 ,..., An are invertible matrices of the same size, then
A1 , A2 ,..., An is invertible and
( A1 A2 ... An ) 1 An1... A21 A11
1.8 The Inverse of a Matrix (cont.)
Example
Suppose that B is an invertible matrix and A is any matrix with AB = BA. Show
that A and B-1 commute.
Solution:
Examples
Let 1 0 0 0 0 0 1 0 1 0 0 0
0 0 1 0 0
3 0 0 0 1 0 0 E3
E1 E2 and
0 0 1 0
0 0 1 0 1 0 0 0
0 0 0 1 0 0 0 1 0 2 0 1
3R2 R1 R3 R4 – 2R2
1.9 Elementary Matrices (cont.)
Example.
Which of the following matrices are elementary? For those that are, describe the
corresponding elementary row operation.
a.
b.
Not Elementary since not square matrix
c.
Elementary - ERO R2 + 2R1
Determine whether the matrix is elementary. If it is, state the elementary row
operation (ERO) used to produce it.
a.
a. Elementary – ERO 2R2
b. Not elementary – two ERO
c. Elementary – ERO R3 + 5R1
b.
d. Not elementary – two ERO
c.
d.
1.9 Elementary Matrices (cont.)
Exercises:
Let A, B, C be
Find,