Upload
azizul-anwar
View
238
Download
0
Embed Size (px)
Citation preview
7/29/2019 Unit2 Matriks MATH2(D) Ikbn (Student Version)
1/27
UNIT 2
MATRICES
2.1 Introduction
Matrices and Linear Equations made their appearance long time ago. The word
matrix was first introduced by Sylvester(1850). Many of the symbols and
operations that we used today were formalized by Cayley(1841). In the present
day, we use matrices to solve many complex problems of very great importance in
Medical Diagnostic Systems, Public Transport System, Communication Network
and others. In this topic students will be exposed to the operations of matrices,
determine the inverse matrices and hence solve the system of linear equation by
using the matrices.
Objectives
At the end of the topic, students should be able to:
State the size of matrices according to the number of rows and columns.
Perform the algebraic operation on matrices for 2 and 3 rows matrices.
Recognize matrices according to their types .
Determine the inverse matrix by determinant and adjoin method for 3 by 3
matrices.
Solve the system of linear equation using the inverse matrix method and the
Cramers rule for 3 by 3 matrices.
39
7/29/2019 Unit2 Matriks MATH2(D) Ikbn (Student Version)
2/27
2.2 Definition of Matrices
2.2.1 Size and Symbol
Matrices have columns and rows.
Let
=43
21A
A symbol of a matrix can be written as :
( ) or [ ]
2.2.2 Element of Matrices
Each number in a matrix is called the element of the matrix.
If
=43
21A ,
so numbers like 1, 2, 3, and 4 are the elements of matrix A.
2.2.3 Size of a Matrix
The size of a matrix is determined by the number of its rows and columns.
If a matrix has m rows and n columns, so the size of the matrix is (m by n) or can
also be written as ( nm ).
If
=
112
231B .
The size of matrix B is (2 3) or we can say B is a (2 by 3) matrix.
40
row 1
row 2
Column 1 Column 2
7/29/2019 Unit2 Matriks MATH2(D) Ikbn (Student Version)
3/27
Example 2.1
Given matrix
=
223
124
312
A .
(a) State the size of matrixA.
(b) Determine the elements of 12A and 33A .
2.3 Operation and Types of Matrices
2.3.1 Addition of Matrices
Addition of matrices can be done if the matrices involve are of equal size.
Example 2.2
If
=
=
21
22
32
41BA .
size : 2 by 2 size : 2 by 2
It means matrixA and matrix B can be added. How to do it?
Add the elements of the same row and column.
Solution:
41
7/29/2019 Unit2 Matriks MATH2(D) Ikbn (Student Version)
4/27
3.1.2 Subtraction of Matrices
The same condition applies to the subtraction of matrices.
Subtract the same elements of rows and columns.
Example 2.3
=
=
21
22,
32
41BA
Solution
2.3.3 Multiplication of a Matrix with a Constant
Example 2.4
If given
=13
21C , determine 2C.
Solution:
2.3.4 Multiplication of Matrices
42
7/29/2019 Unit2 Matriks MATH2(D) Ikbn (Student Version)
5/27
Two matrices can be multiplied if the number of column for the first matrices and
the number of rows for the second matrices are equal.
If A = m byp matrix and B =p by n matrix, canA be multiplied with B?
Let us check!
The number of columns ofA =p and the number of rows of B =p.
EQUAL so A and B can be multiplied.
Can you guess the size of the product?
matrix)(matrix)(matrix)( pmnppm =
So the product ofAB has m rows andp columns.
Let
=
232221
131211
aaa
aaaA and
=
3231
2221
1211
bb
bb
bb
B .
( 2 by 3) (3 by 2)
Can we get the product ofAB?
Let us check the number of columns of matrix A and the number of rows of
matrix B.
The size of matrixA = 2 by 3 so the number of columns = 3.
The size of matrix B = 3 by 2 so the number of rows = 3.
EQUAL!We can get the product. Can you guess the size of the product?
Of course, it is a 2 by 2 matrix.
How to get the product ofAB?
++++++++=
=
322322221221322321221121
321322121211311321121111
3231
2221
1211
232221
131211
babababababa
babababababa
bb
bb
bb
aaa
aaaAB
Note : Make the first row of matrix A has been multiplied by every column
of matrix B. Then, only you move to the second row of matrix A.
43
7/29/2019 Unit2 Matriks MATH2(D) Ikbn (Student Version)
6/27
Example 2.5
Given
=
=
3
2and
13
21BA . FindAB.
Solution:
Example 2.6
Given
=
=
4251and
2301 BA . FindAB.
Solution:
Check whetherA and B can be multiplied. How?
Size ofA = 2 by 2, number of columns = 2.
Size of B = 2 by 2, number of rows = 2.
EQUAL, it meansA and B can be multiplied.
Can you guess the size of the product,AB?
Of course, a 2 by 2 matrix.
Example 2.7
44
7/29/2019 Unit2 Matriks MATH2(D) Ikbn (Student Version)
7/27
Given
=
=
112
031
401
and113
021BA . FindAB.
Solution:
Characteristics of matrix multiplication
(i) (mAB) = m(AB)
45
7/29/2019 Unit2 Matriks MATH2(D) Ikbn (Student Version)
8/27
(ii) A(BC) = (AB)C
(iii) (A + B)C=AC+ BC
(iv) C(A + B) = CA + CB
(v)TTT
ABAB =)(
Note : T is the symbol of a transpose matrix.
If
=
=
42
31then
43
21TAA .
If
=
=
963852
741
then987654
321T
BB .
Can you see what happened here?
The process of transposition changes the first row to be the first column, the
second row to be the second column and so on.
2.3.5 Types of Matrices
Here are a couple of examples of different types of matrices:
A. Symmetric
653
502
321
12
21.
B. Diagonal
600
040
001
40
01.
C. Upper Triangular
600
570
321
10
21.
46
7/29/2019 Unit2 Matriks MATH2(D) Ikbn (Student Version)
9/27
D. Lower Triangular
353
072
001
12
01.
E. Zero
000
000
000
00
00.
F. Identity
100
010
001
10
01.
Practice 2.1
1. Solve the equation of the following matrices.
=
+
54
31
52
21
y
x.
47
7/29/2019 Unit2 Matriks MATH2(D) Ikbn (Student Version)
10/27
2. Given
=
=
=
01
10
21
and112
101,
421
112CBA .
Calculate A + B and B + C.
3. Given
=
=
=
10
01and
30
12,13
21CBA .
Calculate
(a) 3A .
(b) 2B + 3C.
(c) BC.
(d) (BC) T .
2.4 Determinants, Minor, Adjoin, and Inverse Matrix
2.4.1 Determinants
Determinants play an important role in finding the inverse of a matrix and also in
solving system of linear equations. In the following we assume we have a square
48
7/29/2019 Unit2 Matriks MATH2(D) Ikbn (Student Version)
11/27
matrix (m rows = m columns). The determinant of a matrix A will be donated by
det(A) or A .
Determinant of a 3 by 3 matrix.
Assume
=
333231
232221
131211
aaa
aaa
aaa
A .
det(A) = A
3231
2221
13
3331
2321
12
3332
2322
11
333231
232221
131211
aa
aaa
aa
aaa
aa
aaa
aaa
aaa
aaa
+=
=
Example 2.8
Given
=
543
332
111
A . Find det(A).
2.4.2 Minor and Cofactor
A. Minor for a 3 by 3 matrix.
Assume
=
333231
232221
131211
aaa
aaa
aaa
A .
49
7/29/2019 Unit2 Matriks MATH2(D) Ikbn (Student Version)
12/27
Minor for3332
2322
11 isaa
aaa .
Minor for3332
2321
12 isaa
aaa .
Minor for3231
2221
13 isaa
aaa .
By now, you can figure out how to determine the minor of an element. Minor is
formed by excluding the row and column of the element involved.
Example 2.9
Given
=
543332
111
A . Determine the minor for the first rows elements.
B. Cofactor of a 3 by 3 matrix
Cofactor for elements ija is defined as :
ij
ji
ijA +
= )1( . ij is the minor for the element of row i and columnj.
Example 2.10
Given
=
543
332
111
A .
50
7/29/2019 Unit2 Matriks MATH2(D) Ikbn (Student Version)
13/27
Cofactor matrix of
333231
232221
131211
AAA
AAA
AAA
A = .
11)1(1.)1(
11)1(1)1(
00)1(0)1(
11.)1(1)1(
22)1(2)1(
11)1(1)1(
1)1()1()1()1(
11)1(1)1(
33)1(3)1(
63333
523
32
413
31
532
23
422
22
312
21
431
13
321
12
211
11
===
===
===
===
===
===
===
===
===
+
+
+
+
+
+
+
+
+
A
A
A
A
A
A
A
A
A
So the cofactor matrix of A is defined as :
Cofactor
=
110
121
113
A .
2.4.3 Adjoin Matrix
Adjoin matrix is defined as the transpose of the cofactor matrix.
T
ijAA ][)(adj =
Example 2.11
=543
332
111
A and cofactor
=110
121
113
A , so adjoin
=
111
121
013
A .
51
7/29/2019 Unit2 Matriks MATH2(D) Ikbn (Student Version)
14/27
2.4.4 Inverse Matrix
Assuming we have a square matrix A, which is non-singular ( det(A) 0 ), then
there exists matrix 1A which is called the inverse of A, such that this property
holds :
IAAAA == 11 whereIis the identity matrix.
The inverse of any square matrix, size of n by n is given by :
)det(
)(1
A
AadjA = .
Example 2.12
Given
=
543
332
111
A . We have found earlier that adjoin
=
111
121
013
A .
Det(A) = 1 .
So)det(
)(1
A
AadjA = =
1111
121
013
=
111
121
013
.
If we want to make sure the inverse matrix is indeed the inverse of matrix A, then
we have to multiply matrixA with the inverse matrix, 1A .
By definition, IAAAA == 11 whereIis the identity matrix.
So,
=
543
332
111
A and
=
111
121
0131A .
52
7/29/2019 Unit2 Matriks MATH2(D) Ikbn (Student Version)
15/27
=
111
121
013
543
332
1111AA
=
++++
++
540583549330362536
110121113
=
100
010
001
.
The product is an identity matrix so the inverse matrix that we got is correct.
Practice 2.2
1. Given
=
341
431
321
A . Find the 1A .
2. Given
=
113
232
321
A .
(a) By following the four steps, find the 1A .
(b) Show that the inverse matrix in (a) is correct.
Solution
2.5 The System of Linear Equations
Solving the system of linear equations by using matrices.
A system of linear equations is a set of equations with n equations and n
unknowns, is of the form of
........
...
...
.......
.......
2211
22222121
11212111
nnnnnn
nn
nn
bxaxaxa
bxaxaxa
bxaxaxa
=+++
=+++
=+++
53
7/29/2019 Unit2 Matriks MATH2(D) Ikbn (Student Version)
16/27
The unknowns are denoted by nxxx .......,,, 21 and the coefficient (as and bs)
are assumed to be given. In matrix form the system of equations above can be
written as :
=
nnnnnn
n
n
b
b
b
x
x
x
aaa
aaa
aaa
::
........
::::
........
........
2
1
2
1
21
22221
11211
A X B
A simplified way of writing, AX= B.
Example 2.13
Express the system of linear equations given below in matrix form.
(a).53
32
==+
yx
yx(b)
.323
223
12
=++
=+
=+
zyx
zyx
zyx
Solution:
54
7/29/2019 Unit2 Matriks MATH2(D) Ikbn (Student Version)
17/27
2.5.1 Inverse Matrix MethodThe inverse matrix method uses the inverse of a matrix to help solve a system of
linear equations, such like the above,AX= B.
Multiply both sides with 1A .
BAXAA
BAAXA
BAX
)()(
)()(
11
11
=
=
=
So it means BAX 1=
By calculating the inverse of a matrix and multiplying this by matrix, B we can
find the solution to the system of equations directly.
Looking at three equations we might have that
wvzuytx
srzqypx
dczbyax
=++
=++
=++
55
7/29/2019 Unit2 Matriks MATH2(D) Ikbn (Student Version)
18/27
Written in matrix form would look like
=
w
s
d
z
y
x
vut
rqp
cba
.
By rearranging we would get that the solution would look like
=
w
s
d
vut
rqp
cba
z
y
x1
.
Example 2.14
Solve the given the system of linear equations,
.3543
1332
2
=++
=++
=++
zyx
zyx
zyx
Solution
56
7/29/2019 Unit2 Matriks MATH2(D) Ikbn (Student Version)
19/27
2.5.2 Cramers Rule
Cramers rule uses a method of determinants to solve system of equations.
Let the system of equations be written asAX= B.
=
3
2
1
333231
232221
131211
b
b
b
z
y
x
aaa
aaa
aaa
.
Here,
=
333231
232221
131211
aaa
aaa
aaa
A .
A
Ax
1= where
=
33323
23222
13121
1
aab
aab
aab
A . Note : column
31
21
11
a
a
a
is replaced by
3
2
1
b
b
b
.
A
Ay
2= where
=
33331
23221
13111
2
aba
aba
aba
A . Note : column
32
22
12
a
a
a
is replaced by
3
2
1
b
b
b
.
57
7/29/2019 Unit2 Matriks MATH2(D) Ikbn (Student Version)
20/27
A
Az
3= where
=
33231
22221
11211
3
baa
baa
baa
A . Note : column
33
23
13
a
a
a
is replaced by
3
2
1
b
b
b
.
Example 2.15
Solve the system of linear equations below by using the Cramers rule.
.32
42
132
=+
=+
=+
zyx
zyx
zyx
Solution:
58
7/29/2019 Unit2 Matriks MATH2(D) Ikbn (Student Version)
21/27
Practice 3.3
1. Solve the system of linear equations given by the inverse matrix method.
.343
234
133
=++
=++
=++
zyx
zyx
zyx
Solution
59
7/29/2019 Unit2 Matriks MATH2(D) Ikbn (Student Version)
22/27
2. Solve the given system by using the Cramers rule.
.223
12
12
=++
=+
=++
zyx
zy
zyx
Solution
60
7/29/2019 Unit2 Matriks MATH2(D) Ikbn (Student Version)
23/27
EXERCISE
1. Find the values of a, b, c and d if
(a)
=
1842
436
124
422
d
c
b
a.
(b)
=
+ b
c
bd
a
21
23
43
22 .
2. Given
=
=
=22
43and
11
21
12
,
12
04
13
CBA .
Calculate,
(a) A + 2B.
(b) BA.
(c) TBC)( .
3. Find the determinants of the followings.
(a)150
232
403
. (b)141
213
342
.
61
7/29/2019 Unit2 Matriks MATH2(D) Ikbn (Student Version)
24/27
4. Given
=
cossin
sincosB .
Calculate,
(a) 2B . (b)3B .
5. Given
=
=
rq
pBA
0
30
055
,
010
210
121
.
Calculate,
(a) AB. (b) BA.
(c) Hence, determine the values ofp, q and r ifAB = BA.
6. Find the inverse matrices of the given matrices below.
(a)
=
524
012
321
A . (b)
=
301
021
112
B .
(c)
=1125412
613
C . (d)
=112212
221
D .
7. Solve the system of linear equations given by using
(i) the inverse method
(ii) the Cramers rule
(a)11273
543
32
=+=+
=+
zyx
zyx
zyx
. (b)043
1
32
=+=+
=+
zyx
zx
zyx
.
62
7/29/2019 Unit2 Matriks MATH2(D) Ikbn (Student Version)
25/27
(c)133
32
2253
=+
=+
=+
zyx
zyx
zyx
. (d)1363
632
2
=++
=++
=++
zyx
zyx
zyx
.
Answers to exercise:
1. (a) a = -4, b = -4, c = 1, d = -0.5(b) a = -3, b = 14, c = -1.33, d = 0.5
2. (a)
34
46
17
(b) cannot multiply (c)
6810
578
3. (a) 1 (b) -5
4. (a)
2cos2sin
2sin2cos(b)
3cos3sin
3sin3cos
5. (a)
++
++
p
rpq
rpq
30
2230
2115
(b)
+
+
qrq
p
20
630
15155
(c)p = 8, q = 4, r = -1
6. (a)
568
6710
345
(b)
43.014.029.0
14.071.043.0
29.043.086.0
(c)
111
032
213
(d)
110
67.0167.0
67.0033.0
7. (a)x = 1,y = 2,z = 3(b)x = 3,y = 1,z = -2(c)x = 2,y = 6,z = 13(d)x = 1,y = -2,z = 3
63
7/29/2019 Unit2 Matriks MATH2(D) Ikbn (Student Version)
26/27
Activity
1. The manufacture of an automobile requires painting, drying, and polishing. The
Parit Motor Company produces three types of cars : the Bengkok, the Jambol, and
the Botak. Each Bengkok requires 8 hours for painting, 2 hours for drying, and 1
hour for polishing. A Jambol needs 10 hours for painting, 3 hours for drying, and
two hours for polishing. It takes 16 hours of painting, 5 hours of drying, and 3
hours of polishing to prepare a Botak. The company uses 240 hours for painting,
69 hours for drying, and 41 hours for polishing in a given month. As the General
Manager, you have to determine how many of each type of car are produced.
You have to submit the report to your Board of Directors three days from now.
2. Mahkota Sdn Bhd produces luggage of three types : economy, standard and
deluxe. The company produces 1000 pieces of luggage at a cost of RM 20, RM
25, and RM 30 for the economy, standard, and deluxe luggage respectively.
Mahkota Sdn Bhd has a budget of RM 20,700. Each economy luggage requires 6
hours of labor, each standard luggage requires 10 hours of labor, and each deluxe
model requires 20 hours of labor. Mahkota Sdn Bhd has a maximum of 6800
hours of labor available. However, Mahkota sells all the luggage, consumes the
entire budget, and uses all the available labor.
Considering facts given, as the General Manager of Mahkota Sdn Bhd, you have
to determine how many of each type of luggage should be produced. Please do itas fast as you can, because you have to report it in the next meeting which is two
days from now.
Answers
1. Bengkok = 10, Jambol = 8, Botak = 5
64
7/29/2019 Unit2 Matriks MATH2(D) Ikbn (Student Version)
27/27
2. Economy = 900, Standard = 60, Deluxe = 40