Lecture
Matrices
1
Matrices
Operations of matrices
Types of matrices
Properties of matrices
Determinants
Inverse of a 33 matrix
2
Matrices
1 3 1
2 3 7
A B 2 1 4
1 1 5 4 7 6
Both A and B are examples of matrix. A matrix
is a rectangular array of numbers enclosed by a
pair of bracket.
3
a11 a12 a1n
In the matrix a
a22 a2n
A 21
am1 am2 amn
numbers aij are called elements. First subscript
indicates the row; second subscript indicates
the column. The matrix consists of mn elements
It is called “the m n matrix A = [aij]” or simply
“the matrix A ” if number of rows and columns
are understood.
4
Types of Matrices
Row and column matrices
5
Zero matrices
6
Square matrix
Scalar matrix
8
Identity matrix
In particular, a11 = a22 = … = ann = 1, the
matrix is called identity matrix.
Properties: AI = IA = A
1 0 0
1 0 0 1 0
Examples of identity matrices: 0 1 and
0 0 1
9
upper triangular and lower triangular matrix
10
Determinants
Determinant of order 2
a11 a12
Consider a 2 2 matrix: A
a22
a21
Determinant of A, denoted | A |, is a number
and can be evaluated by
a11 a12
| A | a11a22 a12 a21
a21 a22
11
Determinant of order 2
easy to remember (for order 2 only)..
a11 a12
| A | a11a22 a12 a21
a21 a22
- +
1 2
Example: Evaluate the determinant: 3 4
1 2
1 4 2 3 2
3 4
12
Determinants of order 3
1 2 3
Consider an example: A 4 5 6
7 8 9
Its determinant can be obtained by:
1 2 3
4 5 1 2 1 2
A 4 5 6 3 6 9
7 8 7 8 4 5
7 8 9
3 3 6 6 9 3 0
You are encouraged to find the determinant
by using other rows or columns 13
14
15
singular and Non singular matrix
16
17
Equal matrices
Two matrices A = [aij] and B = [bij] are said to
be equal (A = B) iff each element of A is equal
to the corresponding element of B, i.e., aij = bij
for 1 i m, 1 j n.
iff pronouns “if and only if”
if A = B, it implies aij = bij for 1 i m, 1 j n;
if aij = bij for 1 i m, 1 j n, it implies A = B.
18
For e.g.
Equal matrices
1 0 a b
Example: A
and B
4 2 c d
Given that A = B, find a, b, c and d.
if A = B, then a = 1, b = 0, c = -4 and d = 2.
19
Operations of matrices
Sums of matrices
If A = [aij] and B = [bij] are m n matrices,
then A + B is defined as a matrix C = A + B,
where C= [cij], cij = aij + bij for 1 i m, 1 j n.
1 2 3 2 3 0
Example: if A and B
0 1 4 1 2 5
Evaluate A + B and A – B.
1 2 2 3 3 0 3 5 3
A B
0 ( 1) 1 2 4 5 1 3 9
1 2 2 3 3 0 1 1 3
A B
0 ( 1) 1 2 4 5 1 1 1 20
Sums of matrices
Two matrices of the same order are said to
be conformable for addition or subtraction.
Two matrices of different orders cannot be
added or subtracted, e.g.,
2 3 7
1 3 1
1 1 5 2 1 4
4 7 6
are NOT conformable for addition or
subtraction. 21
Scalar multiplication
Let l be any scalar and A = [aij] is an m n
matrix. Then lA = [laij] for 1 i m, 1 j n,
i.e., each element in A is multiplied by l.
1 2 3
Example: A . Evaluate 3A.
0 1 4
3 1 3 2 3 3 3 6 9
3A
3 0 3 1 3 4 0 3 12
In particular, l 1, i.e., A = [aij]. It’s called
the negative of A. Note: A A = 0 is a zero matrix
22
23
24
Properties
Matrices A, B and C are conformable,
A + B = B + A (commutative law)
A + (B +C) = (A + B) +C (associative law)
l(A + B) = lA + lB, where l is a scalar
(distributive law)
25
Matrix multiplication
If A = [aij] is a m p matrix and B = [bij] is a
p n matrix, then AB is defined as a m n
matrix
p
C = AB, where C= [cij] with
cij aik bkj ai1b1 j ai 2b2 j ... aipbpj for 1 i m, 1 j n.
k 1
1 2
1 2 3 2 3
Example: A , B and C = AB.
0 1 4
Evaluate c21. 5 0
1 2
1 2 3
0 1 4 2 3 c21 0 (1) 1 2 4 5 22
5 0
26
Matrix multiplication
1 2
1 2 3
Example: A , B 2 3 , Evaluate C = AB.
0 1 4
5 0
27
Matrix multiplication
1 2
1 2 3
Example: A , B 2 3 , Evaluate C = AB.
0 1 4
5 0
28
Matrix multiplication
1 2
1 2 3
Example: A , B 2 3 , Evaluate C = AB.
0 1 4
5 0
29
Matrix multiplication
1 2
1 2 3
Example: A , B 2 3 , Evaluate C = AB.
0 1 4
5 0
30
Matrix multiplication
1 2
1 2 3
Example: A , B 2 3 , Evaluate C = AB.
0 1 4
5 0
31
Matrix multiplication
1 2
1 2 3
Example: A , B 2 3 , Evaluate C = AB.
0 1 4
5 0
32
Matrix multiplication
1 2
1 2 3
Example: A , B 2 3 , Evaluate C = AB.
0 1 4
5 0
33
Matrix multiplication
1 2
1 2 3
Example: A , B 2 3 , Evaluate C = AB.
0 1 4
5 0
1 2
1 2 3 18 8
C AB 2 3
0 1 4 5 0 22 3
34
Matrix multiplication
In particular, A is a 1 m matrix and
B is a m 1 matrix, i.e., b11
b
A a11 a12 ... a1m B 21
bm1
m
then C = AB is a scalar. C a1k bk1 a11b11 a12b21 ... a1mbm1
k 1
35
Matrix multiplication
BUT BA is a m m matrix!
b11 b11a11 b11a12 b11a1m
b b a b21a12 b21a1m
BA 21
a a ... a1m
11 12
21 11
m1
b bm1a11 bm1a12 bm1a1m
So AB BA in general !
36
37
38
39