0% found this document useful (0 votes)
32 views50 pages

Chapter 2 Matrices Jan 2024

Chapter 2 provides an introduction to matrices, covering their definitions, types, operations, and properties. It explains concepts such as square matrices, identity matrices, and the operations of addition, scalar multiplication, and multiplication of matrices. The chapter also discusses determinants, adjoints, and inverses of matrices, emphasizing their applications in solving equations.

Uploaded by

terberakgt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views50 pages

Chapter 2 Matrices Jan 2024

Chapter 2 provides an introduction to matrices, covering their definitions, types, operations, and properties. It explains concepts such as square matrices, identity matrices, and the operations of addition, scalar multiplication, and multiplication of matrices. The chapter also discusses determinants, adjoints, and inverses of matrices, emphasizing their applications in solving equations.

Uploaded by

terberakgt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 50

1

Chapter 2: Matrices
2.1 Introduction to matrices
2.2 Types of matrices
2.3 Operations of matrices
2.4 Determinants
2.5 Properties of matrices
2.6 Adjoint of a 33 matrix
2.7 Inverse of a 33 matrix

2
2.1 Introduction to 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.

Why matrix?

3
2.1 Introduction to matrices

Consider the following set of equations:

 x + y = 7, It is easy to show that x = 3 and y = 4.



3x − y = 5.
 x + y − 2 z = 7,
 2 x − y − 4 z = 2,

How about solving 
−5 x + 4 y + 10 z = 1,
 3x − y − 6 z = 5.

Matrices can help…


4
2.1 Introduction to matrices
 a11 a12 a1n 
a a2 n 
In the matrix a22
A =  21
 
 
 am1 am 2 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.
5
2.1 Introduction to matrices
Square matrices
 a11 a1n 
▪When m = n, i.e.,
a12
a a22 a2 n 
A =  21
 
 
 an1 an 2 ann 

▪A is called a “square matrix of order n” or “n-square matrix”


▪elements a11, a22, a33,…, ann called diagonal elements.
n

▪ 
i =1
aii = a11 + a22 + ... + ann is called the trace of A.
6
2.1 Introduction to matrices

Equal matrices
▪Two matrices A = [aij] and B = [bij] are said to be equal (A = B)
if & only if each element of A is equal to the corresponding
element of B, i.e., aij = bij for 1  i  m, 1  j  n.

Example: 𝐴 = 1 0
and 𝐵 = 𝑎 𝑏
−4 2 𝑐 𝑑

Given that A = B, find a, b, c and d.

if A = B, then a = 1, b = 0, c = -4 and d = 2.
7
2.1 Introduction to matrices

Zero matrices

▪Every element of a matrix is zero, it is called a zero matrix, i.e.,

0 0 0
0 0 0 
A=
 
 
0 0 0

8
2.2 Types of matrices

▪Identity matrix
▪The inverse of a matrix
▪The transpose of a matrix
▪Symmetric matrix
▪Orthogonal matrix

9
2.2 Types of matrices

Identity matrix
▪Both upper and lower triangular, i.e., aij = 0, for i  j , i.e.,
 a11 0 0 
0 a22 0 
D= ▪Properties: AI = IA = A
 
 
0 0 ann 
D = diag[a11 , a22 ,..., ann ] is called a diagonal matrix
1 0 0
Examples of identity matrices: 1 0  
0 1  0 1 0 
 
0 0 1 
10
2.2 Types of matrices
The inverse of a matrix
▪If matrices A and B such that AB = BA = I, then B is called the
inverse of A (symbol: A-1); and A is called the inverse of B (symbol:
B-1).

1 2 3  6 −2 −3
Example: A = 1 3 3  B=
 −1 1 0 

1 2 4  
 −1 0 1 

Show B is the inverse of matrix A.


1 0 0
Ans: Note that AB = BA = 
0 1 0

Can you show the details? 
0 0 1
 11
2.2 Types of matrices

The transpose of a matrix


▪The matrix obtained by interchanging the rows and columns
of a matrix A is called the transpose of A (write AT).

1 2 3
Example: A=
6
4 5  1 4
The transpose of A is AT = 
2 5


3 6

▪For a matrix A = [aij], its transpose AT = [bij], where bij = aji.

12
2.2 Types of matrices
Symmetric matrix
▪A matrix A such that AT = A is called symmetric, i.e., aji = aij
for all i and j.
▪A + AT must be symmetric. Why?

1 2 3
Example: A =  2 4 −5 is symmetric.
 3 −5 6 
▪A matrix A such that AT = -A is called skew-symmetric,
i.e., aji = -aij for all i and j.
13
2.2 Types of matrices
Orthogonal matrix
▪A matrix A is called orthogonal if AAT = ATA = I, i.e., AT = A-1

1/ 3 1/ 6 −1/ 2
 
Example: prove that A = 1/

3 −2 / 6 0 

is orthogonal.

1/ 3 1/ 6 1/ 2 

 1/ 3 1/ 3 1/ 3
 
Since, A =  1/ 6
T
−2 / 6 1/ 6 . Hence, AAT = ATA = I.
 
 −1/ 2
 0 1/ 2

We’ll see that orthogonal matrix represents a rotation in fact!


14
2.3 Operations of matrices

Sums of matrices

Example: if 1 2 3  and  2 3 0
A=  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
15
Addition of Matrices
If A and B are both m × n matrices then the sum of
A and B, denoted A + B, is a matrix obtained by
adding corresponding elements of A and B.

add
add add add
add
these add − 3 0 4 
111 −−2−22 222these
these
 these=  −
these
 

3 − 30 0 4 
4  
AA=
A== 11 −−22 22
B
these   − 3
3
BB=B= =2 1 − 4
0
0 
4
4 
AA=0=00 −−1−11 333   B =2−23 1 01− 4−44
 0 − 1 3   B =22 1 1 − −4 4
0 − 1 3   2 1 − 4
 −− 2
−−−222
2 −2  6 
A ++ B ==   − 2 −−−−2222 666
A B 
AAAA++++BBBB==== 2 0  −1
 22 0  
 16
Sums of matrices

▪Two matrices of different orders cannot be added or


subtracted, e.g.,
1 3 1
2 3 7 2 
1 −1 5  1 4
  
4 7 6

2x3 3x3

17
Matrix
A+ B = B + A addition is
commutative

Matrix
addition is
associative A + ( B + C ) = ( A + B) + C

18
Scalar Multiplication of Matrices
If A is an m × n matrix and s is a scalar, then we let kA denote
the matrix obtained by multiplying every element of A by k.
This procedure is called scalar multiplication.

1 − 2 2  3(1) 3(− 2) 3(2) 3 − 6 6


A=  3A =   = 
 0 − 1 3  3 (0 ) 3(− 1) 3(3)  0 − 3 9 
PROPERTIES OF SCALAR MULTIPLICATION

k ( hA ) = ( kh ) A
( k + h ) A = kA + hA
k ( A + B ) = kA + kB
19
The m × n zero matrix, denoted 0, is the m × n
matrix whose elements are all zeros.

0 0 
0 0 
0 0 0
  1 × 3
2 × 2

A+0 = A
A + ( − A) = 0
0( A) = 0
20
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 C = AB, where C= [cij] with
 −1 2 
1 2 3 
Example: A =   B =  2 3  and C = AB.
 0 1 4 
Evaluate c21.  5 0 

−1 2
1 2 3   
0 1 4   2 3 𝒄𝟐𝟏 = 𝟎 × −𝟏 + 𝟏 × 𝟐 + [𝟒 × 𝟓] = 𝟐𝟐
 
 5 0
21
To multiply matrices A and B
look at their dimensions

mn n p
MUST BE SAME

SIZE OF PRODUCT

If the number of columns of A does not equal


the number of rows of B then the product AB
is undefined.

22
Multiplication of Matrices
The multiplication of matrices is easier shown than put into words.
You multiply the rows of the first matrix with the columns of the
second adding products
Find AB
 2 4
3 − 2 1   
A=  B =  − 1 3
0 4 − 1
− 3 1
3(3(2)()2+) +(−(−2)(
2−)(−1)1) + (1)(− 3) = 5
First we multiply across the first row and down the
first column adding products. We put the answer in
23
the first row, first column of the answer.
Find AB
 2 4
3 − 2 1   
A=  B =  − 1 3
0 4 − 1
− 3 1

55 777
AB == 
AB   ((00
300)(()(3)(2442)(
( 4))+
4)++)((+
4(− −3)(
44)(()(2
)( )
312))3)(++3+()−−(111)()(11−) =
3)11
7= −1
− 1  
11

Notice the sizes of A and B and the size of


the product AB.
Now
Nowwewe
multiply
multiply
across
acrossthethe
first
second
second
rowrow
and
row
and
down
anddown
down
the the
second
the
first
We multiplied across first row and down first column
column
second column
and we’ll
andput
we’ll
theput
answer
the answer
in the second
first
in therow,
second
row,
second
first
row,
so we put the answer in the first row, first column. 24
second
column.
column.
Now let’s look at the product BA.

 2 4 3 − 2 1 
  A= 
B =  − 1 3 0 4 − 1
− 3 1 ((−−(3−(132−()(1()(2)(12−)(13)(1)()−)2−3++)2)2(++()311)4+)((+(1)(34−(0)((3−)()(41)4)(01)0)(=)4)=)4==−)=)−10
=
9−
=6414
2312
32 23
across
across second
across
as
as we
as we
second
second
third
we go
third row
first
go
go
row
row
go down
down
down 6666 12 12 −−−2−
12
12
12 222
third
first
second
second
third
second
third
first column:
column:
column:
column:
column:
column:
column:
column:
BA
BA    
=====−−−
BA
BA
BA  333 14
14
14 −− 
− 4 
44  
  
−  99 10
− 10 −  4

Completely different than AB!


AB  BA 25
PROPERTIES OF MATRIX MULTIPLICATION

A(BC ) = ( AB )C
A(B + C ) = AB + AC
( A + B )C = AC + BC

AB  BA
Is it possible for AB = BA ? ,yes it is possible.
26
 2 − 1 2 Multiplying a
What is AI? 0 1 5  = A
 
1 0 0
matrix by the
2 − 2 3
identity gives

I 3 = 20− 1 12 0  the matrix
What is IA? 0 1 5  = A back again.
1 0 0
 
 
 2 − 1 2 
2 0− 2 0
3 
 1   
I 3 = 0 1 0 
A = 0 1 5
2 − 2 3 0 0 1
identity matrix
an n  n matrix with ones on the main diagonal
and zeros elsewhere

27
Properties
▪A(B + C) = AB + AC
▪(A + B)C = AC + BC
▪A(BC) = (AB) C

▪AB  BA in general
▪AB = 0 NOT necessarily imply A = 0 or B = 0
▪AB = AC NOT necessarily imply B = C

28
Matrix Transpose
A matrix which is formed by turning all the rows of a given matrix into
columns and vice-versa
Notation → AT a b c 
 
A ji = AijT A = d e f
g 
 h i
i.e.
a 
A23 = A T
 
A =
32 T
A22 = A22
T e 
 
 i
29
Example:
 3
 2 4  
(a) A =   (b) B = 6
 3 6  8
2 
A = B = 3 
T

T

 6

1 5 5  1 
 
(c ) D =  4 8 2  
D = 8 
T 
3 9 0  0
30
Determinant of order 2
 a11 a12 
Consider a 2  2 matrix: A =  
 a21 a22 
▪easy to remember (for order 2 only)..
a11 a12
| A |= = + a11 a22 − a12 a21
a
- 21
a22 +

Example: Evaluate the determinant:


1 2
3 4
1 2
= (1 × 4) − (2 × 3) = −2
3 4
31
2.4 Determinants of order 3
 − 10 4 9 
 
Consider an example: M =  15 −4 − 14 
 −5 6 
 1
Its determinant can be obtained by:
−10
− 10 4 4 9
9
−−−44−4 4−−−14 − 14 15
14
14 1515 −−−14 −14
1414 15 15
1515 −−4 4
M = 15 − 4 −
M = 15 − 4 − 14 = =−10
14 = − 10 −10
10 − −− −
( 4 )
(4()4) ++++999
9
111 1 666 6 −−5−5 5 6666 −−−5−55 1 1
−−55 1
1 6
6 = =(−− −10
=(10 −)[(
(10)[(
10)[(−)[(
−−444)( 6)))−
−)()(466)( 6−−)((−−−14 −14
(14 )()(11)(
)])]
)]
1)]
−−−((44()[( 6)))−6−−)((−−
(−14 )()(−−555)])]
−4)[(415
()[(1515)(
)[( )()(66)(
15 −14
(14 )(−)] 5)]
+++6
= (−10)[(−4)(6) − (−14)(1)] − (4)[(15)( − − −−−−((− −−5(5)]
)()(+
− )] 15)(1) − (−4)(−5)]
((99)()[( 15 )()(
11)1))( −4)]
+ (9)[(15)(1) − (−4)(−9)]5)[(
)[(
9 )[((
1515 14
)( ) ( 5 4
= −25 =
==−−25
−25
= −25
25
32
2.4 Determinants
The following properties are true for
determinants of any order.
1. If every element of a row (column) is zero,
e.g., 1 2 = 1 × 0 − 2 × 0 = 0 , then |A| = 0.
0 0

determinant of a matrix
= that of its transpose
2. |AT| = |A|

3. |AB| = |A||B|

33
2.5 Properties of matrix

▪(AB)-1 = B-1A-1
▪(AT)T = A and (A)T =  AT
▪(A + B)T = AT + BT
▪(AB)T = BT AT

34
2.6 Adjoint of a 33 matrix

Co-factors and Adjugate/Adjoint


Cofactors describes a particular construction that
is useful for calculating both the determinant and
inverse of square matrices

Adjugate or classical adjoint of a square matrix


is a matrix which plays a role similar to the inverse
of a matrix

35
Co-factors: Matrix 3x3
If A is a nxn matrix and Mij is the minor for the element aij, then the cofactor
for aij is given by Kij = (-1)i+j Mij

a b c
 
when, A =  d e f
g i 
 h
+ − +
 e f d f d e
+ − +  𝐴 = − + −5
 h i g i g h 1 0 6
 b c a c a b
cofactors =  − + − 
 h i g i g h
 b c a c a b
 + − + 
 e f d f d e
36
Co-factors: Matrix 3x3
 e f d f d e
+ − +  + − +
 h i g i g h
 b c − + −
a c a b
cofactors =  − + −  + − +
 h i g i g h
 b c a c a b
 + − + 
 e f d f d e
 + (ei − fh ) − (di − fg ) + (dh − eg ) 
 
=  − (bi − ch) + (ai − cg ) − (ah − bg ) 
 + (bf − ce) − (af − cd ) + (ae − bd ) 

 m1 m2 m3 
 
=  m4 m5 m6 
m m9 
 7 m8
37
3.6 Adjoint of a 33 matrix
 m1 m2 m3 
 
cofactors =  m4 m5 m6 
m m9 
 7 m8
 m1 m4 m7 
 
Transpose =  m2 m5 m8 
m m9 
 3 m6
adj ( A) = Transpose Cofactors
 m1 m4 m7 
 
adj ( A) =  m2 m5 m8 
m m9 
 3 m6
38
2.6 Adjoint of a 33 matrix
1 11111 22222
2 33333
3
00 
Cofactor matrix of AAAA
A =====0
A= 000 44444
4 55555
5
111 66666
111 00000 6
0

The cofactor for each element of matrix A:


4 5 0 5 0 4 + − +
A11 = = 24 A12 = − =5 A13 = = −4
0 6 1 6 1 0 − + −
+ − +
2 3 1 3 1 2
𝐴21 =− = −12 A22 = =3 A23 = − =2
0 6 1 6 1 0 24 5 −4
−12 3 2
2 3 1 3 1 2
A31 = = −2 A32 = − = −5 A33 = =4 −2 −5 4
4 5 0 5 0 4

39
1 2 3 24 5 −4
Cofactor matrix of 𝐴 = 0 4 5 is then given by: −12 3 2
1 0 6 −2 −5 4

1 2 3
Adjoint matrix of 𝐴 = 0 4 5 is then given by:
1 0 6

𝑇
24 5 −4 24 −12 −2
−12 3 2 = 5 3 −5
−2 −5 4 −4 2 4

40
2.7 Inverse matrices

a b c
 
when , A =  d e f
g i 
 h
−1
a b c
−1
 
A = d e f
g i 
 h
−1
A =
1
(adj ( A) )
| A|
41
2.7 Inverse of a 33 matrix
1 2 3
Inverse matrix of 𝐴= 0 4 5 is given by:
1 0 6

𝑇
1 24 5 −4 1 24 −12 −2
𝐴−1 = −12 3 2 = 5 3 −5
𝐴 22
−2 −5 4 −4 2 4

12 6 1
− −
11 11 11
5 3 −5
=
22 22 22
2 1 2

11 11 11
42
Finding inverse matrix using
Elementary Row Operation (ERO)

To obtain the inverse matrix A of size n x n, A-1 , identify the elementary


row operation used to reduce matrix A to identity matrix I.
Then, use the same set of operation on n x n identity matrix and the
resulting matrix is the inverse matrix of A.

A I  reduce to I A  −1

To reduce elements of A to zero, we use the operation

Ri  Ri + kR j

43
RECALL!!!

a1 0b 0c 
d e 0f

 0 1


 g
0 h
0 1i 

 
NOTES: A I   I A 
−1

44
EXAMPLE
1. Find the inverse matrix of B using ERO method.

2 1
B =  
A I  reduce to I A 
−1

 3 4

 4 −1 
 
B = 5
−1 5 
 −3 2 
 
 5 5 
45
EXAMPLE

1. Find the inverse matrix of A using ERO method.


1 2 0 
A= 5 4 2
 
2 1 0

46
EXAMPLE A I  reduce to I A 
−1

47
48
Exercise

1. Find the inverse matrix of M using ERO method.

3 1 0
− 2 − 4 3 
 
 5 4 − 2

49
Answer

1. Find the inverse matrix of M using ERO method.

 4 − 2 − 3
 − 11 6 9 
 
− 12 7 10 

50

You might also like