BA201 Engineering Mathematic UNIT8 - Cramer's Rule and Inverse Matrix Method
BA201 Engineering Mathematic UNIT6 - Matrices Introduction
description
Transcript of BA201 Engineering Mathematic UNIT6 - Matrices Introduction
B3001/UNIT6/1
________________________________________________________________________
Prepared by : Nur Hidayah Othman Page 1
Unit
6
MATRICES (Introduction and types of matrices; problem
solving on simultaneous equation using
matrices method)
To know the different types of matrices and
understand how to apply it on simple algebra
problem solving.
Upon completing this module, you should be
able to:
Define matrix and identify the notation used
in matrices.
Solve matrix problems that involve simple
matrix algebra operations.
Define and determine the size of a matrix, a
square matrix, a symmetrical matrix,
diagonal matrix, identity matrix, and
transpose of a matrix.
General Objectives
Specific Objectives
B3001/UNIT6/2
________________________________________________________________________
Prepared by : Nur Hidayah Othman Page 2
6.0 INTRODUCTION
Matrices are sets of numbers that are arranged in rectangular forms. It is a
rectangular array of numbers. These numbers are arranged inside a round or
square bracket. Look at the examples shown below.
8324
4
5
2
325
793
32
41
69
16
It is important to study the fundamentals of matrices first and get a good
introduction on how to apply simple algebra operations on matrices. This can
help in solving engineering problems. For example, you can use matrices to solve
systems of linear simultaneous equations.
6.1 FUNDAMENTALS OF MATRIX
Each number inside a matrix is called an element of the matrix. These numbers
are arranged in rows and columns.
Rows are the horizontally arranged elements of the matrix
For example, the shaded region in the matrix below is the second row of the
matrix.
252
620
430
441
INPUT
B3001/UNIT6/3
________________________________________________________________________
Prepared by : Nur Hidayah Othman Page 3
Columns are the vertically arranged elements of the matrix.
For example, the shaded region in the matrix below is the second column of the
matrix.
252
620
430
441
Note: It is common practice to use bold capital letters or underlined capital letter
like A or A to represent a matrix, and small letters to represent the elements.
6.2 SIZE OF A MATRIX
The size of a matrix is the number of rows and columns that it has. If a matrix has
3 rows and 4 columns, then its size is 3 x 4.
Let’s look at the following matrix.
A =
6935
1038
7441
How many rows and columns do you see?
Do you agree that the size of matrix A is 3 x 4?
B3001/UNIT6/4
________________________________________________________________________
Prepared by : Nur Hidayah Othman Page 4
Example 6.1:
State the size of the following matrix.
047
933
663
194
Solution:
There are 4 rows and 3 columns. Therefore, the size of this matrix is 4 x 3.
For a matrix A of size 3 x 4, you can use the notation A34 to represent the matrix.
In general, any matrix can be represented by the notation matrix Aik with
i = 1, 2, 3, ….
k =1, 2, 3, ……
The first subscript, i, represents the rows and the second subscript, j, represents
the columns.
B3001/UNIT6/5
________________________________________________________________________
Prepared by : Nur Hidayah Othman Page 5
ACTIVITY 6a
6.1 State the size of each of the following matrices
a. 32
b.
5
4
3
c.
672
413
201
d.
75
91
23
6.2 Referring to matrix B =
271
480
353
, state the element at
a. b23
b. b21
c. b31
B3001/UNIT6/6
________________________________________________________________________
Prepared by : Nur Hidayah Othman Page 6
Feedback for Activity 6a
6.1
a. 1 x 2
b. 3 x 1
c. 3 x 3
d. 3 x 2
6.2
a. b23 = 4
b. b21 = 0
c. b31 = -1
B3001/UNIT6/7
________________________________________________________________________
Prepared by : Nur Hidayah Othman Page 7
6.3 ADDITION, SUBTRACTION AND MULTIPLICATION OF MATRIX
6.3.1 MATRIX ADDITION
The first algebra operation we are going to learn is how to add two matrices. Matrix
addition can only be performed on matrices that have the same size. The result of a
matrix addition is a new matrix that is of the same size. All we need to do is to match the
elements that are at the same position in their matrices. For example, element 12a should
be matched to element 12b to produce element 12c .
If A =
mnm
n
n
aa
aaa
aaa
..........
::::
:
:
1
22221
11211
and B =
mnm
n
n
bb
bbb
bbb
..........
::::
:
:
1
22221
11211
so C = A + B
=
mnmnmm
nn
nn
baba
bababa
bababa
........
::::
....
....
11
2222222121
1112121111
INPUT
B3001/UNIT6/8
________________________________________________________________________
Prepared by : Nur Hidayah Othman Page 8
Example 6.3 :
Given that,
3517
2331
10413
A dan
1031
0314
0852
B
determine A + B.
Solution:
)1(305)3(11)7(
0)2()3(313)4(1
010)8(45)1()2(3
BA
A + B =
2526
2043
10441
6.3.2 MATRIX SUBTRACTION
Like matrix addition, matrix subtraction can only be performed on matrices that
have the same size. The result of a matrix subtraction is a new matrix that is of
the same size too. Similarly,
If A =
mnm
n
n
aa
aaa
aaa
..........
::::
:
:
1
22221
11211
and B =
mnm
n
n
bb
bbb
bbb
........
::::
....
....
1
22221
11212
Then, C = A B =
mnmnmm
nn
nn
baba
bababa
bababa
........
::::
....
....
11
2222222121
1112121111
B3001/UNIT6/9
________________________________________________________________________
Prepared by : Nur Hidayah Othman Page 9
Example 6.4 :
Given that,
3517
2331
10413
A and
1031
0314
0852
B
determine A – B.
Solution:
Then,
)1(305)3(11)7(
0)2()3(313)4(1
010)8(45)1()2(3
BA
4548
2625
101265
BA
6.3.3 MATRIX MULTIPLICATION
Matrix multiplication is a little bit more complicated. In order to be able
to multiply two matrices AB, we have to ensure that the number of columns in
matrix A is the same as the number of rows in matrix B. That means we can
multiply matrix Amn with matrix Bnk because matrix A has n columns and matrix
B has n rows too. The result is a new matrix that has m rows and k columns.
The actual multiplication process involves taking a row i from matrix A
and matching it with a column j from matrix B. The result becomes the element
ij of the new matrix.
B3001/UNIT6/10
________________________________________________________________________
Prepared by : Nur Hidayah Othman Page 10
The operation is as follows:
If A =
mnm
n
n
aa
aaa
aaa
..........
::::
:
:
1
22221
11211
and B =
jkj
k
k
bb
bbb
bbb
........
::::
....
....
1
22221
11211
matrix m x n matrix j x k
then, C = AB with size m x k
Then, C =
mkm
k
k
cc
ccc
ccc
........
::::
....
....
1
22221
11211
where c11 = a11 x b11 + a12 x b21 + a13 x b31+ ……… + a1n x bj1
c12 = a11 x b12 + a12 x b22 + a13 x b32 + ……… + a1n x bj2
c21 = a21 x b11 + a22 x b21 + a23 x b31 + ……… + a2n x bj1
.
.
.
cmk = am1 x b1k + am2 x b2k + am3 x b3k + ……… + amn x bjk
Remember!
Multiplication can only
happen if n = j
B3001/UNIT6/11
________________________________________________________________________
Prepared by : Nur Hidayah Othman Page 11
Example 6.5:
Find the multiplication of
10
25A and
11
73B
Solution:
11
73
10
25AB =
)1(17011)3(0
)1(27512)3(5
=
1010
235215
AB =
11
3313
Example 6.6:
Find the products of matrix A and B, given that,
126
410
872
101
A and
54
13
02
B
Solution:
The size of matrix A is 4 x 3 and the size of matrix B is 3 x 2. Therefore we can
multiply them. The new matrix will be of size 4 x 2.
51)1(20641)3(226
5)4()1(1004)4()3(120
58)1()7(0248)3()7(22
51)1(00141)3(021
AB
B3001/UNIT6/12
________________________________________________________________________
Prepared by : Nur Hidayah Othman Page 12
5204612
20101630
407032214
500402
310
2119
4757
56
AB
Note: We cannot find the product of BA because the number of columns in matrix B is
not the same as the number of rows in matrix B.
B3001/UNIT6/13
________________________________________________________________________
Prepared by : Nur Hidayah Othman Page 13
ACTIVITY 6b
6b1 Based on the following matrices,
A =
59
73 B =
53
43
C =
6
2 D =
75
24
determine:
a. A + B
b. A – C
c. D + (B – A)
d. B + C
6b2 Given that A =
14
12 and B =
32
10,
find:
a. AB
b. BA
6b3 If M =
271
480
353
and N =
5
1
2
,
Find the product of MN.
B3001/UNIT6/14
________________________________________________________________________
Prepared by : Nur Hidayah Othman Page 14
Feedback for Activity 6b
6b1
a.
06
116
b. no solution.
c.
37
54
d. no solution.
6b2
a.
12
12
b.
18
14
6b3 MN =
15
28
4
B3001/UNIT6/15
________________________________________________________________________
Prepared by : Nur Hidayah Othman Page 15
6.4 TYPES OF MATRICES
6.4.1 SQUARE MATRIX
A square matrix is a matrix where the number of rows is equal to the number of
columns. The following examples are square matrices.
53
43
271
480
353
15491
317210
231254
91623
6.4.2 DIAGONAL MATRIX
If all the elements of a square matrix consist of zeros except the diagonal, then
this matrix is called a diagonal matrix. The following examples are diagonal
matrices.
33
22
11
00
00
00
a
a
a
50
03
200
080
003
6.4.3 IDENTITY MATRIX
If all the elements of a diagonal matrix consist of the value 1, then the matrix is an
identity matrix. The following examples are identity matrices.
I =
100
010
001
I =
10
01 I =
1000
0100
0010
0001
INPUT
B3001/UNIT6/16
________________________________________________________________________
Prepared by : Nur Hidayah Othman Page 16
An identity matrix is special because when you multiply a matrix with it or when
you multiply it with a matrix, the matrix does not change. For example:
AI = A IB = B MI = M
6.4.4 TRANSPOSE OF MATRIX
When you interchange the rows of a matrix with its columns, you would have
converted a matrix Amn to another matrix Anm. In other words, a matrix of size m
x n now is size n x m. This new matrix is called the transpose of a matrix. The
symbol for a transpose of a matrix A is AT.
Let’s look at the following example.
If A =
3231
2221
1211
aa
aa
aa
then, AT =
232221
131211
aaa
aaa
Example 5.7:
If A =
106
612
002
then, transpose matrix of A, AT =
160
010
622
Shown that, the first row becomes the first column, the second row becomes the second
column and so on.
Transpose for the transpose of matrix given the original matrix A
(AT)T = A
Some important properties relating to transpose are:
(AB)T = B
TA
T
(ABC…Z)T = Z
T…..B
TA
T
(A + B)T = A
T + B
T
B3001/UNIT6/17
________________________________________________________________________
Prepared by : Nur Hidayah Othman Page 17
6.4.5 SYMMETRIC MATRIX
When you interchange the rows of a matrix with its columns, you would have
converted a matrix Amn to another matrix Anm. In other words, a matrix of size m
x n will now be of size n x m. This new matrix is called the transpose of a matrix.
The symbol for a transpose of a matrix A is AT. Let’s look at the following
example.
A = AT (symmetric)
Example 6.8:
Determine whether the following matrices are symmetric or not.
a)
632
321
b)
305
028
681
c)
453
502
321
d)
937
326
761
Solution:
a) not symmetric
b) not symmetric
c) is symmetric
d) is symmetric
B3001/UNIT6/18
________________________________________________________________________
Prepared by : Nur Hidayah Othman Page 18
AKTIVITI 6c
6c.1 Observe the following matrices:
A =
50
03 B =
23
42
C =
001
010
100
D =
3
5
5
3
E =
864
642 F =
10
01
Determine of the above matrices are of the following types:
a) Diagonal matrix
b) Square matrix
c) Symmetric matrix
d) Identity matrix
6c.2 If A =
03
34
21
, determine AT.
B3001/UNIT6/19
________________________________________________________________________
Prepared by : Nur Hidayah Othman Page 19
Feedback for Activity 6c
6c.1
a) Diagonal matrix: A and F
b) Square matrix: A, B, C and F
c) Symmetric matrix: C and F
d) Identity matrix: F
6c.2 AT =
032
341
B3001/UNIT6/20
________________________________________________________________________
Prepared by : Nur Hidayah Othman Page 20
SELF ASSESSMENT
6.1 Given two matrices A and B, where
A =
70
52
31
and B =
21
31
02
,
evaluate:
a. A + B
b. A – B
6.2 If A =
95
37
21
and B =
271
480
353
,
evaluate:
a. BA
b. AI
c. IB
d. B2
(Note: B2 = B x B )
6.3 Given that
A =
19
03
72
and B =
421
039,
Prove that (AB)T = B
T A
T.
B3001/UNIT6/21
________________________________________________________________________
Prepared by : Nur Hidayah Othman Page 21
SOLUTIONS TO SELF ASSESSMENT
6.1 a) A + B =
91
81
33
b) A – B =
51
23
31
6.2 a)
3758
6076
623
b) A
c) B
d)
35655
40924
53412
6.3 AB =
42980
0927
28825
(AB)T =
4028
2998
802725
BT A
T =
4028
2998
802725
Therefore, (AB)T = B
T A
T.