Professional Documents
Culture Documents
Unit 1 Matrices
Unit 1 Matrices
Unit 1 Matrices
UNIT 1: MATRICES
______________________________________________
INTRODUCTION
Matrices provide a means of storing large quantities of information in such a way that
each piece can be easily identified and manipulated. They permit the solution of large
systems of linear equations to be carried out in a logical and formal way so that
computer implementation follows naturally. Application of matrices extends over
many areas of engineering including electrical network analysis and robotics.
LEARNING OUTCOME
2
DUM20132 Date : ………………….
1.1 DEFINITION
1.1.1 MATRIX
For example:
1 0
5 6 1 −2 3
A=[ ] B=[ ] C = [−3 −5]
8 7 3 4 −5
4 5
Order : m x n
:
a11 a12 a13⋯ a1n
a21 a22 a23⋯ a2n
A=[ ⋮ ⋮ ⋮ ⋮ ]
am1 am2 am3 amn m×n 𝑚th row
3
DUM20132 Date : ………………….
Example 1.1 :
1 0
C = [−3 −5] The order of the matrix is 3 × 2
4 5
1.1.3 ELEMENTS
For example,
1 −2 3
Given matrix B = [ ]
−4 5 −6
4
DUM20132 Date : ………………….
5
DUM20132 Date : ………………….
EXERCISE 1.1
Matrix [1 −3 5] [24] 5 1 2 1 13
[ ] [ ]
7 4 −3 [ 12 22 ]
−7 −6
No of rows
No of
columns
Order of
matrix
c) [1 −2 5] 1 0 0
d) [ 0 1 0]
0 0 1
e) [7 8] 1
f) [ ]
5
6
DUM20132 Date : ………………….
5 −3
4. Given matrix A = [ 0 1 ].
−1 9
a) Identify
i) the order of matrix A.
ii) the elements of a11 , a12 and a32.
4 x y 5
5. Given A = [ ] andB [ ]. Find the values of x and y if A =
3 2 3 2
B.
7
DUM20132 Date : ………………….
ADDITION SUBSTRACTION
+ + - -
+ + - -
5 3 −1 2
Given A = [ ] andB = [ ], find A + B
2 6 0 4
Solution:
5 3 −1 2
A+B =[ ]+[ ]
2 6 0 4
5 + (−1) 3 + 2
=[ ]
2+0 6+4
4 5
=[ ]
2 10
8
DUM20132 Date : ………………….
5 3 −1 2
Given A = [ ] andB = [ ], find A − B
2 6 0 4
Solution:
5 3 −1 2
A−B =[ ]−[ ]
2 6 0 4
5 − (−1) 3 − 2
=[ ]
2−0 6−4
6 1
=[ ]
2 2
SCALAR MUTIPLICATION 𝑎 𝑏 𝑘𝑎 𝑘𝑏
𝑘[ ]=[ ]
𝑐 𝑑 𝑘𝑐 𝑘𝑑
Example 1.4 :
a) 3[2 0 −1]
3
b) k [ 5]
1
2 −4 1
1
c) 2
[−6 3 5]
4 6 −2
9
DUM20132 Date : ………………….
Solution:
a) [3 × 2 3 × 0 3 × −1] = [6 0 −3]
k×3 3k
b) [k × 5] = [5k]
k×1 k
1 1 1
2
(2) 2
(−4) 2
(1)
1 1 1
c) 2
(−6) 2
(3) 2
(5)
1 1 1
[ 2 (4) 2
(6)
2
(−2)]
1
1 −2 2
=[−3 3 5 ]
2 2
2 3 −1
1 2 5 −6
Given A = [ ] and B = [ ]. Find:
3 4 −7 8
a) A+B
b) B−A
c) −5B
d) 2A + 3B
Solution:
1 2 5 −6
a) A+B =[ ]+[ ]
3 4 −7 8
1+5 2 + (−6)
=[ ]
3 + (−7) 4+8
6 −4
=[ ]
−4 12
10
DUM20132 Date : ………………….
5 −6 1 2
b) B−A =[ ]−[ ]
−7 8 3 4
5 − 1 −6 − 2
=[ ]
−7 − 3 8 − 4
4 −8
=[ ]
−10 4
5 −6
c) −5B = −5 [ ]
−7 8
−25 30
=[ ]
35 −40
1 2 5 −6
d) 2A + 3B = 2 [ ]+ 3[ ]
3 4 −7 8
2 4 15 −18
=[ ]+[ ]
6 8 −21 24
17 −14
=[ ]
−15 32
3x −4 6 −2 12 −6
Given [ ]+[ ]=[ ]. Find the value of x and y.
6 7 2 y 8 10
Solution :
3x + 6 = 12 7 + y = 10
3x = 12 − 6 y = 10 − 7
6
x= y=3
3
x=2
11
DUM20132 Date : ………………….
same size.
Am x n Bn x p
the order of AB is m x p
MUTIPLICATION Given A = [a b] e f g
and [ ]
c d 2×2 h i j 2×3
(a × e) + (b × h) (a × f) + (b × i) (a × g) + (b × j)
AB = [ ]
(c × e) + (d × h) (c × f) + (d × i) (c × g) + (d × j) 2×3
ae + bh af + bi ag + bj
=[ ]
ce + dh cf + di cg + dj 2×3
+ 2 3 0 1
Given A = [ ] andB = [ ] . Find AB.
4 7 2×2 5 6 2×2
12
DUM20132 Date : ………………….
Solution:
2 3 0 1
AB = [ ][ ]
4 7 5 6
(2 × 0) + (3 × 5) (2 × 1) + (3 × 6)
=[ ]
× (4 × 0) + (7 × 5) (4 × 1) + (7 × 6)
0 + 15 2 + 18
=[ ]
0 + 35 4 + 42
15 20
=[ ]
35 46 2×2
3 −2 −1 2 3
Given A = [ ] andB = [ ] . Find AB
4 −1 2×2 5 −4 0 2×3
Solution:
3 −2 −1 2 3
AB = [ ][ ].
4 −1 5 −4 0
−3 + (−10) 6 + 8 9 + 0
=[ ]
(−4) + (−5) 8 + 4 12 + 0
−13 14 9
=[ ] .
−9 12 12 2×3
2
Given A = [ ] andB = [0 1]1×2. Find AB
4 2×2
Solution:
2
AB = [ ] [0 1]
4
(2 × 0) (2 × 1)
=[ ]
(4 × 0) (4 × 1)
0 2
=[ ]
0 4 2×2
13
DUM20132 Date : ………………….
0
Given A = [2 3]1×2 andB = [ ] . Find AB
5 2×1
Solution:
0
AB = [2 3] [ ]
5
= [(2 × 0) + (3 × 5)]
= [0 + 15]
= [15]1×1
4
Given A = [1 2 3]1×3 and B = [5] . Find AB
6 3×1
Solution :
4
AB = [1 2 3] [5]
6
= [(1 × 4) + (2 × 5) + (3 × 6)]
= [4 + 10 + 18]
= [32]1×1
4
Given A = [5] and B = [1 2 3]1×3 . Find AB
6 3×1
Solution :
4
AB = [5] [1 2 3]
6
(4 × 1) (4 × 2) (4 × 3) 4 8 12
= [(5 × 1) (5 × 2) (5 × 3)] = [5 10 15]
(6 × 1) (6 × 2) (6 × 3) 6 12 18 3×3
14
DUM20132 Date : ………………….
EXERCISE 1.2
0 3 5 3 1 3
1. Given X = [ ], Y = [ ] and Z = [ ]. Find:
−1 6 −1 2 4 −5
a) X+Y b) Y+Z
c) Y−Z d) Z−X
e) Y + 2X − 3Z f) 3Z − X + 2Y
2 −1 1 5 3 9
2. Given A = [ ]and B = [ ], find:
6 3 −4 0 −1 −7
a) A−B b) A+B
c) 3A + 2B − A d) B − 2A
15
DUM20132 Date : ………………….
x 7 2
a) [ ]=[ ]+[ ]
8 2y 4
3 2x 4 3x 7 5x
c) [ ]+[ ]=[ ]
y 4 x −x 6 −1
6 4
4. Find matrix Q if[ ] + Q = [ ]
−2 7
16
DUM20132 Date : ………………….
2 3
a) [7 1] [ ]
−5 b) [6 −2 4] [ 1 ]
−5
2 −9
c) [ ] [ 8 4]
−3 d) [ 2 ] [7 −1 0]
3
1 4 3 1 2
e) [ ][ ] 2
2 3 −2 f) [0 −3] [ ]
−1
5 4
[5 1 3 −1 3 5
g) 2] [ ] 2 8 6
−2 6 5 h) [ ] [1 −2]
−1 0 3
3 −1
17
DUM20132 Date : ………………….
1.3.1.1 Determinant (2 X 2)
DETERMINANTS a b
If given A = [ ]
c d
(2 x 2) a b
then det A = |A| = | | = ad − cb
c d
1 2 2 −1
a). [ ] b) [ ]
3 4 −3 −3
Solution :
1 2
a) | | = ad − cb
3 4
= 1(4) − 3(2)
=4−6
= −2
2 −1
b) | | = ad − cb
−3 −3
= 2(−3) − (−3)(−1)
= −6 − 3
= −9
18
DUM20132 Date : ………………….
1 0
If A A-1 = A-1A = I ( I is an identity matrix[ ] ) then A-1 is the
0 1
inverse of A
INVERSE a b
If given A = [ ]
c d
MATRIX
1 d −b
then A−1 = |A| [ ]
−c a
1 d −b
= [ ]
ad − cb −c a
− 1 − 2 5 3
A =
4
a) b) B =
3 − 6 − 2
Solution :
− 1 − 2
a) A= 3 4
1 4 2
A-1=
A − 3 − 1 = ( −1)( 4) − ( −2)(3) = 2
A
1 4 2
− 1(4 ) − (− 2)(3 ) − 3 − 1
=
2 1
= − 3 1
2 − 2
19
DUM20132 Date : ………………….
5 3
b) B = − 6 − 2 B = 5( −2) − (3)( −6) = 8
1 − 2 − 3
B-1=
B 6 5
1 − 2 − 3
5(− 2) − (3 )(− 6 ) 6 5
=
− 1 − 3
= 4 8
3 5
4 8
1.3.1.3 Determinant (3 X 3)
a 22 a 23 a a 23 a a 22
= a11 − a12 21 + a13 21
a 32 a 33 a 31 a 33 a 31 a 32
2 1 2 1 − 2 3
a) 0 3 1 b) 6 5 4
− 1 0 4 7 8 − 6
20
DUM20132 Date : ………………….
Solution :
3 1 0 1 0 3
a) det =2 −1 +2
0 4 −1 4 −1 0
= 2 (12 − 0 ) − 1(0 + 1) + 2 (0 + 3 )
= 2 (12) − 1(1) + 2 (3 )
= 29
5 4 6 4 6 5
b) det =1 − (− 2) +3
8 −6 7 −6 7 8
= 1(− 30 − 32) + 2 (− 36 − 28) + 3 (48 − 35)
= 1(− 62) + 2 (− 64) + 3 (13)
= −151
INVERSE MATRIX 1
A −1 = adj A
(3 x 3) A
T
ADJOINT C11 C12 C13 C11 C 21 C 31
adj A = C 21 C 22 C 23 = C12 C 22 C 32
C C 33 C
31 C 32 13 C 23 C 33
21
DUM20132 Date : ………………….
2 3 0
Find the inverse of A = − 5 0 4
0 2 1
Solution :
0 4 −5 4 −5 0
A =2 −3 +0
2 1 0 1 0 2
= 2(0 − 8) − 3(− 5 − 0) + 0
= −1
0 4 −5 4 −5 0
C11 = = −8 C12 = − =5 C13 = = −10
2 1 0 1 0 2
3 0 2 0 2 3
C 21 = − = −3 C 22 = =2 C 23 = − = −4
2 1 0 1 0 2
3 0 2 0 2 3
C 31 = = 12 C 32 = − = −8 C 33 = = 15
0 4 −5 4 −5 0
− 8 5 − 10
Matrix of cofactors is − 3 2 − 4
12 − 8 15
− 8 − 3 12
Adj A = 5 2 − 8
− 10 − 4 15
1
A −1 = adj A
A
−8 − 3 12
1
= 5 2 − 8
− 1
− 10 − 4 15
8 3 − 12
= − 5 − 2 8
10 4 − 15
22
DUM20132 Date : ………………….
Check :
2 3 0 8 3 − 12 1 0 0
−1
AA = − 5 0 4 − 5 − 2 8 = 0 1 0
0 2 1 10 4 − 15 0 0 1
EXERCISE 1.3.1
2 − 3 1 − 2
a) b)
3 − 4 − 3 7
2 1 − 3 − 1
c) d)
6 4 − 2 − 4
23
DUM20132 Date : ………………….
− 2 3 0 2 −3 1
e) 4 −1 5 f) − 3 −1 5
2 4 6 2 4 − 5
24
DUM20132 Date : ………………….
ax + by = e
cx + dy = f
The unknowns are denoted by x and y the coefficients (a and b) are assumed
to be given. In matrix form the system of equations above can be written as:
a b x e
c =
d y f
and by rearranging it, we would get that the solution would look like
X = A-1 b
−1
x a b e
y = c d f
2x + 5y = 9
3x + 6y = 12
AX = b
2 5 x 9 2 5 x 9
A= X= b= OR 3 6 y = 12
3 6 y 12
25
DUM20132 Date : ………………….
x 1 6 − 5 9
Hence y = (2)( 6) − (5)(3) − 3 2 12
1 6 − 5 9
− 3 − 3 2 12
=
1 − 6
= −
3 − 3
2
=
1
3x + y = 1
4x + 4y = -4
Solution :
3 1 x 1
4 4 y = − 4
x 1 4 − 1 1
y = (3)( 4) − (1)( 4) − 4 3 − 4
1 4 − 1 1
8 − 4 3 − 4
=
1 8
8 − 16
=
1
=
− 2
26
DUM20132 Date : ………………….
By using matrix inversion method, find the value of h and k that fulfill
the matrix equation given
6 1 h − 17
2 2 k = 16
Solution :
6 1 h − 17
2 2 k = 16
h 1 2 − 1 − 17
k = 10 − 2 6 16
1 − 34 − 6
10 − 34 + 96
=
1 − 40
=
10 62
−4
= 31
5
27
DUM20132 Date : ………………….
EXERCISE 1.3.2
a) 2x – 3y = 11
x + 2y = -5
b) 3p – q = 3
p – 3q = 5
c) 4x + y = 10
2x – 3y = 12
28
DUM20132 Date : ………………….
3 1 x 11
a) =
4 − 1 y 24
1 − 3 p − 3
b) =
2 − 1 q 4
3 2 x 2
c) =
6 − 4 y 0
4 − 1 m 13
d) =
5 − 1 n 16
29
DUM20132 Date : ………………….
Therefore, AX = B
1
Hence, X = A-1B where A-1 = (Adj [A])
|A|
30
DUM20132 Date : ………………….
Example 1.20
Solve the following simultaneous linear equations using Inverse Matrix method.
-x – 2y + 4z = 12
3x – 6y + z = 15
2x + 5y = -1
Solution :
|𝐴| = −1 |−6 1 3 1 3 −6
| − (−2) | | + 4| |
5 0 2 0 2 5
= -1(-5) + 2(-2) + 4(27)
= 109
3. Minor Matrix A
Minor of an element aij is the determinant of the matrix formed by deleting
the i th and j th column
-6 1 3 1 3 −6
m11 = | | m12 = | | m13 = | |
5 0 2 0 2 5
= (-6)(0) – 1(5) = (3)(0) – 1(2) = (3)(5) – (-6)(2)
= -5 = -2 = 27
-2 4 −1 4 −1 −2
m21 = | | m22 = | | m23 = | |
5 0 2 0 2 5
= (-2)(0) – 4(5) = (-1)(0) – 4(2) = (-1)(5) – (-2)(2)
= -20 = -8 = -1
31
DUM20132 Date : ………………….
-2 4 −1 4 −1 −2
m31 = | | m32 = | | m33 = | |
−6 1 3 1 3 −6
= (-2)(1) – 4(-6) = (-1)(1) – 4(3) = (-1)(-6) – (-2)(3)
= 22 = -13 = 12
-5 -2 27
Minor A = [-20 -8 -1 ]
22 -13 12
4. Cofactor M
+ − +
Apply [− + −] into Minor Matrix A
+ − +
m11 (-)m12 m13 -5 2 27
Cofactor M = [(−)m21 m22 (-)m23 ] = [20 -8 1 ]
m31 (-)m32 m33 22 13 12
5. Adjoint A
Adjoint is the transpose of the Cofactor.
-5 20 22
Adjoint A = [ 2 -8 13]
27 1 12
-5 20 22
1
= 109
[ 2 -8 13]
27 1 12
-5 20 22
109 109 109
2 8 13
= 109
- 109 109
27 1 12
[109 109 109]
32
DUM20132 Date : ………………….
X = A-1B
-5 20 22
x 109 109 109 12
2 8 13
[y] = - 109 [15]
109 109
z 27 1 12 -1
[109 109 109]
-5 20 22
109
(12) + 109 (15) + 109 (−1)
2 8 13
= (12) - (15) + (−1)
109 109 109
27 1 12
[109 (12) + 109 (15) + 109 (−1)]
2
= [-1]
3
Answer : x = 2, y = -1, z = 3
33
DUM20132 Date : ………………….
EXERCISE 1.3.3
34
DUM20132 Date : ………………….
b) 2x – y – 3z = -8
x + 3y + 2z = 3
5x + 2y + z = 9
35
DUM20132 Date : ………………….
a11x + a12 y = b1
a21x + a22 y = b2
b1 a12
x =
b2 a22
a11 b1
y =
a21 b2
36
DUM20132 Date : ………………….
3x + y = 1
4x + 4y = -4
Solution :
3 1
0 = = 3(4) – 1(4) = 8
4 4
1 1
x = = 1(4) – 1(-4) = 8
−4 4
3 1
y = = 3(-4) -1(4) = -16
4 −4
Hence,
x y
x = and y =
0 0
8 − 16
x = =1 and y = = −2
8 8
37
DUM20132 Date : ………………….
b1 a12 a13
x = b2 a22 a23
b3 a32 a33
a11 b1 a13
y = a21 b2 a23
a31 b3 a33
a11 a12 b1
z = a21 a22 b2
a31 a32 b3
x y z
x = , y = and z =
0 0 0
38
DUM20132 Date : ………………….
3x + 2y - z = 4
2x - y + 2z = 10
x - 3y – 4z = 5
Solution :
3 2 −1
0 = 2 −1 2
1 −3 −4
−1 2 2 2 2 −1
= 3 − 2 + ( −1)
−3 −4 1 −4 1 −3
= 30 + 20 + 5
= 55
4 2 −1
x = 10 − 1 2
5 −3 −4
−1 2 10 2 10 − 1
= 4 − 2 + ( −1)
−3 −4 5 −4 5 −3
= 40 + 100 + 25
= 165
39
DUM20132 Date : ………………….
3 4 −1
y = 2 10 2
1 5 −4
10 2 2 2 2 10
= 3 − 4 + ( −1)
5 −4 1 −4 1 5
= -150 + 40 + 0
= -110
3 2 4
z = 2 − 1 10
1 −3 5
−1 10 2 10 2 −1
= 3 − 2 +4
−3 5 1 5 1 −3
= 75 + 0 - 20
= 55
Hence;
x y z
x = , y = and z =
0 0 0
165 − 110
x = = 3 ,y = = − 2 and
55 55
55
z = =1
55
40
DUM20132 Date : ………………….
EXERCISE 1.3.4
a. 3x + 5y = 7
4x – 3y = 19
b. 4x + y – 10 = 0
2x – 3y – 12 = 0
41
DUM20132 Date : ………………….
42
DUM20132 Date : ………………….
b. x + 2y + 2z - 4 = 0
3x – y + 4z – 25 = 0
3x + 2y – z = -4
43
DUM20132 Date : ………………….
SUMMARY
Order = No. of Row x No. of Column Matrix which have same dimension
and their corresponding elements
Inverse Matrix
Determinant 𝑎 𝑏
𝐴=ቀ ቁ
𝑐 𝑑
2x2
1 𝑑 −𝑏
𝑎 𝑏 𝐴−1 = ቀ ቁ
𝐴=ቀ ቁ 𝑎𝑑 − 𝑏𝑐 −𝑐 𝑎
𝑐 𝑑
|𝐴| = 𝑎𝑑 − 𝑏𝑐
Solve Simultaneous Linear
3x3 Equations
If given :
det
𝑎 𝑏 𝑥 𝑒
𝑎𝑥 + 𝑏𝑦 = 𝑒 ቀ ቁ ቀ𝑦ቁ = ቀ𝑓ቁ
𝑐 𝑑
𝑏𝑥 + 𝑑𝑦 = 𝑓A X b
X = A-1 b
Cramer’s Rule
, and
44
DUM20132 Date : ………………….
NOTE
45