4.0 Matrices

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 55

CHAPTER 4 MATRICES

4.1 Matrices

A matrix is a rectangular array of numbers enclosed in large


brackets
Example:
Read: Matrix A equals 1, 2, 3,
1 2 3 4, 5, 7
Matrix A =
4 5 7

 One matrix (singular)


 Two or more matrices (plural)
CHAPTER 4 MATRICES
4.1a Forming a Matrix

The following are steps to form a matrix from given information.

 Read the information and determine the two groups or categories


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


4.1a Forming a Matrix

Example
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.
Solution
 STEP 1  STEP 3
Categories: The matrix formed is
Types of chocolates – A and B
Types of packing – packets and boxes
8 12
 STEP 2
10 15
Type/packing A B
Packet 8 12
Box 10 15
4.1b Rows, Columns and Order of Matrices
The order of a matrix with m number of rows and n number 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
3 x 2 matrix read as 3 by 2
Row 1 1 1

Row 2 3 9

No of Columns
Row 3 4 0
No of rows
Column 2
Column 1
4.1b Rows, Columns and Order of Matrices
A row matrix is a matrix with only one row
Example:

3 4 7 5 -6 10

1x1 1x2 1x3

Only one row


4.1b Rows, Columns and Order of Matrices
A column matrix is a matrix with only one column
Example:

3 4 5

7 -6

1x1 10

2x1

3x1

Only one column


4.1b Rows, Columns and Order of Matrices
A square matrix has the same number of rows and columns
Example:

-7 4 5 5 3 2

7 8 -6 0 9

1x1 10 13 -4

2x2

3x3

No. of rows = No. of columns


4.1c 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

3x3

5, 3, 2, -6, 0, 9, 10, 13, and -4 are the elements


of the above matrix
4.1c Elements in a Matrix
A matrix of order 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

3x4

2, 4, 7, 5, 6, 0, 9, 1, -3, -5, 8 and 3 are the elements


of the above matrix
4.1c Elements in a Matrix
Each element is defined by its position in the matrix. An element in a row i
and column j in 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


4.2 Equal Matrices

Matrices are equal if they have the same number of rows and the same
number of columns, and if the corresponding elements are equal.
Example:
Matrix A and Matrix B are equal since they have the same order and the
corresponding elements aij and bij are equal.

4 5 4 5
A= B=
7 8 7 8

2x2 2x2
a11 = 4 = b a12 = 5 = b12
11

a21 = 7 = b21 a22 = 8 = b22


A=B
4.2 Equal Matrices

When matrices are equal, elements whose values are unknown can be
determined.
Example:
State the values of the unknowns in the following pairs of equal
matrices.

x+5 -3 7 -3 Solution
= x+5= 7
y 4p 3 12 x= 7-5
x= 2
y= 3
4p = 12
p = 12 ÷ 4
p= 3
4.3 Addition and Subtraction of Matrices
 Matrices can be added and subtracted if they have same order.
 Addition and subtraction of matrices has the same properties as the
addition and subtraction of numbers.
Example:

4 7 11
4+7
+ = =
6 3 6+3 9
4.3 Addition and Subtraction of Matrices
 Matrices can be added and subtracted if they have same order.
 Addition and subtraction of matrices has the same properties as the
addition and subtraction of numbers.
Example:

4 7 4-7 -3
- = =
6 3 6-3 3
4.3 Addition and Subtraction of Matrices
 Matrices can be added and subtracted if they have same order.
 Addition and subtraction of matrices has the same properties as the
addition and subtraction of numbers.
Example:
4 -3 7 1 4+7 -3 + 1
+ =
-6 5 2 9 -6 + 2 5+9

11 -2
=
-4 14
4.3 Addition and Subtraction of Matrices
 Matrices can be added and subtracted if they have same order.
 Addition and subtraction of matrices has the same properties as the
addition and subtraction of numbers.
Example:
4 -3 7 1 4 -7 -3 - 1
- =
-6 5 2 9 -6 - 2 5-9

-3 -4
=
-8 -4
4.4 Multiplication of a 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
If A = , then 2A =
3 4

1 2 2x1 2x2
2A = 2 =
3 4 2x3 2x4

2 4
=
6 8
4.5 Multiplication of Two 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 Table B
Food/ Fried Chicken Food Price
Name Rice Rice (RM)
Fried rice 4.00
Ali 3 1
Chicken 5.00
Ah Sung 2 2 rice
4.5 Multiplication of Two Matrices

Based on the two tables given, we can find the total expenditure that they
spend on dinner is the sum of the products of the amount and the price
for each food as shown below.

Amount x Price + Amount x Price = Total expenditure

Ali 3 x 4 + 1 x 5 = 17
Ah Sung 2 x 4 + 2 x 5 = 18
4.5 Multiplication of Two Matrices

The calculation can also be done by matrix method.

Step 1 Write the information in matrix form

Dinner matrix Price matrix

3 1 4
and
2 2 5
4.5 Multiplication of Two Matrices

Step 2 To find the expenditure, we multiply the matrices as shown below.

Dinner matrix Price matrix Expenditure matrix

3x4 + 1x 5
3 1 4
x =
2 2 5 2x4 + 2x 5

12 + 5
=
8 + 10

17
=
18
4.5 Multiplication of Two Matrices

Two matrices can be multiplied if and only if the number of columns of the
first matrix equals the number of rows of the second matrix.
Example:
A X B = C
MATRIX First Multiplied Second Order of
matrix by matrix 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

No. of columns of first matrix = No. of rows of second matrix


4.5 Multiplication of Two Matrices

The product of two matrices of order 1 x 2 and 2 x 1 is a matrix of order


1 x 1.
2x1
3 4 2 2
= x
5 5
1x2

3 4 =

1x1
4.5 Multiplication of Two Matrices

1. The product of two matrices of order 1 x 2 and 2 x 1 is a matrix of order


1 x 1.
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
= 3x2 + 4x 5
5

= 26
4.5 Multiplication of Two Matrices

The product of two matrices of order 2 x 1 and 1 x 2 is a matrix of order


2 x 2.

3 1x2
1 4 =
x 1 4
2 2x1

3
=
2

2x2
4.5 Multiplication of Two Matrices

1. The product of two matrices of order 2 x 1 and 1 x 2 is a matrix of order


2 x 2.
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 3x1 3x4
1 4 =
2x1 2x4
2

3 12
=
2 8
4.5 Multiplication of Two Matrices

The product of two matrices of order 2 x 2 and 2 x 1 is a matrix of order


2 x 1. 2x1

4
3 1 4
x
=
5
2 2 5
2x2

3 1
=
2 2

2x1
4.5 Multiplication of Two Matrices

1. The product of two matrices of order 2 x 2 and 2 x 1 is a matrix of order


2 x 1.
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:
3x4 + 1x 5
3 1 4
=
2 2 5 2x4 + 2x 5

17
=
18
4.5 Multiplication of Two Matrices

The product of two matrices of order 2 x 2 and 2 x 2 is a matrix of order


2 x 2.

2x2
3 1 4 0
= 4 0
2 -5 8 7 x
8 7
2x2

3 1
=
2 -5

2x2
4.5 Multiplication of Two Matrices

1. The product of two matrices of order 2 x 2 and 2 x 2 is a matrix of order


2 x 2.
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 4 0 3x4+1x8 3x0+1x7
=
8 7 2 x 4 + (-5) x 8 2 x 0 + (-5) x 7
2 -5

20 7
=
-32 -35
4.5 Multiplication of Two Matrices

Solving Matrix Equations


Example:
1 p q 4 7 q-1
=
0 2 -3 2 3p 4

q – 3p 4 + 2p 7 q-1
=
-6 4 3p 4
-6 = 3p 1 Substitute p = -2 into 2
P = (-6) ÷ 3 q – 3p = 7 2
p = -2 q – 3(-2) = 7
q+6=7
q=7–6
q=1
4.6 Identity Matrices

 The product of an identity matrix, I, and any given matrix A of the same
order as I is equal to A.

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 I and is also known as


a unit matrix.

 An identity matrix is a square matrix and there is only one identity


matrix for each order. All diagonal elements (from top left to bottom
right) are equal to 1 and the rest are 0.
4.6 Identity Matrices

Example:
1 0 2 1 1 x 2 + 0 x (-3) 1x1+0x4
=
0 1 -3 4 0 x 2 + 1 x (-3) 0x1+1x4

2 1
=
-3 4

1 0 2 1
is an identity matrix for
0 1 -3 4
4.6 Identity Matrices

Example:
2 1 1 0 2x1+1x0 2x0+1x1
=
-3 4 0 1 -3 x 1 + 4 x 0 -3 x 0 + 4 x 1

2 1
=
-3 4

1 0 2 1
is an identity matrix for
0 1 -3 4
4.7 Inverse Matrices

 If A is a square matrix, B is another square matrix and A x B = B x A = I


then A is the inverse matrix of matrix B and vice versa.
Matrix A is called the inverse matrix of B for multiplication and vice versa.

 The symbol A-1denotes the inverse matrix of A.

 Inverse matrices for multiplication only exist for square matrices but not
all square matrices have an inverse matrix for multiplication

 If AB ≠ I or BA ≠ I, then A is not the inverse of B and B is not the inverse


of A.
4.7 Inverse Matrices

Example:
4 1
Determine whether matrix A =
7 2
2 -1
is an inverse matrix of matrix of matrix B =
-7 4
4.7 Inverse Matrices

Solution :
4 1 2 -1
AB =
7 2 -7 4

4 x 2 + 1 x (-7) 4 x (-1) + 1 x 4
=

7 x 2 + 2 x (-7) 7 x (-1) + 2 x 4

1 0
=
0 1

AB = I
4.7 Inverse Matrices

Solution :
2 -1 4 1
BA =
-7 4 7 2

2 x 4 + (-1) x 7 2 x 1 + (-1) x 2
=

-7 x 4 + 4 x 7 -7 x 1 + 4 x 2

1 0
=
0 1

BA = I AB = BA = I
A is the inverse matrix of B and vice versa
4.7 Inverse Matrices

The inverse of matrix can be found using a formula;

a b
If A = , then
c d

1 d -b
A-1 = where ad – bc ≠ 0
ad - bc -c a

ad – bc is known as the determinant of matrix A.


4.7 Inverse Matrices

Example 1:
4 1
Find the inverse matrix of using the formula
7 2
Solution :
-1
4 1 1 4 -1
=
7 2 4x2–1x7 -7 2

1 2 -1
=
1 -7 4

2 -1
=
-7 4
4.7 Inverse Matrices

Example 2:
4 1
Find the inverse matrix of using the formula
6 2
Solution :
-1
4 1 1 4 -1
=
6 2 4x2–1x6 -6 2

1 2 -1
=
2 -6 4
-1
1
2
=
-3 2
Solving Simultaneous Linear Equations Using
4.8
Matrices

Simultaneous linear equations ax + by = h and cx + dy = k can be written


in the matrix form as follows;

a b x h
=
c d y k

Example 1: 2x – 5y = 7 ; -3x + y = 8 can be written as

2 -5 x 7
=
-3 1 y 8
Solving Simultaneous Linear Equations Using
4.8
Matrices

Example 2: 5c = 1 ; -4c - d = 5 can be written as

5 0 c 1
=
-4 -1 d 5

Example 3: 5p - q = -4 ; -p + 2q = 0 can be written as

5 -1 p -4
=
-1 2 q 0
Solving Simultaneous Linear Equations Using
4.8
Matrices

Example 2: 5c = 1 ; -4c - d = 5 can be written as

5 0 c 1
=
-4 -1 d 5

Example 3: 5p - q = -4 ; -p + 2q = 0 can be written as

5 -1 p -4
=
-1 2 q 0
Solving Simultaneous Linear Equations Using
4.8
Matrices
Matrix equations in the form

a b x h
=
c d y k

can be solved for unknowns x and y as follows

a b
(a) Let A = , and find A-1.
c d

(b) Multiply both sides of the equation by A-1

a b x h
A-1 = A-1
c d y k
Solving Simultaneous Linear Equations Using
4.8
Matrices

x 1 d -b h
(c)
=
y ad - bc -c a k
Solving Simultaneous Linear Equations Using
4.8
Matrices
3 5 x 2
Example : Given that = , find the value of x and y.
-1 -2 y -7

Solution : x 1 -2 -5 2
=
y 3 x (-2) – 5 x (-1) 1 3 -7
-2 x 2 + (-5) x (-7) -31
1
= =
-1 1 x 2 + 3 x (-7) 19

x = -31, y = 19
6  5 1  k 5
Given that matrix P = 
3 
,matrix Q =  
  2 m3 6

1 0
and PQ = 0 1 
 
(a) Find the value of k and m
(b) Using matrices, calculate the value of x and y that
satisfy the following matrix equation:

6  5  x   4 

3    
  2  y   7 
  

1 d -b
A-1 = where ad – bc ≠ 0
ad - bc -c a

ad – bc is known as the determinant of matrix A.

Solution
(a) -1
6  5 1 k 5
  =  
3  2 m 3 6

k = -2 m = 6 x (-2) – (-5) x 3
=3
x d -b h
1
=
y ad - bc-c a k
Solution
6  5  x   4 

3    
  2  y   7 
  

x 4
1 -2 5
=
y 3 -3 6 7

-2 x 4 + 5 x 7 27
1 1
= =
3 (-3) x 4 + 6 x 7 3 30

x = 9, y = 10
(a) k=-2 P1
m = (6 x  2 )  (3 x  5 ) K1

m  3 N1
(b)
x 1 -2 5 4
 K1
y 3 3 6 7
x 9

y 10
x=9 y = 10 N1 N1
(a) k=-2 P1
(6  2)  (3  5) K1
1
m  N0
3
(b)
 x 1 2 5  4 

 y
  33  
   6  7 

 K1

 x  9 

 y
 10 
 N0
   
SPM 2003
3 -2 1 0
M is a 2 x 2 matrix where M = 0
5 -4 1

(a) Find the matrix M.

(b) Write the following simultaneous linear equations as


a matrix equation.

3x – 2y = 7
5x – 4y = 9

Hence, calculate the values of x and y using matrices


SPM 2003
11 ( a)
Answer:
-1
3 -2 1 3 -
-2
= P1
5 -4 3 x (-4) – (-2) x 5 - 5 -4

1 -4 2
=
-2 -5 3

2 -1
=
5 -3 P1
2 2
SPM 2003
3 -2 x 7
= 9
5 -4 y P1

x -1 -4 2 7
= 9
y 2 -5 3 K1

x=5 N1
y=4 N1

You might also like