You are on page 1of 55

CHAPTER 4 MATRICES

Matrices
A matrix is a rectangular array of numbers enclosed in large brackets

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

Matrix A =

 One matrix (singular)  Two or more matrices (plural)

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

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 Categories: Types of chocolates A and B Types of packing packets and boxes  STEP 2 Type/packing Packet Box A 8 10 B 12 15 10 15  STEP 3 The matrix formed is 8 12

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 Row 2 Row 3 1 3 4 1 9 0 No of rows No of Columns

Column 1

Column 2

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

Rows, Columns and Order of Matrices


A column matrix is a matrix with only one column

Example:
3 4 7 1x1 2x1 3x1 Only one column 5 -6 10

Rows, Columns and Order of Matrices


A square matrix has the same number of rows and columns

Example:
-7 4 7 1x1 2x2 3x3 5 8 5 -6 10 3 0 13 2 9 -4

No. of rows = No. of columns

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 -6 10 3 0 13 2 9 -4

3x3 5, 3, 2, -6, 0, 9, 10, 13, and -4 are the elements of the above matrix

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 6 -3 4 0 -5 7 9 8 5 1 3

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

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 6 -3 2 = a11 6 = a21

4 0 -5

7 9 8

5 1 3 7 = a13 9 = a23 5 = a14 1 = a24 3 = a34

4 = a12 0 = a22

-3 = a31 -5 = a32 8 = a33

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 A= 7 8 5 B= 7 8 4 5

2x2 a11 = 4 = b11 a21 = 7 = b21

2x2 a12 = 5 = b12 a22 = 8 = b22

A= B

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 y -3 = 4p 3 12 7 -3

Solution
x+5= x= x= y= 4p = 7 7-5 2 3 12

p = 12 4 p= 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 + 6 7 3 = 4+7 6+3 11 = 9

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 6 7 3 = 4-7 6-3 -3 = 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 -6 -3 5 + 7 2 1 = 9 4+7 -6 + 2 11 = -4 14 -2 -3 + 1 5+9

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 -6 -3 5 7 2 1 = 9 4 -7 -6 - 2 -3 = -8 -4 -4 -3 - 1 5-9

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:
If A = 1 3 1 2A = 2 3 4 2 = 6 8 2 4 2 = 2x1 2x3 4 2x2 2x4

, then 2A =

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 Food/ Name Ali Ah Sung Fried Rice 3 2 Chicken Rice 1 2 Table B Food Price (RM) Fried rice Chicken rice 4.00 5.00

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 Ah Sung 3 x 4 2 x 4

+ +

1 x 5 2 x 5

= 17 = 18

Multiplication of Two Matrices


The calculation can also be done by matrix method. Step 1 Write the information in matrix form Dinner matrix 3 2 1 and 2 5 Price matrix 4

Multiplication of Two Matrices


Step 2 To find the expenditure, we multiply the matrices as shown below. Price matrix 4 x 5 = 2x4 + 2x 5 12 + 5 = 8 + 10 17 = 18 Expenditure matrix 3x4 + 1x 5

Dinner matrix 3 2 1 2

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:
MATRIX ORDER A First matrix 1 x 2 2 x 1 2 x 2 3 x 1 No. of columns of first matrix X Multiplied by x x x x B Second matrix 2 x 1 1 x 2 2 x 2 1 x 3 = C Order of product 1 x 1 2 x 2 2 x 2 3 X 3

= = = =

No. of rows of second matrix

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

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 = 5 = 26 3x2 + 4x 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 2

1x2

4 =
2x1

3 2

2x2

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

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

3 2

1 -5

4 8

0 7

2x2

=
x

4 8
2x2

0 7

3 2

1 = -5

2x2

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

Multiplication of Two Matrices


Solving Matrix Equations

Example:
1 0 p 2 q 3p -6 -6 = 3p P = (-6) 3 p = -2
1

q -3

4 = 2 4 + 2p

7 3p 7 = 3p

q-1 4 q-1 4

Substitute p = -2 into 2 q 3p = 7 2 q 3(-2) = 7 q+6=7 q=76 q=1

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 0 1 2 -3 1 = 4 0 x 2 + 1 x (-3) 2 = -3 1 0 0 1 4 2 is an identity matrix for -3 4 1 1 0x1+1x4 1 x 2 + 0 x (-3) 1x1+0x4

Identity Matrices Example:


2 -3 1 4 1 0 0 = 1 -3 x 1 + 4 x 0 2 = -3 1 0 0 1 4 2 is an identity matrix for -3 4 1 1 -3 x 0 + 4 x 1 2x1+1x0 2x0+1x1

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 Determine whether matrix A = 7 2 2 is an inverse matrix of matrix of matrix B = -7 4 -1 1

4.7

Inverse Matrices

Solution :
4 AB = 7 = 2 -7 4 4 x (-1) + 1 x 4 7 x (-1) + 2 x 4 1 2 -1

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

AB = I

Inverse Matrices Solution :


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

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

BA = I

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

Inverse Matrices
The inverse of matrix can be found using a formula;

a If A = c

b d

, then

A-1 =

1 ad - bc

d -c

-b a

where ad bc 0

ad bc is known as the determinant of matrix A.

Inverse Matrices Example 1:


4 Find the inverse matrix of 7 2 1 using the formula

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

Inverse Matrices Example 2:


4 Find the inverse matrix of 6 2 1 using the formula

Solution :
4 6 1 2 -1 = 4x21x6 1 = 2 1 = -3 -1 2 2 -6 2 -6 1 4 -1 2 -1 4

4.8

Solving Simultaneous Linear Equations Using Matrices

Simultaneous linear equations ax + by = h and cx + dy = k can be written in the matrix form as follows; a c b d x = y k 2x 5y = 7 ; -3x +1y = 8 can be written as 7 = -3 1 y 8 h

Example 1:
2 -5 x

Solving Simultaneous Linear Equations Using Matrices

Example 2:
5 -4 0 -1 c = d

5c = 1 ; -4c - d = 5 can be written as 1 5 5p - q = -4 ; -p + 2q = 0 can be written as -4

Example 3:
5 -1 -1 2 p = q

Solving Simultaneous Linear Equations Using Matrices

Example 2:
5 -4 0 -1 c = d

5c = 1 ; -4c - d = 5 can be written as 1 5 5p - q = -4 ; -p + 2q = 0 can be written as -4

Example 3:
5 -1 -1 2 p = q

4.8

Solving Simultaneous Linear Equations Using Matrices


x = y h k

Matrix equations in the form a c b d

can be solved for unknowns x and y as follows a (a) Let A = c d b , and find A-1.

(b) Multiply both sides of the equation by A-1 a A-1 c d y b x = A-1 k h

Solving Simultaneous Linear Equations Using Matrices

(c)

x = y

1 ad - bc

d -c

-b a

h k

Solving Simultaneous Linear Equations Using Matrices

Example : Given that Solution :


x

3 -1

5 -2

x = y

2 , find the value of x and y. -7

= y =

1
3 x (-2) 5 x (-1)

-2 1

-5

3 -7 -31 = 19

1
-1

-2 x 2 + (-5) x (-7) 1 x 2 + 3 x (-7)

x = -31, y = 19

6 Given that matrix P = 3 1 0 and PQ = 0 1


(a) Find the value of k and m

 5 1 k ,matrix Q =  2 m 3

5 6

(b) Using matrices, calculate the value of x and y that satisfy the following matrix equation:

6 3

 5 x 4 !  2 y 7

A-1 =

1 ad - bc

d -c

-b a

where ad bc 0

ad bc is known as the determinant of matrix A.

Solution (a)

6 3

1 k  5 = 3 m  2

-1

5 6

k = -2

m = 6 x (-2) (-5) x 3 =3

1 = ad - bc -c y Solution
6 3 x = y =

-b h a k

 5 x 4 !  2 y 7 1 3 1 3 x = 9, y = 10 -2 -3 5 6 4 7 1
3

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

27 30

(a)

k=-2 m = (6 x  2 )  (3 x  5 )

P1 K1 N1

m
(b)

! 3 1 ! 3 ! 9 10
y = 10

x y x y

-2 3

5 6

4 7

K1

x=9

N1 N1

(a)

k=-2 (6 v 2)  (3 v 5)

P1 K1 N0

1 m ! 3
(b)

x 1 2 ! y 33 x 9 ! y 10

5 4 6 7

K1 N0

SPM 2003
3 M is a 2 x 2 matrix where M 5 (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 -2 -4 1 = 0 0 1

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

P1

P1

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

K1 N1 N1

You might also like