Matrices PowerPoint

Download Report

Transcript Matrices PowerPoint

GENERAL MATHS – UNIT ONE MATRICES
INTRODUCTION TO MATRICES
 A Matrix is an “array” of numbers, arranged in rows and columns.
 The numbers in the matrix are called the elements of the matrix.
COLUMNS
ROWS
ORDER OF A MATRIX
We label the order of a matrix by counting how
many rows and columns it has, writing it as:
COLUMNS
(number of rows x number of columns)
ROWS
 We say the order of this matrix is (3 x 2)
as it has 3 rows and 2 columns.
 The order of the second matrix is (2 x 3)
as it has 2 rows and 3 columns
ORDER OF A MATRIX
eg1. State the order of the matrix:
(number of rows x number of columns)
(3 x 1)
ORDER OF A MATRIX
eg2. State the order of the matrix:
(number of rows x number of columns)
2
9
−5 4
0 0
(2 x 3)
ORDER OF A MATRIX
eg3. State the order of the matrix:
(number of rows x number of columns)
2
0.5
−3
0
8 −10
6
3
20
(3 x 3)
POSITION OF AN ELEMENT IN THE MATRIX
The position of elements of matrix A can be written as
𝑎 𝑖, 𝑗
where 𝑖 refers to the row position and 𝑗 refers to the column position.
FORMING MATRICES
The table represents the number of participants in a dance competition over
a weekend. Represent this information using a matrix.
R
T
C
Sat
Sun
9
12
16
13
8
14
POSITION OF AN ELEMENT IN THE MATRIX
Similarly, the elements of matrix B can be written as
𝑏𝑖,𝑗
where 𝑖 refers to the row position and 𝑗 refers to the column position.
What number is at position
b1,3
What number is at position b2,2
3
-2
What number is at position b3,2 Does not exist
NETWORKS USING MATRICES
Matrices can be used to display information about various types of networks,
like road/travel systems etc…
eg1. The following diagram gives the roads going in/out of towns A, B, C, D
Draw a matrix representing the number of roads between each town
FROM
A
B
C
D
TO
A B C
0 1 2
1 0 0
2 0 0
0 1 3
D
0
1
3
0
NETWORKS USING MATRICES
Eg2. AirAus offers flights between 3 cities: Hobart (H), Devonport (D) and
Launceston (L). The cost for each flight is represented in the matrix below.
a) How much does it cost to get from Devonport to Hobart?
$207
b) How much does it cost to get from Hobart to Launceston?
$160
c) Explain why there are 0’s running
diagonally through the matrix
Cannot fly from a city to the same city
SPECIAL MATRICES –
IDENTITY MATRIX
An identity matrix, I, is a square matrix in which all elements on the diagonal
line from top left to bottom right are one’s and all other elements are zero.
This acts like a number 1, but in matrix form.
1 0
0 1
1 0
0 1
0 0
0
0
1
SPECIAL MATRICES –
THE ZERO MATRIX
An zero matrix, 0, is a square matrix in which all elements are zero’s.
This acts like a number 0, but in matrix form.
0 0
0 0
0 0
0 0
0 0
0
0
0
NOW TRY EXERCISE 4.2
Q1,2,3,4,5,7,8,9,11,12,13,15,16,19
OPERATIONS WITH MATRICES –
ADDITION & SUBTRACTION
As long as Matrices are of the same order (that means the same size row x
column), we can add or subtract them from each other easily.
1
Eg. If A =
2
5
6
A+B=
1
2
5
6
A–B=
1 5
2 6
3
1
and B =
+
3 0
1 4
-
3 0
1 4
=
=
0
4
1+3
2+1
1−3
2−1
Find A+B
5+0
6+4
5−0
6−4
=
=
and A-B
4
3
5
10
−2
1
5
2
OPERATIONS WITH MATRICES –
ADDITION & SUBTRACTION USING YOUR CALCULATOR
If A =
1 5
2 6
and B =
3 0
1 4
A+B=
1
2
5
6
+
3 0
1 4
=
A–B=
1
2
5
6
-
3 0
1 4
=
Find A+B
1+3
2+1
1−3
2−1
5+0
6+4
5−0
6−4
and A-B
=
=
4
3
5
10
−2
1
5
2
OPERATIONS WITH MATRICES –
ADDITION, SUBTRACTION AND SOLVING UNKNOWNS
Eg2. Consider the matrices
4
1 𝑥
C=
D=
1
6 10
2
𝑦
5 9
If C+D =
, find the value of 𝑥 and 𝑦
7 13
C+D=
1
6
𝑥+2=9
∴𝑥=7
𝑥
10
+
4
1
2
𝑦
=
10 + 𝑦 = 13
∴𝑦=3
1+4
6+1
𝑥+2
10 + 𝑦
=
5
7
9
13
OPERATIONS WITH MATRICES –
ADDITION, SUBTRACTION AND SOLVING UNKNOWNS
Eg3. Consider the matrices
𝑦
6 12
E=
F=
6 𝑥
−2
1
If E - F =
8
E-F=
6
6
12
𝑥
6−𝑦 =1
∴𝑦=5
2
7
10
, find the value of 𝑥 and 𝑦
5
-
𝑦
−2
2
7
=
𝑥−7=5
∴ 𝑥 = 12
6−𝑦
6 − −2
12 − 2
𝑥−7
=
1
8
10
5
NOW TRY EXERCISE 4.3
QUESTIONS 1 – 11, 14, 15
MATRIX MULTIPLICATION – SCALAR MULTIPLICATION
We can multiply a matrix by a number (scalar) as shown below:
Eg1.
1
If A =
2
5
6
and B =
1 5
2A = 2
2 6
=
1 × 2
2 × 2
3 0
1 4
=
3×3
1×3
3B = 3
3
1
5 × 2
6 × 2
0×3
4×3
0
4
Find 2A and 3B
2
4
=
=
9
3
10
12
0
12
MULTIPLYING MATRICES –
THE PRODUCT MATRIX AND ITS ORDER
We cannot always multiply two matrices together.
To decide if it’s possible we need to look at the order of each matrix.
Eg1: State the order of these matrices,
A
B
then decide if the product matrix AB exists
A=
2 5
0 4
1 3
B=
1 2 6
3 4 0
8 2 1
So the product matrix AB does not exist as the
number of columns in A ≠ number of rows in B
(3 x 2)
(3 x 3)
To multiply together, these
numbers must be the same
MULTIPLYING MATRICES –
THE PRODUCT MATRIX AND ITS ORDER
We cannot always multiply two matrices together.
To decide if it’s possible we need to look at the order of each matrix.
Eg2: State the order of these matrices,
B
A
then decide if the product matrix BA exists
A=
2 5
0 4
1 3
B=
1 2 6
3 4 0
8 2 1
So the product matrix BA does exist as the
number of columns in B = number of rows in A
(3 x 3)
(3 x 2)
To multiply together, these
numbers must be the same
MULTIPLYING MATRICES
THE PRODUCT MATRIX AND ITS ORDER
These numbers give us the
order of the new matrix that
we get from the multiplication
Eg3. Does the product matrix CD exist?
State the order of the resulting matrix.
C=
1 0
0 3
6
D=
2
So the new
matrix will
have order
(2 x 4)
1
3
2
2 6 1
4 0 2
2 1 4
They are! So we can
multiply them together
C
(2 x 3)
D
(3 x 4)
These numbers
must be the same
MULTIPLYING MATRICES
1
0
0 6
3 2
X
1 2 6 1
3 4 0 2
2 2 1 4
=
To find m1,1 we multiply the 1st row of A by the 1st column of B.
We run along the 1st row of A and dive along the 1st column of B – this is
called the
run and dive method.
MULTIPLYING MATRICES
1 0 6
0 3 2
m
1,1
X
1
3
2
2 6 1
4 0 2
2 1 4
= (1 X 1) + (0 X 3) + (6 X 2)
= 1 + 0 + 12
= 13
=
13
MULTIPLYING MATRICES
1
0
m
1,2
0 6
3 2
X
1 2 6 1
3 4 0 2
2 2 1 4
= (1 X 2) + (0 X 4) + (6 X 2)
= 2 + 0 + 12
= 14
=
13 14
MULTIPLYING MATRICES
1 0 6
0 3 2
m
1,3
X
1
3
2
2 6 1
4 0 2
2 1 4
= (1 X 6) + (0 X 0) + (6 X 1)
=6+0+6
= 12
=
13
14 12
MULTIPLYING MATRICES
1 0 6
0 3 2
m
1,4
X
1
3
2
2 6 1
4 0 2
2 1 4
= (1 X 1) + (0 X 2) + (6 X 4)
= 1 + 0 + 24
= 25
=
13
14
12
25
MULTIPLYING MATRICES
1
0
m
2,1
0 6
3 2
X
1 2 6 1
3 4 0 2
2 2 1 4
= (0 X 1) + (3 X 3) + (2 X 2)
=0+9+4
= 13
=
13
13
14
12
25
MULTIPLYING MATRICES
1
0
m
2,2
0 6
3 2
X
1 2 6 1
3 4 0 2
2 2 1 4
= (0 X 2) + (3 X 4) + (2 X 2)
= 0 + 12 + 4
= 16
=
13
13
14
16
12
25
MULTIPLYING MATRICES
1
0
m
2,3
0 6
3 2
X
1 2 6 1
3 4 0 2
2 2 1 4
= (0 X 6) + (3 X 0) + (2 X 1)
=0+0+2
=2
=
13
13
14
16
12
2
25
MULTIPLYING MATRICES
1
0
m
2,3
0 6
3 2
X
1 2 6 1
3 4 0 2
2 2 1 4
= (0 X 1) + (3 X 2) + (2 X 4)
=0+6+8
= 14
=
13
13
14
16
12
2
25
14
MULTIPLYING MATRICES
We must take care when solving matrix multiplication problems.
Remember to ensure you’re calculating what the question is asking you to calculate.
For most cases, if we have two matrices A and B and we are asked to find AB, this
is not the same as BA.
Matrix A =
1
AB =
0
6
BA =
1
2
4
3
0
1 2
0 4
Matrix B =
6 3
8 3
=
1 0
4 0
1 2
6 24
=
0 4
1 2
6 3
1 0
Prove it!
Find AB, then
Find BA
𝐴𝐵 ≠ 𝐵𝐴
We say the matrices are not commutative
IDENTITY MATRIX
(2 x 2), (3 x 3) etc. matrices are called a Square Matrix.
Some square matrices behaves just like the number 1, when the matrix is made up of only
0’s and 1’s where the 1’s run in a diagonal line from position 1,1.
(2 x 2)
(3 x 3)
1 0
0 1
1 0 0
0 1 0
0 0 1
1
0
0
0
(4 x 4)
0 0 0
1 0 0
0 1 0
0 0 1
MULTIPLYING MATRICES - IDENTITY MATRIX
If we multiply the identity matrix by any other regular matrix, say Matrix A, the
same rules for multiplying other matrices together does not apply. So,
AI = IA = A
So what this means is that the order that we multiply these in doesn’t matter –
the answer will be the same regardless, because the Identity Matrix behaves as
the number 1.
Because of this, the product of the two matrices is simply the matrix A.
MULTIPLYING MATRICES – IDENTITY MATRIX
Let’s prove it….. Using the matrices below, Solve the following:
1 2
A=
0 4
i) AI
1
0
1
=
0
=
6 3
B=
1 0
ii) IA
2
4
2
4
1
0
0
1
1 0
0 1
1 2
=
0 4
=
iii) BI
1 2
0 4
6 3 1 0
1 0 0 1
6 3
=
1 0
=
iv) IB
1
0
6
=
1
=
0 6 3
1 1 0
3
0
MULTIPLYING MATRICES – IDENTITY MATRIX
Raising the identity matrix to the power of any number, will give an answer of the
identity matrix.
1
I=
0
This can be also be seen
by solving the problem
with the calculator
0
1
Solve:
i) 𝐼2
1
=
0
1
=
0
ii) 𝐼0.5
0
1
0
1
2
1 0
=
0 1
1
=
0
0
1
0.5
NOW TRY EX4.4
Q1, 3-12, 14, 15, 18, 19, 21
FINDING THE INVERSE – STEP ONE: THE DETERMINANT
Consider:
𝑎
A=
𝑐
𝑏
𝑑
We can find a special factor called the determinant using the rule:
det A = ad − bc
3 2
eg: Find the determinant of Matrix B =
1 4
solution:
det B = ad – bc = (3 x 4) – (2 x 1) = 12 – 2 = 10
FINDING THE DETERMINANT
𝑎
A=
𝑐
𝑏
𝑑
det A = ad − bc
Using this ‘formula’, find the determinant of these matrices
2 2
𝐴=
−1 4
det A =
3 2
𝐵=
−1 2
det B =
4 −3
𝐶=
−1 1
det C =
= (2 x 4) – (2 x -1)
= (3 x 2) – (2 x -1)
= (4 x 1) – (-3 x -1)
= 8 + 2 = 10
=6+2 =8
=4–3=1
FINDING THE INVERSE
A=
𝑎
𝑐
𝑏
𝑑
A-1
=
The Determinant, detA
1
(𝑎𝑑−𝑏𝑐)
=
1
det 𝐴
𝑑
−𝑐
𝑑
−𝑐
−𝑏
𝑎
−𝑏
𝑎
Note: Only Square Matrices have inverses
For this subject we only work with inverses of 2 x 2 matrices
FINDING THE INVERSE
𝑎
A=
𝑐
𝑏
𝑑
A-1
=
1
Find the inverse of Matrix A =
1
A-1
=
1
2
4 −2
−1 1
𝑑
−𝑐
1
(𝑎𝑑−𝑏𝑐)
−𝑏
𝑎
2
4
4/2 −2/2
2
−1
=
=
−1/2 1/2
−0.5 0.5
FINDING THE INVERSE
𝑎
A=
𝑐
𝑏
𝑑
A-1
=
1
(𝑎𝑑−𝑏𝑐)
𝑑
−𝑐
−𝑏
𝑎
Use the formula to find the inverse of:
5
𝐴=
4
=
1
1
1
1
1 −1
−4 5
1 −1
=
−4 5
3 4
𝐵=
1 2
=
1
2
2
−1
−4
3
1
−2
=
−0.5 1.5
6 −3
𝐶=
−1 1
=
1
3
1 3
1 6
1/3
=
1/3
1
2
SINGULAR MATRIX
For some Matrices, an inverse doesn’t exist.
This is due to the determinant equalling zero.
6 3
eg. Find the inverse of Matrix B =
2 1
=
1
(6−6)
1
−2
−3
6
=
1
0
6
2
3
1
Since this is undefined,
an inverse does not exist
WHAT IS THE INVERSE?
If you have a matrix B, its inverse is called B-1
By definition, a matrix and its inverse multiply to give I
B
−1
.B
=
1 0
0 1
WHAT IS THE INVERSE?
Proof:
𝟐
A=
𝟏
𝟒
𝟑
A-1
=
𝟏
𝟐
𝟑 −𝟒
−𝟏 𝟐
𝐴−1 .A
Find
3 −4
−1 2
=
1
2
=
1 0
0 1
2 4
1 3
MULTIPLICATIVE INVERSES
This means……
If the product matrix is the identity matrix, then one of the matrices is the
multiplicative inverse of the other.
Eg. Is B the multiplicative inverse of A?
𝟐 𝟓
𝟑 −𝟓
A=
B=
𝟏 𝟑
−𝟏 𝟐
Multiply together – if the solution is the identity matrix then
they are the inverse of each other.
NOW TRY EXERCISE 4.5
Q1, 2, 3, 4, 18, 25
SOLVING PROBLEMS USING THE INVERSE
Matrix equations of the type
the inverse.
AX = B
and
XA = B
can be solved by using
They can be treated like a linear equation where we solve ‘x’
eg: 5𝑥 = 12
How would we solve this?
Divide both sides of the equation by 5 ( or multiply by
1
5
ie. 5−1 )
Similarly, to solve AX = B or XA = B, we multiply both sides of the equation by A-1
Since the order we multiply matrices in is very important, we must be careful in which
position we multiply by the inverse.
SOLVING PROBLEMS USING THE INVERSE
Given: AX = B
Given: XA = B
AX = B
XA = B
(Pre-multiply by A-1)
A-1AX = A-1B (Since A-1A = I)
X=
A-1B
AX = B, solve using
X = A-1B
(Post-multiply by A-1)
XAA-1 = BA-1 (Since AA-1 = I)
X = BA-1
XA = B, solve using
X = BA-1
3
eg. Given A =
1
5
2
𝐵=
4 2
0 1
Find X if:
AX = B
1. Which rule to use?
2. Find A-1:
=
=
1
(3×2)−(5×1)
1
6−5
2
−1
−5
3
So:
X = A-1B
2 −5
−1 3
A-1 =
2
−1
−5
3
𝟐
X=
−𝟏
−𝟓
𝟑
𝟖
X=
−𝟒
−𝟏
𝟏
3. Sub Matrix B and Matrix A-1 into the equation X = A-1B and solve
𝟒
𝟎
𝟐
𝟏
1
You try: Given A =
0
6
2
𝐵=
Find X if:
XA = B
1. Which rule to use?
2. Find A-1:
=
=
1
(1×2)−(6×0)
1
2
2 −6
0 1
2
0
3 4
−1 2
So:
X = BA-1
−6
1
A-1
1
=
0
−3
0.5
𝟑
X=
−𝟏
𝟒
𝟐
𝟑
X=
−𝟏
−𝟕
𝟒
3. Sub Matrix B and Matrix A-1 into the equation X = BA-1 and solve
𝟏
𝟎
−𝟑
𝟎. 𝟓
SOLVING PROBLEMS USING THE INVERSE
Using the same method, we are asked to solve for x and y
1. Which rule to use?
2. Find A-1
=
1
(3×4)−(5×2)
4 −5
−2 3
=
1
2
3 −5
−2 4
3. Sub Matrix A-1 and Matrix B into the
equation X = A-1B and solve
𝟑 𝟓
𝟐 𝟒
A
𝒙
𝒚 =
X
𝟑
𝟏
= B
X = A-1B
1 4 −5
𝑥
𝑦 = 2 −2 3
1 12 − 5
=
2 −6 + 3
1 7
=
2 −3
3.5
=
−1.5
3
1
SOLVING PROBLEMS USING THE INVERSE
Using the same method, we are asked to solve for x and y
1. Which rule to use?
2. Find A-1
=
1
(2×4)−(4×1)
4 −4
−1 2
=
1
4
4 −4
−1 2
3. Sub Matrix A-1 and Matrix B into the
equation X = A-1B and solve
𝟐 𝟒
𝟏 𝟒
A
𝒙
𝒚 =
X
=
𝟑
𝟏
B
X = A-1B
1 4 −4
𝑥
𝑦 = 4 −1 2
1 12 − 4
=
4 −3 + 2
1 8
=
4 −1
2
=
−0.25
3
1
NOW TRY EXERCISE 4.5
Q5, 6, 15, 16, 21, 26
SOLVING SIMULTANEOUS EQUATIONS USING MATRICES
Consider simultaneous equations in the form:
𝑎𝑥 + 𝑏𝑦 = 𝑒
𝑐𝑥 + 𝑑𝑦 = 𝑓
We can express these as a matrix equation in the form 𝐴𝑋 = 𝐵
𝑎
𝑐
We call this matrix the
‘coefficient matrix’
𝑏
𝑑
𝑥
𝑒
𝑦 = 𝑓
Solve the following simultaneous equations using Matrix Methods.
2𝑥 + 𝑦 = 11
3𝑥 + 4𝑦 = 19
𝑎𝑥 + 𝑏𝑦 = 𝑒
𝑐𝑥 + 𝑑𝑦 = 𝑓
𝑎
𝑐
𝑏
𝑑
𝑥
𝑒
𝑦 = 𝑓
1. Using the highlighted formulas, Write the equations in matrix form 𝐴𝑋 = 𝐵
2 1 𝑥
11
2𝑥 + 1𝑦 = 11
becomes
=
𝑦
3 4
19
3𝑥 + 4𝑦 = 19
2. We want to get Matrix X alone to solve for 𝑥 and 𝑦, so find the rule to use.
3. Find the inverse of A:
𝐴−1
=
1
2×4 −(1×3)
4. Substitute 𝐴−1 & 𝐵 into X = A-1B, then solve.
4
−3
−1
=
2
1
5
4
−3
−1
2
SOLVING SIMULTANEOUS EQUATIONS USING MATRICES
4. Substitute 𝐴−1 & 𝐵 into 𝑋 = 𝐴−1 𝐵, then
solve.
X = 𝐴−1 𝐵
=
1
5
4 −1
−3 2
=
1
5
44 − 19
−33 + 38
=
1
5
25
5
𝑥
5
So, X = 𝑦 =
1
11
19
5. Write the answers:
𝑥=5
𝑦=1
SOLVING SIMULTANEOUS EQUATIONS USING MATRICES
1. Write as matrices in the form AX=B, using:
You try. Solve for x & y:
3𝑥 + 3𝑦 = 15
4𝑥 + 2𝑦 = 12
3
4
𝑎𝑥 + 𝑏𝑦 = 𝑒
𝑐𝑥 + 𝑑𝑦 = 𝑓
3
2
𝑥
15
𝑦 = 12
𝑒
𝑎 𝑏 𝑥
= 𝑓
𝑦
𝑐 𝑑
2. Rearrange to get X by itself to solve the equation, using:
𝑋 = 𝐴−1 𝐵
3. Find 𝐴−1 , using:
𝐴−1 =
1
3×2 −(3×4)
2
−4
−3
3
=
1
−6
2
−4
−3
3
4. Substitute 𝐴−1 𝑎𝑛𝑑 𝐵 into 𝑋 = 𝐴−1 𝐵:
1
1
1
30 − 36
2 −3
−6
1
15
𝑋=
=
=
=
−6 −4
−6 −60 + 36
−6 −24
3
4
12
5. Use solution to answer original question:
𝑥=1
𝑦=4
NOW TRY EXERCISE 4.5
Q 7, 8, 9, 10, 17, 23
ADJACENCY MATRICES
Matrices can be used to determine the number of different connections
between objects, such as towns or people, sporting outcomes etc.
To determine the number of connections between objects, a matrix
known as an adjacency matrix is set up to represent these connections.
ADJACENCY MATRICES
Eg. Roads directly connecting 5 towns together can be shown in the diagram
below. Create an adjacency matrix to represent this information.
ADJACENCY MATRICES
DETERMINING THE NUMBER OF CONNECTIONS BETWEEN OBJECTS
An adjacency matrix allows us to determine the number of connections either
directly between or via objects.
If a direct connection between two objects is denoted as one ‘step’,
‘two steps’ means a connection between two objects via a third object,
Eg. How many ways can a person can travel between towns A and D via
one other town (in 2 steps)?
=3
ADJACENCY MATRICES
DETERMINING THE NUMBER OF CONNECTIONS BETWEEN OBJECTS
Eg (cont). How many ways can a person can travel
between towns A and D via one other town (in 2 steps)?
2
NOW TRY EXERCISE 4.5
Q 11, 12, 19, 20
TRANSITION MATRICES AND MARKOV SYSTEMS
A Markov system (or chain) is a system that investigates estimating the occurrence of
events. It investigates the likelihood of events occurring in the future.
Eg. The school canteen sells two options for lunch – Bread Roll or a Pastry.
80% of students who buy a Bread Roll today will buy a bread roll tomorrow.
20% of students who buy a Bread Roll today will buy a pastry tomorrow.
70% of students who buy a Pastry today will buy a Pastry tomorrow.
30% of students who buy a Pastry today will buy a Bread Roll tomorrow.
A) Represent this data in a transition table.
B) Represent this data in a transition diagram.
C) Represent this data as a transition matrix.
Eg. The school canteen sells two options for lunch – Bread Roll or a Pastry.
80% of students who buy a Bread Roll today will buy a bread roll tomorrow.
20% of students who buy a Bread Roll today will buy a pastry tomorrow.
70% of students who buy a Pastry today will buy a Pastry tomorrow.
30% of students who buy a Pastry today will buy a Bread Roll tomorrow.
A) Represent this data as a transition table.
B) Represent this data as a transition diagram.
FROM
Pastry
Bread Roll
0.8
0.3
Pastry
0.2
0.7
TO
Bread Roll
C) Represent as a Transition Matrix
T=
0.8 0.3
0.2 0.7
Eg. The school canteen sells two options for drinks – Soft Drink or a Juice.
60% of students who buy a Soft Drink today will buy a Soft Drink tomorrow.
40% of students who buy a Soft Drink today will buy a Juice tomorrow.
75% of students who buy a Juice today will buy a Juice tomorrow.
??? % of students who buy a Juice today will buy a Soft Drink tomorrow.
A) Represent this data as a Transition table.
B) Represent this data as a Transition diagram.
FROM
Juice
Soft Drink
0.6
0.25
Juice
0.4
0.75
TO
Soft Drink
C) Represent as a Transition Matrix
T=
0.6 0.25
0.4 0.75
APPLYING THE TRANSITION MATRIX TO MAKE PREDICTIONS
Using a set of initial information about a situation, we can use matrices to forecast future
events with regard to Food Choice, Restaurant Choice, Weather etc..
Eg. The school canteen sells two options for lunch – Bread Roll or a Pastry.
80% of students who buy a Bread Roll today will buy a Bread Roll tomorrow.
20% of students who buy a Bread Roll today will buy a Pastry tomorrow.
70% of students who buy a Pastry today will buy a Pastry tomorrow.
T=
0.8
0.2
30% of students who buy a Pastry today will buy a Bread Roll tomorrow.
We can use a set of formula to predict what lunches will be ordered ‘n’ days from now.
All we need to know is T (the transition matrix) and how many ordered which lunch initially.
0.3
0.7
EXAMPLE ONE
The lunch orders of Bread Rolls and Pastries, are given by the following
Transition Table, where initially 100 students buy Rolls &100 students buy a Pastry
Transistion Matrix:
𝑇=
0.8 0.3
0.2 0.7
We say the initial state is 𝑆0 =
100
100
𝑤ℎ𝑒𝑟𝑒 𝑡ℎ𝑖𝑠 𝑖𝑠 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑏𝑟𝑒𝑎𝑑 𝑟𝑜𝑙𝑙𝑠 𝑠𝑜𝑙𝑑
𝑤ℎ𝑒𝑟𝑒 𝑡ℎ𝑖𝑠 𝑖𝑠 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑝𝑎𝑠𝑡𝑟𝑖𝑒𝑠 𝑠𝑜𝑙𝑑
We can now predict each day’s order using
𝑆𝑛 = 𝑇 𝑛 × 𝑆0
So after 1 one stage (day), how what amounts will be sold tomorrow? 𝑆1 = 𝑇 1 × 𝑆0
0.8 0.3 1 100
=
=
0.2 0.7 100
So tomorrow’s canteen will sell 110 Bread Rolls and 90 Pastries.
What is the totals when orders reach stability or “Steady State”? Try solving
If these have the same solution, then this is the “Steady State”.
110
90
𝑆50 𝑎𝑛𝑑 𝑆51
Cont’d :The lunch orders of Bread Rolls and Pastries, are given by the Transition Matrix, 𝑇, below.
Initially 100 students buy Rolls, 100 students buy Pastry, given by Initial State Matrix 𝑆𝑜 , below.
0.8 0.3
𝑇=
0.2 0.7
𝑆0 =
100
100
𝑤ℎ𝑒𝑟𝑒 𝑡ℎ𝑖𝑠 𝑖𝑠 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑏𝑟𝑒𝑎𝑑 𝑟𝑜𝑙𝑙𝑠 𝑠𝑜𝑙𝑑 𝑖𝑛𝑖𝑡𝑖𝑎𝑙𝑙𝑦
𝑤ℎ𝑒𝑟𝑒 𝑡ℎ𝑖𝑠 𝑖𝑠 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑝𝑎𝑠𝑡𝑟𝑖𝑒𝑠 𝑠𝑜𝑙𝑑 𝑖𝑛𝑖𝑡𝑖𝑎𝑙𝑙𝑦
What are the totals when orders reach stability or “Steady State”?
Try solving
𝑆𝑛 =
𝑇𝑛
𝑆50 𝑎𝑛𝑑 𝑆51 .
× 𝑆0
If these have the same solution, then this is the “Steady State”.
𝑆50 =
𝑇 50
𝑆51 = 𝑇 51
0.8
× 𝑆0 =
0.2
0.8
× 𝑆0 =
0.2
0.3 50
0.7
0.3 51
0.7
100
100
100
100
120
=
80
120
=
80
As each solution is the same, the system has reached steady state (it won’t change any more).
So at steady state, 120 Bread Rolls are ordered and 80 Pastries are ordered.
EXAMPLE TWO
Daily Orders at a juice bar, where 3 juices are available – Berry, Tropical, Vegie
Each day, the same 300 customers order juice.
Initially 120 order Berry, 100 order Tropical, 80 order Vegie
80% of those who buy Berry will buy Berry tomorrow
10% of those who buy Berry will buy Tropical tomorrow
10% of those who buy Berry will buy Vegie tomorrow
70% of those who buy Tropical will buy Tropical tomorrow
25% of those who buy Tropical will buy Berry tomorrow
5% of those who buy Tropical will buy Vegie tomorrow
55% of those who buy Vegie will buy Vegie tomorrow
35% of those who buy Vegie will buy Berry tomorrow
10% of those who buy Vegie will buy Tropical tomorrow
a) Write a Transition Matrix
to represent the data
b) Write the Initial State
Matrix, 𝑆0
c) After 3 days, how many
people order each juice?
d) Find the Steady State
order numbers for the
juices (that is where the
orders stop changing).
Hint: Solve and compare
your solutions to
𝑆50 𝑎𝑛𝑑 𝑆51
Daily Orders at a juice bar, where 3 juices are available – Berry, Tropical, Vegie
Each day, the same 300 customers order. Initially 120 order Berry, 100 order Tropical, 80 order Vegie
a) Write a Transition Matrix to represent the data:
0.8 0.25 0.35
T = 0.1 0.7
0.1
0.1 0.05 0.55
120
b) Write the Initial State Matrix: 𝑆0 = 100
80
c) After 3 days, how many people order each juice?
170
0.8 0.25 0.35 3 120
𝑆3 = 𝑇 3 × 𝑆0 = 0.1 0.7
100 = 80
0.1
80
50
0.1 0.05 0.55
d) Find the Steady State:
𝑆50
𝑆51
0.8
50
= 𝑇 × 𝑆0 = 0.1
0.1
0.8
= 𝑇 51 × 𝑆0 = 0.1
0.1
0.25
0.7
0.05
0.25
0.7
0.05
0.35
0.1
0.55
0.35
0.1
0.55
50
51
120
177
100 = 75
80
48
120
177
100 = 80
80
48
So at steady state, 177 Berry Juice, 75 Tropical,
and 48 Vegie are ordered
NOW TRY EXERCISES FROM BOOKLET
Q1-6, 11-15, 20-22