MATHEMATICS UNIT : FET/FIB
MAT 1064
2.1 DEFINITION & TYPES OF MATRICES
Definition
A matrix is a rectangular array of numbers enclosed between brackets.
The general form of a matrix with m rows and n columns is
a11 a12 a13 a1n
a21 a22 a23 a2n
a31 a32 a33 a3n m rows
am1 am2 am3 amn
n columns
The order or dimension of a matrix of m rows and n columns is m x n.
The individual numbers that makes up a matrix are called its entries or elements, aij and they
are specified by their row and column position.
The matrix for which the entry is in ith row and jth column is denoted by [ aij ].
Example 1
Let = [ 5 6 1
−2 3
2] ; (a) what is the order of matrix A? , (b) Identify the values of a21 and a13 .
−7
(a) Since A has 2 rows and 3 columns, the order of A is 2 x 3.
(b) The entry a21 is in the second row and the first column. Thus, a21 = -2.
The entry a13 is in the first row and the third column, so a13 = 1 .
2
Example 2
Given = [ ]3×3. Find matrix A if = {2 ;+ ≤
; >
a11 = 1(1) = 1 a12 = 1(2) = 2 a13 = 1(3) = 3
a21 = 2(1) + 2 = 4 a22 2(2) = 4 a23 = 2(3) = 6
a31 = 2(1) + 3 = 5 a32 = 2(2) + 3 = 7 a33 = 3(3) = 9
USER 1
MATHEMATICS UNIT : FET/FIB
MAT 1064
Equality of Matrices
Two matrices are equal if they have the same dimension and their entries are equal.
Example 3
Let A 3 a 6 4 and B 9 6c 4
8 4b 2 , 2 3d 8 2 .
If = , find the values of , , and .
3 – = 9 4 = −8 6 – = 6 2 – 3 = 8
= −6 = −2 = 0 = −2
Types of Matrices
1. Row Matrix is a (1 x n) matrix (one row);
A a11 a12 a13 a1n
Example 4 B 1 0 7 8 4 3 5
A 1 2 3 4 5;
2. Column Matrix is a (m x 1) matrix (one column);
a11 Example 5
a21 2
A a31 A 0 , B 3
4 5
am1 7
3. Square Matrix is a n x n matrix which has the same number of rows as columns.
Example 6
A 1 3 , 2 x 2 matrix. 1 3 2
1 8 B 3 1 2 , 3 x 3 matrix.
2 3 1
4. Zero Matrix is a (m x n) matrix which every entry is zero, and denoted by O.
Example 7 0 0 0 0 0 0 0
O 0 0 , O 0 0 , 0 0
0 0 0 0 0 O
0
USER 2
MATHEMATICS UNIT : FET/FIB
MAT 1064
5. Diagonal Matrix
a11 a12 a13 a1m
Let A = a21 a22 a23 a2m
a32 a33
a31 a3m
am1 am2 am3 amm
The diagonal entries of A are a11 , a22 , a33 ,…, amm
A square matrix which non-diagonal entries are all zero is called a diagonal matrix.
Example 8
(a) A 2 0 1 0 0 a 0 0
0 3 (b) B 0 2 0 (c) C 0 0 0
0 0 3 0 0 b
6. Identity Matrix is a diagonal matrix which all its diagonal entries are 1, denoted by I.
Example 9
(a) A 1 0 I 22 1 0 0
0 1 (b) B 0 1 0 I33
0 0 1
7.
Lower Triangular Matrix is a square matrix and Upper Triangular Matrix is a square matrix and
aij 0 for i j aij 0 for i j
a11 a12 a12 a11 a12 a12
A a21 A a21
a22 a23 a22 a23
a31
0 a32 a33 a31 a32 a33
0
Example 10 3 Example 11
1 0 a 0 0 1 2 3 a b c
A = 3 2 B = b f 0 A = 0 2 4 B = 0 d
d e e
3 2 c 0 0 3
0 0 f
USER 3
MATHEMATICS UNIT : FET/FIB
MAT 1064
2.2 OPERATIONS ON MATRICES
ADDITION AND SUBTRACTION OF MATRICES
For m x n matrices, A = [ aij ] and B = [ bij ],
A + B = C = cij mxn , where cij aij bij .
A – B = D = dij mxn , where dij aij bij .
Note:
The addition or subtraction of two matrices with different orders is not defined. We say the two matrices
are incompatible.
Example 12
Simplify the given quantity for A 1 2 , B 4 3 and C 1 .
3 4 5 6 2
(a) A + B (b) A – B (c) A + C
a) b)
5 5 Ans : 3 1
Ans : 2 10 2
8
c) A C 1 2 1
3 4 2
Since matrix A is of order 2 x 2 and matrix C is of order 2 x 1, the matrices have different orders, thus
A and C are incompatible.
USER 4
MATHEMATICS UNIT : FET/FIB
MAT 1064
SCALAR MULTIPLICATION
If is a scalar and A aij then cA bij where bij caij
Example 13 Example 14
2 4 1 Let A 1 4 and B 3 6
2 5 3 4 2 . Calculate
Given A 8 5 , find A .
7
6 3A 2B.
Solution Solution
1 2 1 4 3A 2B 3 1 4 2 3 6
2 2 5 3 4 2
1 1 1
2 A 2 8 2 5 3 12 6 12
15 8
1 6 1 7 9 4
2 2
= 3 0
5
7
1
2
4
5
3
2
7
2
Properties
(a) A B B A ( Commutative )
(b) A B C A B C ( Associative)
(c) A A A A O ( O- zero matrix)
(d) A A A , constant
(e) A B A B
(f) A A
USER 5
MATHEMATICS UNIT : FET/FIB
MAT 1064
Exercises 1.1
1. (a) Find matrix A aij 2x3 if aij i2 j j2i
2i j, i j
ij, i
(b) Find matrix B bij 3x3 if bij i 2 j, j
i
j
2. Simplify the given quantity for A 1 2 and B 2 1
3 5 4 9 .
(a) A + B (b) A – B
(c) 2A – 5B (d) 3A + 2B
3. Solve the given equation for the unknown matrix X.
1 2 3 0 0 0
(a) 2X + 6 5 4 = 0 0 0
(b) -2 X 2 6 4 X 0 0
3 3 2 4
Ans :
2 6 12 1 4 5
1. (a) 6 16 30 (b) 0 4 7
1 1 9
3 3 1 1 8 1 7 8
2. (a) 7 14 (b) 1 4 (c) 14 35 (d) 17 33
3. (a) 1 1 232 2 6
2 (b) 4 5
5
3 2
USER 6
MATHEMATICS UNIT : FET/FIB
MAT 1064
Multiplication of Matrices
The product of two matrices A and B is defined only when the number of columns in A is equal to the
number of rows in B.
If the order of A is m n and the order of B is n p, then AB has order m p.
AmnBnp ABmp
A row and a column must have the same number of entries in order to be multiplied.
b1
b2
R a1 a2 a3 ... an and C ...b3
bn
RC a1b1 a2b2 a3b3 ...anbn
Example 15
1 2 3 2 1
Find 2 0 5 3 4
2 1
1 2 3 2 1 1(2) 2(3) 3(2) 1(1) 2(4) 3(1) 2 12
2 0 5 3 4 2(2) 0(3) 5(2) 2(1) 0(4) 5(1) = 6
2 1 = 3
Example 16
2 5 4 1 2 3 5
2 0 5 3
A and B 5 2 1 5 . Find AB.
4
0 7
Ans : AB 7 30 11 43
45 4 10 5
USER 7
MATHEMATICS UNIT : FET/FIB
MAT 1064
Example 17
Let A 1 2 and B 2 1
4 3
3 2
Show that AB ≠ BA.
1 2 2 1 (1)2 2(3) (1)(1) 2(2) 4 5
AB = 3 4 3 2 = 3(2) 4(3) = 18 5
3(1) 4(2)
2 1 1 2 2(1) (1)3 2(2) (1)4 5 0
BA = 3 4 = = 14
2 3 3(1) 2(3) 3(2) 2(4) 3
Thus, AB ≠ BA.
Properties ( Associativite)
(a) ABC ABC
(b) A B C AB AC ( Distributive)
Transpose Matrix
The transpose of a matrix A, written as AT, is the matrix obtained by interchanging the rows and columns
of A. That is, the i th column of AT is the i th row of A for all i’s.
If Amn aij then AT nm a ji
a11 a12 a13 a11 a21 a31
A a21
a22 a23 then AT a12 a22 a32
a31 a32 a33 33 a13 a23 a33 33
Properties of Transpose Matrix
(A ± B)T = AT ± BT
(AT)T = A
(AB)T = BTAT
(kA)T = kAT
USER 8
Example 18 MATHEMATICS UNIT : FET/FIB
2 MAT 1064
Let B 1 then BT 2 1 3 13 USER 9
331
1 3 3 1 2 1
If D 2 5 4 then DT 3 5 3
1 3 533 3 4 533
Example 19
Let A 1 2 B 3 4 and C 1 4
3 4 , 2 1 3 2 .
Show that (a) (A + B )T = AT + BT
(b) (BC)T = CTBT
Solution
1 3 2 4 4 6
(a) A + B = 3 2 4 1 = 5 5
(A + B )T = 4 5
6 5
AT + BT = 1 3 3 2
2 4 4 1
1 3 3 2
= 2 4 4 1
4 5
= 6 5
(A + B )T = AT + BT
MATHEMATICS UNIT : FET/FIB
MAT 1064
(b) 3 4 1 4T
(BC)T = 2 1 3 2
= 3 12 12 8T
2 3 8 2
= 15 20T
5 10
15 5
= 20 10
CTBT 1 4T 3 4T
= 3 2 2 1
1 3 3 2
= 4 2 4 1
3 12 2 3
= 12 8 8 2
15 5
= 20 10
(BC)T = CTBT
USER 10
MATHEMATICS UNIT : FET/FIB
MAT 1064
Exercises 1.2
1 2 4 1 2 3 7 9
2 3 0 , 3 4 , and C 4 1 .Indicate whether the given product
1. Let A B 2 5 4
6
is defined. If so, give the order of the matrix product. Then compute the product, if possible.
(a) (b) (c)
(d) (e) (f)
3 1 2 1 3 4
Let A 4 B 1 2 2 2 .
2. 2 0 , 1 1 and C
1
Find ATB (b) BTA (c) (BC)T (d) (A+B)T
(a)
Answers
1. (a) Not defined
19 41 27
(a) Defined; 2x3 ; 18 29 21
5 8 4
(b) Defined; 2x3 ; 11
18 12
(c) Not defined
(d) Not defined
(e) Not defined
2. (a) 12 13 (b) 12 1
1 13
0 0
8 7 5 5 5 3
(c) 10 8 6 (d) 0 2 2
USER 11
MATHEMATICS UNIT : FET/FIB
MAT 1064
2.3 DETERMINANT 0F 2x2 AND 3x3 MATRIX
Determinant of 2 x 2 Matrices
a b
c
Given A = d
Then determinant A = ab = ad – bc
cd
Example 22
2 5 3 2
Given A = 3 8 and B = 5 2 , find A , B , AB , BA .
USER 12
MATHEMATICS UNIT : FET/FIB
MAT 1064
Minor and Cofactor
Let be × matrix,
1. The minor Mij of the element aij is the determinant of the matrix obtained by deleting the ith row
and jth column of .
2. The cofactor Cij of the element aij is Cij = (-1)i+j Mij
1 2 -1
A 3 4 2
1 4 3
Minor
M11 is the determinant of the matrix obtained by deleting the first row and first column of A.
1 2 −1
M11 = |3 4 2 | = 4(3)-4(2) = 4
14 3
Similarly
1 2 −1
M32 = |3 4 2 | = 1(2) – (3)(-1) = 5
14 3
Therefore,
a a a
13
If A = 11 12 , then
a
a a 23
21 22
a a a
31 32 33
aM11 = 22 a23 aand M32 = 11 a13
a32 a33 a21 a23
Cofactor
Cij = ( - 1 )i +j Mij
Then, C11 = (-1)1+1 M11 = 4 and
C32 = (-1)3+2 M32 = -5
USER 13
Example 23 MATHEMATICS UNIT : FET/FIB
MAT 1064
2 4 2
A 2 0 (ii) M31 = 4 2 = ( -16 – 0 ) = -16
4 04
4 3 3 C31 = (-1)3+1(-16) = -16
(iv) M23 = 2 4 = (6 + 16 ) = 22
find
43
i . M12 and C12 C23 = (-1)2+3 (22) = -22
ii. M31 and C31
iii. M22 and C22
iv. M23 and C23
(i) M12 = 2 4 = ( 6 – 16) = -10
4 3
C12 = ( -1 )1+2 (-10) = 10
(iii) M22 = 2 2 = ( -6 + 8 ) = 2
4 3
C22 = (-1)2+2(2) = 2
Determinant of 3 x 3 Matrix
Expansion of the cofactor
A aij cij ;
i 1, 2, ..., n and j 1, 2, ..., n
By expanding along the first row a11, a12 , a13 By expanding along first column
Elements in 1st row : Elements in 1st column : a11, a21, a31
A a11c11 a12c12 a13c13 A a11c11 a21c21 a31c31
A a11m11 a12m12 a13m13
A a11m11 a21m21 a31m31
USER 14
MATHEMATICS UNIT : FET/FIB
MAT 1064
Example 25
3 1 4
Let A 1 2
7 , find A by e xpanding along ;
5 1 10
a) sec ond row
b) first column
a) b)
3 1 4 3 1 4
1 2 7 1 2 7
5 1 10 5 1 10
1 4 (2) 3 43 1 2 1 4
| A | 1 (7) 1 | A | (3) (1) (5)
1 10 5 10 1 10
10 5
3(2)(10) (7)(1) (1)(1)(10) (1)(4)
(5)(1)(7) (4)(2)
28
28
USER 15
MATHEMATICS UNIT : FET/FIB
MAT 1064
USER 16
MATHEMATICS UNIT : FET/FIB
MAT 1064
USER 17
MATHEMATICS UNIT : FET/FIB
MAT 1064
USER 18
MATHEMATICS UNIT : FET/FIB
MAT 1064
Example 28
1 1 1
Given that A a b c and A 3. By using the properties of determinant, evaluate
a2 b2 c2
3 2a2 3 2b2 3 2c2 a 1 a2
b) b 1 b2
a) a b c
a2 b2 c2 c 1 c2
2a 2b 2c d) A3
c) a2 b2 c2
222
3 2a2 3 2b2 3 2c2 3 3 3 2a2 2b2 2c2
a) a b c a b c a b c
a2 b2 c2 a2 b2 c2 a2 b2 c2
111 a2 b2 c2
3 a b c 2 a b c
a2 b2 c2 a2 b2 c2
3 A 20 33 0
9
USER 19
MATHEMATICS UNIT : FET/FIB
MAT 1064
a 1 a2 1 a a2 111
b) b 1 b2 11 b b2 1 a b c (1) A 3
c 1 c2 1 c c2 a2 b2 c2
Ans : c) 12 d) 27
EXERCISES 1.3 :
2 5 1
1) Find the determinant of A 3 0
1 by using expansion of the cofactor.
2 5 4
2) Find the determinant for these matrices by using the method above:
(a) A= 6 3
2 3
(b) B = 2 3 1
0 2 4
2 5 6
t 1 5 3
3) The matrix N is given by N 3 1 1 . If N 181, M31 7
2t 3
2
and C23 11 , determine the positive values of t , and .
ANSWERS:
1) 25
2) a. 24 b. -44
3) 3, t 2, 5
USER 20
MATHEMATICS UNIT : FET/FIB
MAT 1064
Adjoint Matrix
Let C cij be the cofactor matrix of A.
Adjoint of matrix A (adj A) is defined as the transpose of the cofactor matrix that is
adj A CT cij T c ji
Remember: Cofactor , cij = (-1)i+j mij, m11 m12 m13
C m21 m22
m32 m23
m31
m33
Example 29
1 2 3
Given A 3 2 4 . Find the adjoint of A.
1 1 3
24 34 32
c11 1 2 c12 1 5 c13 1 1
3 3 1
c21 c22 c23
c31 c32 c33
2 5 1 T
adj A 3
0 1 NOTE : adj A = CT
2
5 4
2 3 2
adj A 5 0 5
1 1 4
Example 30
1 2 2 15 0 10
Given P 2 10 5 . Find the adjoint of P.
adj P 1 1 1
1 3 3
4 1 6
USER 21
2.4 INVERSE OF 2x2 and 3x3 MATRIX MATHEMATICS UNIT : FET/FIB
MAT 1064
SINGULARITY OF MATRICES
If A 0 ,
If A 0 ,
~ A is a singular matrix
~ A is a non-singular matrix ~ Inverse matrix does not exist
~ Inverse matrix exists
There are 2 methods to obtain inverse of matrices:
(a) Adjoint Method; A-1 = 1 adj A *( Remember! A1 1 )
AA
(b) Using the Property of AB kI
Finding Inverse By Using Adjoint Method
The inverse of a matrix A is denoted by A1 1 adj A , given that A 0 .
A
Inverse of 2 x 2 Matrix
Let A a b , then A1 is given by
c d
A1 1 d b Note A1 1
c A
ad bc a
Example 31
Find the inverse matrix for A 3 1
5 4
4 1
7
A 1 7
5 3
7 7
USER 22
MATHEMATICS UNIT : FET/FIB
MAT 1064
Inverse of 3 x 3 Matrix
Example 32
1 3 2
2 2
Find the inverse matrix of B 0
2 1 0
Determinant B = |B| =
22 02 0 2
1 0
2 1
32 2 0
12 1 3 2 4 4
2 0 = 2 4 5
Cofactor B 1 0 1 2 1 2 2
02 2 2
32
22 13
02
Adjoint B =
2 2 2 1 1 1
1 4 2
B1 2 4 4 2 2 1
5 5
2
2 1
2
If AB I where A and B are square matrices, then B is called the inverse matrix of A and is written as
A1 . Thus AA1 A1A I
Example 33
1 2 3 1 1 1
Given A 2 3 4 and B 10 4
2 . It is known that AB kI , where k is a constant and
1 5 7 7 3 1
I is an 33 matrix. Find k and hence deduce A1 .
1 1 1 1
2 10
A 1 7 4 2
3
1
USER 23
MATHEMATICS UNIT : FET/FIB
MAT 1064
2.5 SYSTEM OF LINEAR EQUATIONS WITH 3 VARIABLES
Using the Inverse Matrix to solve AX = B
If A is a n x n square matrix that has an inverse A-1, X is a variable matrix and B is a known matrix, both
with n rows, then the solution of matrix equations AX = B is given by
X = A-1 B
Proof : A X = B *( 3 x 3 square matrix)
A-1 ( A X ) = A-1 B
( A-1A ) X = A-1B
I X = A-1 B
X = A-1 B
Example 34 A1
Solve the following system of equations by using
the inverse matrix
3x1 x2 2x3 11
3x1 2x2 2x3 10
x1 x3 5 AX=B
A-1 ( A X ) = A-1 B
Convert this to a matrix equation of the form ( A-1A ) X = A-1B
AX = B
I X = A-1 B
X = A-1 B
x1 2 1 2 11
= 1 10
x2 1 0
det A x3 2 1 3 5
T 22 10 10
= 11 10 0
adjA
22 10 15
2
= 1
3
Therefore x1 2, x2 1 and x3 3
adjA
USER 24
MATHEMATICS UNIT : FET/FIB
MAT 1064
Example 35: Example 36:
Solve the following system of equations using
1 3 9 1 3 0 the inverse matrix
Given A = 5 1 1 3
3 B= 2 9x1 4x2 x3 17
x1 2x2 6x3 14
1 3 7 1 0 1 x1 6x2 4
Find AB and A-1. Hence, solve the following linear
equations.
x5y z 7
3x y 3z 5
9x 3y 7z 1
= 1, = 1 and = 1 x1= -2, x2 = 1 and x3 = -3
USER 25
MATHEMATICS UNIT : FET/FIB
MAT 1064
Cramer’s Rule
Step 1 : Find the determinant of Matrix A, A
Step 2 : Replacing the column of A with n x 1 matrix B
a11 a12 a13 x1 b1
a21 b2
a22 a23 x2 =
a31 a32 a33 x3 b3
A X =B
Step 3 : Then the solution is given by
b1 a12 a13 a11 b1 a13 a11 a12 b1
b2 a22 a23 a21 b2 a23 a21 a22 b2
x1 = b3 a23 a33 x2 = b31 b3 a33 x3 = b31 a23 b3
A A A
Example
Solve the following system of linear equations using Cramer’s Rule.
x1 x2 2x3 3
x1 x2 3x3 11
2x1 3x2 x3 9
Solution
First, the system can be expressed into the matrix form as AX = B
Then , find the determinant of A , A
A=
=
=
= 19
USER 26
3 -1 2 MATHEMATICS UNIT : FET/FIB
- 11 1 - 3 MAT 1064
9 31 USER 27
x1 =
19
= 9(3 2) 3(9 22) 1(3 11)
19
= 9 39 8
19
= 38
19
= -2
132
1 - 11 - 3
29 1
x2 =
19
=
=
=3
1 -1 3
1 1 - 11
239
x3 =
19
=
=
=4
So, x1 2 , x2 3 and x3 4
MATHEMATICS UNIT : FET/FIB
MAT 1064
Exercise 1.4
1) A shop sales three types of toys A, B and C. Total price from the sales of 7 units of toys A, 3 unit
of toys B and 4 unit of toys C is RM670. The total price from the sales of 5 unit of toys A, 2 unit
toys B and 3 unit toys C is RM480. The total price from the sales of a unit toy A, 2 unit of toys B
and 3 unit of toys C is RM320.
a. If x, y and z represent the price in RM for every toys A, B and C respectively, determine
a system of linear equation based on the above information.
b. Write down the system of linear equation in matrix form.
c. By using Cramer’s Rule, calculate the price in RM for every toys of A, B and C.
d. If the shop gives 1% discount for every unit of toys C, what is the total price in RM from
the sales of toys C.
2) A machine produces 3 types of biscuits A, B and C . The ingredients for each type of biscuit are
shown in the table below.
Ingredients Types of Biscuit Stock
ABC (grams)
Flour (grams) 734
Sugar (grams) 523 6700
Milk (grams) 123 4800
3200
There is now left a stock 6.7kg of flours, 4.8kg of sugars and 3.2kg of milk. Let x, y and z be
the number of biscuits of type A, B and C produced respectively.
a. Obtain a system of linear equation to represent the above information.
b. Express the system of linear equations in (a) as a matrix equation.
c. Find the number of biscuits A, B and C .
d. If for each type of biscuits, the amount of flour, sugar and milk is increased by 3 grams, 2 grams
and a gram respectively, form a new matrix equation.
USER 28
MATHEMATICS UNIT : FET/FIB
MAT 1064
Ans : 2.
1. a)
7x 3y 4z 670 7 3 4x 6700
a) 5x 2 y 3z 480 b) 5 2 3 y 4800
x 2 y 3z 320 1 2 3 z 3200
7 3 4x 670 A 400units, B 500units
b) 5 2 3 y 480
c)
1 2 3 z 320
C 600units
c) A=RM40 , B=RM50,
C=RM60 10 6 7x 6700
5 y 4800
d) RM594 d) 7 4
2 3 4 z 1200
USER 29