Upload
juriah-binti-ibrahim
View
217
Download
0
Embed Size (px)
Citation preview
8/3/2019 4.0 Matrices
1/55
CHAPTER 4 MATRICES
Matrices
A matrix is a rectangulararray of numbers enclosed in large
brackets
Example:
Matrix A =
1 2 3
4 5 7
Read:Matrix A equals 1, 2, 3,
4, 5, 7
One matrix (singular)
Two or more matrices (plural)
8/3/2019 4.0 Matrices
2/55
CHAPTER 4 MATRICES
Forming a Matrix
The following are steps to form a matrix from given information.
Read the information and determine the two groups orcategories
in the information provided.
Draw a table using one group of information across from left to right and
the second group down from top to bottom. Fill in the table with the
numerical data.
Write the numerical data within brackets
8/3/2019 4.0 Matrices
3/55
Forming a Matrix
A certain company packs chocolates in packets and boxes. 8 type A and
12 type B chocolates are packed in each packet, while 10 type A and
15 type B chocolates are packed in each box. Form a matrix based on
the given information.
STEP 1
Categories:
Types of chocolates A and B
Types of packing packets and boxes
Example
Solution
STEP 2
Type/packing A B
Packet 8 12
Box 10 15
STEP 3
The matrix formed is
8 12
10 15
8/3/2019 4.0 Matrices
4/55
Rows, Columns and Order ofMatrices
The orderof a matrix with m number of rows and nnumber of columns is
given by an expression m x n (read m x n as m by n).
Example
A matrix of order 3 x 2 has 3 rows and 2 columns
1 1
3 9
4 0
Row 1
Row 2
Row 3
Noofrows
NoofColu
mns
3 x 2 matrix read as 3 by 2
Co
lumn1
Co
lumn2
8/3/2019 4.0 Matrices
5/55
Rows, Columns and Order ofMatrices
A row matrix is a matrix with only one row
Example:
3 4 7 5 -6 10
1 x 1 1 x 31 x 2
Only one row
8/3/2019 4.0 Matrices
6/55
Rows, Columns and Order ofMatrices
A column matrix is a matrix with only one column
Example:
3 4
7
5
-6
101 x 1
3 x 1
2 x 1
Only one column
8/3/2019 4.0 Matrices
7/55
Rows, Columns and Order ofMatrices
A square matrix has the same number of rows and columns
Example:
-7 4 5
7 8
5 3 2
-6 0 9
10 13 -41 x 1
3 x 3
2 x 2
No. of rows = No. of columns
8/3/2019 4.0 Matrices
8/55
Elements in a Matrix
A 3 x 3 matrix has 3 x 3 = 9 elements. The elements of a matrix refer to the
numbers in the matrix.
Example:
5 3 2
-6 0 9
10 13 -4
3 x 3
5, 3, 2, -6, 0, 9, 10, 13, and -4 are the elements
of the above matrix
8/3/2019 4.0 Matrices
9/55
Elements in a Matrix
A matrix oforder m x n has mn elements.
A 3 x 4 matrix has 3 x 4 = 12 elements.
Example:
2 4 7 5
6 0 9 1
-3 -5 8 3
3 x 4
2, 4, 7, 5, 6, 0, 9, 1, -3, -5, 8 and 3 are the elements
of the above matrix
8/3/2019 4.0 Matrices
10/55
Elements in a Matrix
Each element is defined by its position in the matrix. An element in a row i
and columnjin a matrix is represented by aij
Example:2 4 7 5
6 0 9 1
-3 -5 8 3
2 = a11 4 = a12 7 = a13 5 = a14
6 = a21 0 = a22 9 = a23 1 = a24
-3 = a31 -5 = a32 8 = a33 3 = a34
2
2
9
9
8/3/2019 4.0 Matrices
11/55
Equal Matrices
Matrices are equal if they have the same number ofrows and the same
number ofcolumns, and if the corresponding elements are equal.
Example:
4 5
7 8A =
4 5
7 8B =
2 x 2 2 x 2
a11 a12
a21 a22
= 4 = b11 = 5 = b12
= 7 = b21 = 8 = b22
A = B
Matrix A and Matrix B are equal since they have the same order and the
corresponding elements aij and bij are equal.
8/3/2019 4.0 Matrices
12/55
Equal Matrices
When matrices are equal, elements whose values are unknown can be
determined.
Example:
x + 5 -3
y 4p
7 -3
3 12
=
State the values of the unknowns in the following pairs of equal
matrices.
Solution
x + 5 = 7
x = 7 - 5
x = 2
y = 3
4p = 12
p = 12 4
p = 3
x + 5 7
y 34p 12
8/3/2019 4.0 Matrices
13/55
Addition and Subtraction ofMatrices
Matrices can be added and subtracted if they have same order.
Example:
4
6
7
3
=
Addition and subtraction of matrices has the same properties as the
addition and subtraction of numbers.
+
11
9=
4 + 7
6 + 3
8/3/2019 4.0 Matrices
14/55
Addition and Subtraction ofMatrices
Matrices can be added and subtracted if they have same order.
Example:
4
6
7
3
=
Addition and subtraction of matrices has the same properties as the
addition and subtraction of numbers.
-4 - 7
6 - 3
-3
3
=
8/3/2019 4.0 Matrices
15/55
Addition and Subtraction ofMatrices
Matrices can be added and subtracted if they have same order.
Example:
4 -3
-6 5
Addition and subtraction of matrices has the same properties as the
addition and subtraction of numbers.
+7 1
2 9
=
=
4 + 7 -3 + 1
-6 + 2 5 + 9
11 -2
-4 14
8/3/2019 4.0 Matrices
16/55
Addition and Subtraction ofMatrices
Matrices can be added and subtracted if they have same order.
Example:
4 -3
-6 5
Addition and subtraction of matrices has the same properties as the
addition and subtraction of numbers.
-7 1
2 9
=
=
4 -7 -3 - 1
-6 - 2 5 - 9
-3 -4
-8 -4
8/3/2019 4.0 Matrices
17/55
Multiplication ofa Matrix by a Number
When a matrix is multiplied by a number, every element in the matrix is
multiplied by the number.
Example:
1 2
3 4
, then 2A =If A =
1 2
3 42A = 2 =
2 x 1 2 x 2
2 x 3 2 x 4
=
2 4
6 8
8/3/2019 4.0 Matrices
18/55
Multiplication ofTwo Matrices
Multiplication of two matrices is different from scalar multiplication.
Let us look at the following example.
Table A shows the dinner Ali and Ah Sung had for 4 days.
Table B shows the price of each item.
Table A
Food/
Name
Fried
Rice
Chicken
Rice
Ali 3 1
Ah Sung 2 2
Table B
Food Price
(RM)
Fried rice 4.00
Chickenrice
5.00
8/3/2019 4.0 Matrices
19/55
Multiplication ofTwo Matrices
Based on the two tables given, we can find the total expenditure that theyspend on dinner is the sum of the products of the amount and the price
for each food as shown below.
Ali
Ah Sung
Amount x Price Amount x Price+ = Total expenditure3 x 4 +
2 x 4
1 x 5
2 x 5+
=
=
17
18
8/3/2019 4.0 Matrices
20/55
Multiplication ofTwo Matrices
The calculation can also be done by matrix method.
Step 1 Write the information in matrix form
Dinner matrix Price matrix
3 1
2 2
and4
5
8/3/2019 4.0 Matrices
21/55
Multiplication ofTwo Matrices
Step 2 To find the expenditure, we multiply the matrices as shown below.
Dinner matrix Price matrix
3 1
2 2x
4
5=
3 x 4 + 1 x 5
2 x 4 + 2 x 5
Expenditure matrix
=
12 + 5
8 + 10
=
17
18
8/3/2019 4.0 Matrices
22/55
Multiplication ofTwo Matrices
Two matrices can be multiplied if and only if the number ofcolumns of the
first matrix equals the number ofrows of the second matrix.
MATRIX
A
First
matrix
X
Multiplied
by
B
Second
matrix
= C
Order of
product
ORDER 1 x 2 x 2 x 1 = 1 x 1
2 x 1 x 1 x 2 = 2 x 2
2 x 2 x 2 x 2 = 2 x 2
3 x 1 x 1 x 3 = 3 X 3
Example:
No. of columns of first matrix No. of rows of second matrix=
8/3/2019 4.0 Matrices
23/55
Multiplication ofTwo Matrices
The product of two matrices of order1x 2and 2 x1 is a matrix of order1x1.
3 4
2
5
=
x3 4 2
5
=
1 x 1
1 x 2
2 x 1
8/3/2019 4.0 Matrices
24/55
4.5 Multiplication ofTwo Matrices
1. The product of two matrices of order1x 2and 2 x1 is a matrix of order
1x1.
2. Using the multiplication procedure, multiply the elements of the first row
of the first matrix with the elements of each columns of the second
matrix.
Example:
3 4 2
5
=
= 26
3 x 2 + 4 x 5
8/3/2019 4.0 Matrices
25/55
Multiplication ofTwo Matrices
The product of two matrices of order2x 1 and 1 x2is a matrix of order
2x2.
=3
2
1 4x
3
2
1 4 =
2 x 2
2 x 1
1 x 2
8/3/2019 4.0 Matrices
26/55
Multiplication ofTwo Matrices
1. The product of two matrices of order2x 1 and 1 x2is a matrix of order
2x2.
2. Using the multiplication procedure, multiply the elements of the first row
of the first matrix with the elements of each columns of the second
matrix.
3. Repeat the step 2 for other rows of the first matrix.
Example:
=2 x 1 2 x 4
3
2
1 43 x 1
=12
2 8
3
3 x 4
8/3/2019 4.0 Matrices
27/55
4.5 Multiplication ofTwo Matrices
The product of two matrices of order2x 2and 2 x1 is a matrix of order
2x1.
3 1
2 2
4
5 =
3 1
2 2
4
5
=
x
2 x 1
2 x 2
2 x 1
8/3/2019 4.0 Matrices
28/55
4.5 Multiplication ofTwo Matrices
1. The product of two matrices of order2x 2and 2 x1 is a matrix of order
2x1.
2. Using the multiplication procedure, multiply the elements of the first row
of the first matrix with the elements of each columns of the second
matrix.
3. Repeat the step 2 for other rows of the first matrix.
Example:
3 1
2 2
4
5
=
=
17
18
3 x 4 + 1 x 5
2 x 4 + 2 x 5
8/3/2019 4.0 Matrices
29/55
Multiplication ofTwo Matrices
The product of two matrices of order2x 2and 2 x2is a matrix of order2x2.
=3 1
2 -5
4 0
8 7
=
3 1
2 -5
4 0
8 7x
2 x 2
2 x 2
2 x 2
8/3/2019 4.0 Matrices
30/55
Multiplication ofTwo Matrices
1. The product of two matrices of order2x 2and 2 x2is a matrix of order
2x2.
2. Using the multiplication procedure, multiply the elements of the first row
of the first matrix with the elements of each columns of the second
matrix.
3. Repeat the step 2 for other rows of the first matrix.
Example:
=3 x 0 + 1 x 7
2 x 4 + (-5) x 8 2 x 0 + (-5) x 7
3 1
2 -5
3 x 4 + 1 x 8
=-35-32
720
4 0
8 7
8/3/2019 4.0 Matrices
31/55
Multiplication ofTwo Matrices
Example:
=1 p
0 2 43p
q - 17q 4
-3 2
Solving
Matrix Equations
=
43p
q - 17q 3p 4 + 2p
-6 4
-6 = 3p
P = (-6) 3
p = -2
Substitute p = -2 into
q 3p = 7
q 3(-2) = 7
q + 6 = 7
q = 7 6
q = 1
1
22
8/3/2019 4.0 Matrices
32/55
Identity Matrices
The product of an identity matrix, I, and any given matrix A of the sameorder as Iis equaltoA.
I x A = A or A x I = A
IA = AI = A
If and only if and A are of the same order.
An identity matrix is usually denoted by Iand is also known as
a unit matrix.
An identity matrix is a square matrix and there is only one identitymatrix for each order. All diagonal elements (from top left to bottom
right) are equal to 1 and the rest are 0.
8/3/2019 4.0 Matrices
33/55
4.6 Identity Matrices
Example:
=1 0
0 1 0 x 1 + 1 x 40 x 2 + 1 x (-3)
1 x 1 + 0 x 41 x 2 + 0 x (-3)2 1
-3 4
2 1
-3 4
=
1 0
0 1
is an identity matrix for2 1
-3 4
8/3/2019 4.0 Matrices
34/55
Identity Matrices
Example:
=2 1
-3 4 -3 x 0 + 4 x 1-3 x 1 + 4 x 0
2 x 0 + 1 x 12 x 1 + 1 x 01 0
0 1
2 1
-3 4
=
1 0
0 1
is an identity matrix for2 1
-3 4
8/3/2019 4.0 Matrices
35/55
Inverse Matrices
IfA is a square matrix, B is another square matrix andA x B = B x A = IthenA is the inverse matrixof matrix B and vice versa.
MatrixA is called the inverse matrixofB for multiplication and vice versa.
The symbolA-1denotes the inverse matrix ofA.
Inverse matrices for multiplication only exist for square matrices but notall square matrices have an inverse matrix for multiplication
IfAB IorBA I, thenA is not the inverse ofB and B is not the inverse
ofA.
8/3/2019 4.0 Matrices
36/55
4.7 Inverse Matrices
Example:
Determine whether matrix A =4 1
7 2
is an inverse matrix of matrix of matrix B =2 -1
-7 4
8/3/2019 4.0 Matrices
37/55
4.7 Inverse Matrices
Solution :
4 1
7 2
2 -1
-7 4AB =
=
7 x (-1) + 2 x 47 x 2 + 2 x (-7)
4 x (-1) + 1 x 44 x 2 + 1 x (-7)
1 0
0 1
=
AB = I
8/3/2019 4.0 Matrices
38/55
Inverse Matrices
Solution :
4 1
7 2
2 -1
-7 4
BA =
=
-7 x 1 + 4 x 2-7 x 4 + 4 x 7
2 x 1 + (-1) x 22 x 4 + (-1) x 7
1 0
0 1
=
BA = IAB = BA = I
A is the inverse matrix of B and vice versa
8/3/2019 4.0 Matrices
39/55
Inverse Matrices
a b
c d
If A =
The inverse of matrix can be found using a formula;
, then
A-1 =1 d -b
-c aad - bc
where ad bc 0
ad bc is known as the determinant of matrix A.
8/3/2019 4.0 Matrices
40/55
Inverse Matrices
Example 1:
Find the inverse matrix of4 1
7 2
using the formula
Solution :
4 1
7 2
-1
=1
4 x 2 1 x 7 2
4
7
1-
-
1
1 4
2
7
1-
-=
4
2
7
1-
-
=
8/3/2019 4.0 Matrices
41/55
Inverse Matrices
Example 2:
Find the inverse matrix of4 1
6 2
using the formula
Solution :
4 1
6 2
-1
=1
4 x 2 1 x 6 2
4
6
1-
-
1
2 4
2
6
1-
-=
2
1
-3
-1
2=
8/3/2019 4.0 Matrices
42/55
4.8Solving Simultaneous Linear Equations Using
Matrices
Simultaneous linear equations ax + by = h and cx + dy = k can be writtenin the matrix form as follows;
a b
c d
x
y=
h
k
Example 1: 2x 5y = 7 ; -3x + y = 8 can be written as
2 -5
-3 1=
x
y
7
8
1
8/3/2019 4.0 Matrices
43/55
Solving Simultaneous Linear Equations Using
Matrices
Example 2: 5c = 1 ; -4c - d = 5 can be written as
5 0
-4 -1
=
c
d
1
5
Example 3: 5p - q = -4 ; -p + 2q = 0 can be written as
5 -1
-1 2=
p
q
-4
0
8/3/2019 4.0 Matrices
44/55
Solving Simultaneous Linear Equations Using
Matrices
Example 2: 5c = 1 ; -4c - d = 5 can be written as
5 0
-4 -1
=
c
d
1
5
Example 3: 5p - q = -4 ; -p + 2q = 0 can be written as
5 -1
-1 2=
p
q
-4
0
8/3/2019 4.0 Matrices
45/55
4.8Solving Simultaneous Linear Equations Using
Matrices
a b
c d
x
y=
h
k
Matrix equations in the form
can be solved for unknowns x and y as follows
(a) Leta b
c d
A = , and find A-1.
(b)Multiply both sides of the equation by A-1
a b
c d
x
y=
h
kA-1 A-1
8/3/2019 4.0 Matrices
46/55
Solving Simultaneous Linear Equations Using
Matrices
x
y
h
k
(c) 1d -b
-c aad - bc=
8/3/2019 4.0 Matrices
47/55
Solving Simultaneous Linear Equations Using
Matrices
Example :Given that3 5
-1 -2
x
y=
2
-7
, find the value of x and y.
Solution : x
y
2
-7
1 -2 -5
1 33 x (-2) 5 x (-1)=
1
-1=
-2 x 2 + (-5) x (-7)
1 x 2 + 3 x (-7)=
-31
19
x = -31, y = 19
8/3/2019 4.0 Matrices
48/55
Given that matrix P =
23
56,matrix Q =
63
51 k
m
and PQ =
10
01
(a) Find the value of k and m
(b) Using matrices, calculate the value of x and y thatsatisfy the following matrix equation:
!
7
4
23
56
y
x
8/3/2019 4.0 Matrices
49/55
Solution
(a) -1
=
63
51 k
m
23
56
k = -2 m = 6 x (-2) (-5) x 3
= 3
A-1 =1 d -b
-c aad - bcwhere ad bc 0
ad bc is known as the determinant of matrix A.
8/3/2019 4.0 Matrices
50/55
Solution
x
y
h
k
1d -b
-c aad - bc
=
!
7
4
23
56
y
x
x
y
4
7
1-2 5
-3 6
3=
1
3=
-2 x 4 +5 x 7
(-3) x 4+6 x 7=
27
30
x = 9, y = 10
1
3
8/3/2019 4.0 Matrices
51/55
(a) P1
K1
k = - 2
N1
(b)
N1
K1
3
)53()26(
!
m
!
7
4
63
5-2
3
1
y
x
!
10
9
y
x
x = 9 y = 10
N1
m = x x
8/3/2019 4.0 Matrices
52/55
(a) P1
K1
k = - 2
N03
1
)53()26(
!
vv
m
(b)
!
7
4
63
52
3
1
y
x
!
10
9
y
x
N0
K1
8/3/2019 4.0 Matrices
53/55
SPM 2003
M is a 2 x 2 matrix where M 3 -25 -4 = 1 00 1
(a) Find the matrix M.
(b) Write the following simultaneous linear equations as
a matrix equation.
3x 2y = 7
5x4y = 9
Hence, calculate the values ofx and y using matrices
8/3/2019 4.0 Matrices
54/55
Answer:
3 -2
5 -4
-1
=
1
3 x (-4) (-2) x 5 -4
3
5
-2-
-
1
-2 3
-4
-5
2
=
-3
2
2
5
2
-1=
11 ( a)
SPM 2003
P1
P1
8/3/2019 4.0 Matrices
55/55
3-4-2
5
=-1
2
-4
3
2
-5
xy
=7
9
xy
7
9
x = 5
y = 4
P1
K1
N1
N1
SPM 2003