Professional Documents
Culture Documents
Chapter 5 DBM 10063
Chapter 5 DBM 10063
Learning Outcomes:
Column 2
Column 3
k
31 k32 k33 Row 3
Element of a Matrix C can be denoted by kij where ith refers to no. of row and jth refers to no.
of column.
a) Element
Each number in matrix is known as element. The numbers should be real number. Matrix C
has ‘k’ elements where ‘k’ is a constant and ‘k’ is any real numbers.
b) Order
Order in matrix is depended on its rows and columns. Usually we state letter m as rows and
letter n as columns. Thus order of a matrix depends on m rows by n columns or (m x n).
Matrix C has 3 rows and 3 columns. Thus, the order of Matrix C is 3 by 3 (3 x 3).
57 | P a g e
DBM 1033 MATHEMATICAL COMPUTING
Example :
58 | P a g e
DBM 1033 MATHEMATICAL COMPUTING
1 0
Identity 2 rows x 2 column (2 x 2) I 2 =
Matrix, In 0 1
1 0 0
3 rows x 3 columns (3 x 3)
I3 = 0 1 0
0 0 1
Two matrices can be added or subtracted if both matrices have the SAME ORDER.
Example:
a. (3 4 5 ) + (1 2) = no solution (not same order)
b. (3 8 ) + (1 4 ) = (3 + 1 8 + 4 ) = (4 12)
1 7 1 − 7 − 6
c. 5 − 3 = 5 − 3 = 2
6 5 6 − 5 1
Multiplication
Example:
2 − 10 3 × 2 3 × −10 6 − 30
3 = =
1 4 3 × 1 3 × 4 3 12
123 | P a g e
DBM 1033 MATHEMATICAL COMPUTING
Two matrices can be multiplied when the number of columns for the first matrix is the
same as the number of rows for the second matrix.
Example:
1 3 5
1. ×
2 4 6
2 x 2 2 x 1
2 vertical
lines
2nd matrix has 1 column then draw 1 horizontal line perpendicular to the vertical lines.
Step 3: Inside 1st row and 1st column of the table, write symbols multiplication (x)
1st row x
1stcolumn
124 | P a g e
DBM 1033 MATHEMATICAL COMPUTING
Step 4: Inside 2nd row and 1st column of table, insert the element of 1st row of 1st matrix.
x
2nd row
1st column
1 3
Step 5: Inside 3rd row and 1st column of table, insert the element of 2nd row of 1st matrix.
1 3
3rd row
1st column
2 4
Step 6: For 1st row and 2nd column of the table, write down the element of the 2nd matrix.
x 5 1st row
6 2nd column
1 3
2 4
Step 7: Thus, 1st element in 2nd row and 1st column should be multiplied with 1st element in 1st
row and 2nd column and 2nd element in 2nd row and 1st column multiply with 2nd element in 1st
row and 2nd column. Then, sum the elements together. Continue by doing the same for another
elements in other rows and columns.
5
x
6
1 3 (1 x 5) + (3 x 6) = 23
2 4 (2 x 5) + (4 x 6) = 34
23
The answer of this question is
34
3 5 − 5
− 1 2 − 2
2. × 0 7 2
11 4 5 1 0 1
125 | P a g e
DBM 1033 MATHEMATICAL COMPUTING
Solution:
Step 1: Draw 2 vertical lines as no. of rows for the 1st matrix is 2 and draw 3 horizontal lines
as no. of columns for 2nd matrix is 3. The horizontal lines must cross the vertical lines. See
illustration below.
3 5 -5
x 0 7 2
1 0 1
-1 2 -2
11 4 5
Step 3: Calculate each element for rows and columns and sum them. Continue doing the
same until the empty blocks are filled with the answer. See next illustration.
3 5 -5
x 0 7 2
1 0 1
= -3 + 0 + (-2) = -5 = -5 + 14 + 0 = 9 = 5 + 4 + (-2) = 7
= 33 + 0 + 5 = 38 = 55 + 28 + 0 = 83 = -55 + 8 + 5 = -42
− 5 9 7
38 83 − 42
126 | P a g e
DBM 1033 MATHEMATICAL COMPUTING
Example:
2 0 − 9
A = 2 1 − 6
6 0 − 1
1
Transpose A, then
2 2 6 1
AT = 0 1 0
− 9 − 6 − 1
Determinant of 2 x 2 matrix
Example:
1 2
Let C = , find the determinant of C.
3 5
Solution:
1 2
Det (C) = = 1(5) – 2(3) = 5 – 6 = -1
3 5
127 | P a g e
DBM 1033 MATHEMATICAL COMPUTING
Determinant of 3 x 3 matrices
Example:
2 2 1
Let B = 3 1 1 , find the determinant of B.
1 3 2
First, add the 1st and 2nd column at the
back of matrix. Then, do the cross as
Solution: shown in number 1, 2, 3, 4, 5 and 6.
1 2 3
2 2 1 2 2
3 1 1 3 1
Determinant (B) =
1
3 2 1 3
6 5 4
Inverse of 2 x 2 Matrix
a b
Let A = then inverse of A is
c d
1 d − b
A −1 =
Det (A ) − c a
128 | P a g e
DBM 1033 MATHEMATICAL COMPUTING
Example:
1 4
Let A = , find the inverse of A.
3 9
Step 1: Determinant of A.
1 9 − 4
A −1 =
− 3 − 3 1
1 1
9 − 4
−3 − 3
A −1 =
1 1
− 3 1
−3 −3
4
− 3
A −1 = 3
1 1
−3
Inverse of 3 x 3 Matrix
Example:
1 1 2
Let D = 0 2 4 , find the inverse of D
1 3 1
1 1 2 1 1
0 2 4 0 2
1
3 1 1 3
Determinant (D)
= [(1× 2 × 1) + (1× 4 × 1) + (2 × 0 × 3 )] −
[(1× 0 × 1) + (3 × 4 × 1) + (1× 2 × 2)]
= (2 + 4 + 0 ) − (0 + 12 + 4 )
= 6 − 16 = −10
129 | P a g e
DBM 1033 MATHEMATICAL COMPUTING
Step 2: Minor of D
1 1 2 1 1 2 1 1 2
m11 = 0 2 4 m12 = 0 2 4 m13 = 0 2 4
1 3 1 1 3 1
1 3 1
m11 = (2 )(1) − (4 )(3) = −10 m12 = (0 )(1) − (4 )(1) = −4 m13 = (0 )(3) − (2 )(1) = −2
1 1 2 1 1 2 1 1 2
m 21 = 0 2 4 m 22 = 0 2 4 m 23 = 0 2 4
1 3 1 1 3 1 1 3 1
1 1 2 1 1 2 1 1 2
m 31 = 0 2 4 m32 = 0 2 4 m33 = 0 2 4
1 3 1 1 3 1 1 3 1
− 10 − 4 − 2
− 5 −1 2
0 4 2
Step 3: Cofactor of D
− 10 (− ) − 4 − 2
Cof (D ) = (− ) − 5 − 1 (− )2
0
(−)4 2
− 10 4 − 2
Cof (D ) = 5 − 1 − 2
0 −4 2
130 | P a g e
DBM 1033 MATHEMATICAL COMPUTING
T
− 10 4 − 2
[Cof (D)] T
= 5 − 1 − 2
0 −4 2
− 10 5 0
Adj (D ) = 4 − 1 − 4
−2 −2 2
Step 5: Inverse of D
D −1 =
1
Det (D )
[ ]
Adj (D )
− 10 5 0
−1 1
D = 4 −1 − 4
− 10
−2 −2 2
1 1 1
− 10 × 5× 0×
− 10 − 10 − 10
1 1 1
= 4× − 1× − 4×
− 10 − 10 − 10
1 1 1
− 2 × − 10 − 2 × − 10 2 × − 10
1
1 − 0
2
−1 2 1 2
D = −
5 10 5
1 1 1
−
5 5 5
131 | P a g e
DBM 1033 MATHEMATICAL COMPUTING
Example:
2x + 4 y = 2
− 2x − 3y = 5
Solution:
2 4 x 2
× =
− 2 − 3 y 5
Step 2: Determinant of A
2 4
Determinant (A) = = (2)(− 3 ) − (4 )(− 2) = −6 + 8 = 2
− 2 − 3
Step 3: Determinant of x
2 4
Determinant (x) = = (2)(− 3 ) − (4 )(5 ) = −6 − 20 = −26
5 − 3
Step 4: Determinant of y
2 2
Determinant (y) = = (2)(5 ) − (2)(− 2) = 10 + 4 = 14
− 2 5
Step 5: Values of x and y
Det (x ) − 26
x= = = −13
Det (A ) 2
Det (y ) 14
y= = =7
Det (A ) 2
132 | P a g e
DBM 1033 MATHEMATICAL COMPUTING
Example 11
2 x − 2y + z = 3
3x + y − z = 7
x − 3 y + 2z = 0
Step 2: Determinant of A
2 − 2 1 2 − 2
A = 3 1 − 1 3 1
1 − 3 2 1 − 3
Determinant (A)
= [(2 × 1× 2) + (− 2 × −1× 1) + (1× 3 × −3 )] −
[(2 × 3 × −2) + (− 3 × −1× 2) + (1× 1× 1)]
= [4 + 2 + (− 9 )] − [(− 12 + 6 + 1)]
= −3 − (− 5 )
=2
Step 3: Determinant of x
3 − 2 1 3 − 2
x = 7 1 − 1 7 1
0 − 3 20 − 3
Determinant (x)
= [(3 × 1× 2) + (− 2 × −1× 0 ) + (1× 7 × −3 )] −
[(2 × 7 × −2) + (− 3 × −1× 3) + (0 × 1× 1)]
= [6 + 0 + (− 21)] − [(− 28 + 9 + 0 )]
= −15 − (− 19 )
=4
133 | P a g e
DBM 1033 MATHEMATICAL COMPUTING
Step 4: Determinant of y
2 3 1 2 3
y = 3 7 − 1 3 7
1 0 2 1 0
Determinant (y)
= [(2 × 7 × 2) + (3 × −1× 1) + (1× 3 × 0 )] −
[(2 × 3 × 3) + (0 × −1× 2) + (1× 7 × 1)]
= [28 − 3 + 0] − [(18 + 0 + 7 )]
= 25 − 25
=0
Step 5: Determinant of z
2 − 2 32 − 2
z = 3 1 7 3 1
1−3 0 1 − 3
Determinant (z)
= [(2 × 1× 0 ) + (− 2 × 7 × 1) + (3 × 3 × −3 )] −
[(0 × 3 × −2) + (− 3 × 7 × 2) + (1× 1× 3)]
= [0 − 14 + (− 27 )] − [(0 − 42 + 3 )]
= −41 − (− 39 )
= −2
Det (x ) 4
x= = =2
Det (A ) 2
Det (y ) 0
y= = =0
Det (A ) 2
Det (z ) − 2
z= = = −1
Det (A ) 2
134 | P a g e