General MATHS – UNIT ONE MATRICES

Slides:



Advertisements
Similar presentations
Request Dispatching for Cheap Energy Prices in Cloud Data Centers
Advertisements

SpringerLink Training Kit
Luminosity measurements at Hadron Colliders
From Word Embeddings To Document Distances
Choosing a Dental Plan Student Name
Virtual Environments and Computer Graphics
Chương 1: CÁC PHƯƠNG THỨC GIAO DỊCH TRÊN THỊ TRƯỜNG THẾ GIỚI
THỰC TIỄN KINH DOANH TRONG CỘNG ĐỒNG KINH TẾ ASEAN –
D. Phát triển thương hiệu
NHỮNG VẤN ĐỀ NỔI BẬT CỦA NỀN KINH TẾ VIỆT NAM GIAI ĐOẠN
Điều trị chống huyết khối trong tai biến mạch máu não
BÖnh Parkinson PGS.TS.BS NGUYỄN TRỌNG HƯNG BỆNH VIỆN LÃO KHOA TRUNG ƯƠNG TRƯỜNG ĐẠI HỌC Y HÀ NỘI Bác Ninh 2013.
Nasal Cannula X particulate mask
Evolving Architecture for Beyond the Standard Model
HF NOISE FILTERS PERFORMANCE
Electronics for Pedestrians – Passive Components –
Parameterization of Tabulated BRDFs Ian Mallett (me), Cem Yuksel
L-Systems and Affine Transformations
CMSC423: Bioinformatic Algorithms, Databases and Tools
Some aspect concerning the LMDZ dynamical core and its use
Bayesian Confidence Limits and Intervals
实习总结 (Internship Summary)
Current State of Japanese Economy under Negative Interest Rate and Proposed Remedies Naoyuki Yoshino Dean Asian Development Bank Institute Professor Emeritus,
Front End Electronics for SOI Monolithic Pixel Sensor
Face Recognition Monday, February 1, 2016.
Solving Rubik's Cube By: Etai Nativ.
CS284 Paper Presentation Arpad Kovacs
انتقال حرارت 2 خانم خسرویار.
Summer Student Program First results
Theoretical Results on Neutrinos
HERMESでのHard Exclusive生成過程による 核子内クォーク全角運動量についての研究
Wavelet Coherence & Cross-Wavelet Transform
yaSpMV: Yet Another SpMV Framework on GPUs
Creating Synthetic Microdata for Higher Educational Use in Japan: Reproduction of Distribution Type based on the Descriptive Statistics Kiyomi Shirakawa.
MOCLA02 Design of a Compact L-­band Transverse Deflecting Cavity with Arbitrary Polarizations for the SACLA Injector Sep. 14th, 2015 H. Maesaka, T. Asaka,
Hui Wang†*, Canturk Isci‡, Lavanya Subramanian*,
Fuel cell development program for electric vehicle
Overview of TST-2 Experiment
Optomechanics with atoms
داده کاوی سئوالات نمونه
Inter-system biases estimation in multi-GNSS relative positioning with GPS and Galileo Cecile Deprez and Rene Warnant University of Liege, Belgium  
ლექცია 4 - ფული და ინფლაცია
10. predavanje Novac i financijski sustav
Wissenschaftliche Aussprache zur Dissertation
FLUORECENCE MICROSCOPY SUPERRESOLUTION BLINK MICROSCOPY ON THE BASIS OF ENGINEERED DARK STATES* *Christian Steinhauer, Carsten Forthmann, Jan Vogelsang,
Particle acceleration during the gamma-ray flares of the Crab Nebular
Interpretations of the Derivative Gottfried Wilhelm Leibniz
Advisor: Chiuyuan Chen Student: Shao-Chun Lin
Widow Rockfish Assessment
SiW-ECAL Beam Test 2015 Kick-Off meeting
On Robust Neighbor Discovery in Mobile Wireless Networks
Chapter 6 并发:死锁和饥饿 Operating Systems: Internals and Design Principles
You NEED your book!!! Frequency Distribution
Y V =0 a V =V0 x b b V =0 z
Fairness-oriented Scheduling Support for Multicore Systems
Climate-Energy-Policy Interaction
Hui Wang†*, Canturk Isci‡, Lavanya Subramanian*,
Ch48 Statistics by Chtan FYHSKulai
The ABCD matrix for parabolic reflectors and its application to astigmatism free four-mirror cavities.
Measure Twice and Cut Once: Robust Dynamic Voltage Scaling for FPGAs
Online Learning: An Introduction
Factor Based Index of Systemic Stress (FISS)
What is Chemistry? Chemistry is: the study of matter & the changes it undergoes Composition Structure Properties Energy changes.
THE BERRY PHASE OF A BOGOLIUBOV QUASIPARTICLE IN AN ABRIKOSOV VORTEX*
Quantum-classical transition in optical twin beams and experimental applications to quantum metrology Ivano Ruo-Berchera Frascati.
The Toroidal Sporadic Source: Understanding Temporal Variations
FW 3.4: More Circle Practice
ارائه یک روش حل مبتنی بر استراتژی های تکاملی گروه بندی برای حل مسئله بسته بندی اقلام در ظروف
Decision Procedures Christoph M. Wintersteiger 9/11/2017 3:14 PM
Limits on Anomalous WWγ and WWZ Couplings from DØ
Presentation transcript:

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 ROWS COLUMNS We label the order of a matrix by counting how many rows and columns it has, writing it as: (number of rows x number of columns) 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 x 3) 2 −5 4 9 0 0

Order of a matrix eg3. State the order of the matrix: (number of rows x number of columns) (3 x 3) 2 0.5 6 −3 0 3 8 −10 20

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. Sat Sun R T C 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 What number is at position b3,2 3 -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 TO A B C D FROM A B C D 0 1 2 0 1 0 0 1 2 0 0 3 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? b) How much does it cost to get from Hobart to Launceston? c) Explain why there are 0’s running diagonally through the matrix $207 $160 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 0 1 0 0 0 1 1 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. Eg. If A = 1 5 2 6 and B = 3 0 1 4 Find A+B and A-B A + B = 1 5 2 6 + 3 0 1 4 = 1+3 5+0 2+1 6+4 = 4 5 3 10 A – B = 1 5 2 6 - 3 0 1 4 = 1−3 5−0 2−1 6−4 = −2 5 1 2

Operations with matrices – addition & subtraction using your calculator If A = 1 5 2 6 and B = 3 0 1 4 Find A+B and A-B A + B = 1 5 2 6 + 3 0 1 4 = 1+3 5+0 2+1 6+4 = 4 5 3 10 A – B = 1 5 2 6 - 3 0 1 4 = 1−3 5−0 2−1 6−4 = −2 5 1 2

Operations with matrices – addition, subtraction and solving unknowns Eg2. Consider the matrices C = 1 𝑥 6 10 D = 4 2 1 𝑦 If C+D = 5 9 7 13 , find the value of 𝑥 and 𝑦 C + D = 1 𝑥 6 10 + 4 2 1 𝑦 = 1+4 𝑥+2 6+1 10+𝑦 = 5 9 7 13 𝑥+2=9 ∴𝑥=7 10+𝑦=13 ∴𝑦=3

Operations with matrices – addition, subtraction and solving unknowns Eg3. Consider the matrices E = 6 12 6 𝑥 F = 𝑦 2 −2 7 If E - F = 1 10 8 5 , find the value of 𝑥 and 𝑦 E - F = 6 12 6 𝑥 - 𝑦 2 −2 7 = 6−𝑦 12−2 6−−2 𝑥−7 = 1 10 8 5 6−𝑦=1 ∴𝑦=5 𝑥−7=5 ∴𝑥=12

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. If A = 1 5 2 6 and B = 3 0 1 4 Find 2A and 3B 2A = 2 1 5 2 6 = 1 × 2 5 × 2 2 × 2 6 × 2 = 2 10 4 12 3B = 3 3 0 1 4 = 3×3 0×3 1×3 4×3 = 9 0 3 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, 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 A 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, 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 B 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 6 0 3 2 D = 1 2 6 3 4 0 2 2 1 1 2 4 C D (2 x 3) (3 x 4) So the new matrix will have order (2 x 4) They are! So we can multiply them together These numbers must be the same

Multiplying matrices 1 0 6 0 3 2 X 1 2 6 3 4 0 2 2 1 1 2 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 m1,1 = (1 X 1) + (0 X 3) + (6 X 2) 13 = 1 + 0 + 12 = 13 13

Multiplying matrices m1,2 = (1 X 2) + (0 X 4) + (6 X 2) 13 14 = 2 + 0 + 12 = 14 13 14

Multiplying matrices m1,3 = (1 X 6) + (0 X 0) + (6 X 1) 13 14 12 = 6 + 0 + 6 = 12 13 14 12

Multiplying matrices m1,4 = (1 X 1) + (0 X 2) + (6 X 4) 13 14 12 25 = 1 + 0 + 24 = 25 13 14 12 25

Multiplying matrices m2,1 = (0 X 1) + (3 X 3) + (2 X 2) 13 14 12 25 13 = 0 + 9 + 4 = 13 13 14 12 25 13

Multiplying matrices m2,2 = (0 X 2) + (3 X 4) + (2 X 2) 13 14 12 25 16 = 0 + 12 + 4 = 16 13 14 12 25 13 16

Multiplying matrices m2,3 = (0 X 6) + (3 X 0) + (2 X 1) 13 14 12 25 = 0 + 0 + 2 = 2 13 14 12 25 13 16 2

Multiplying matrices m2,3 = (0 X 1) + (3 X 2) + (2 X 4) 13 14 12 25 = 0 + 6 + 8 = 14 13 14 12 25 13 16 2 14

We say the matrices are not commutative 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 2 0 4 Matrix B = 6 3 1 0 AB = 1 2 0 4 6 3 1 0 = 8 3 4 0 BA = 6 3 1 0 1 2 0 4 = 6 24 1 2 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) (4 x 4) 1 0 0 1 1 0 0 0 1 0 0 0 1 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 1 These matrices are called the identity matrix and are given the symbol I

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: A = 1 2 0 4 B = 6 3 1 0 i) AI ii) IA iii) BI iv) IB = 1 2 0 4 1 0 0 1 = 1 0 0 1 1 2 0 4 = 6 3 1 0 1 0 0 1 = 1 0 0 1 6 3 1 0 = 1 2 0 4 = 1 2 0 4 = 6 3 1 0 = 6 3 1 0

Multiplying matrices – identity matrix Raising the identity matrix to the power of any number, will give an answer of the identity matrix. I = 1 0 0 1 Solve: i) 𝐼 2 ii) 𝐼 0.5 = 1 0 0 1 2 = 1 0 0 1 This can be also be seen by solving the problem with the calculator = 1 0 0 1 0.5 = 1 0 0 1

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 eg: Find the determinant of Matrix B = 3 2 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 𝐵= 3 2 −1 2 𝐶= 4 −3 −1 1 det A = det B = 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-1 = 1 (𝑎𝑑−𝑏𝑐) 𝑑 −𝑏 −𝑐 𝑎 = 1 det 𝐴 𝑑 −𝑏 −𝑐 𝑎 The Determinant, detA A-1 = 1 (𝑎𝑑−𝑏𝑐) 𝑑 −𝑏 −𝑐 𝑎 = 1 det 𝐴 𝑑 −𝑏 −𝑐 𝑎 Note: Only Square Matrices have inverses For this subject we only work with inverses of 2 x 2 matrices A = 𝑎 𝑏 𝑐 𝑑

finding the inverse A = 𝑎 𝑏 𝑐 𝑑 A-1 = 1 (𝑎𝑑−𝑏𝑐) 𝑑 −𝑏 −𝑐 𝑎 Find the inverse of Matrix A = 1 2 1 4 A-1 = 1 2 4 −2 −1 1 = 4/2 −2/2 −1/2 1/2 = 2 −1 −0.5 0.5

finding the inverse A = 𝑎 𝑏 𝑐 𝑑 A-1 = 1 (𝑎𝑑−𝑏𝑐) 𝑑 −𝑏 −𝑐 𝑎 Use the formula to find the inverse of: 𝐴= 5 1 4 1 𝐵= 3 4 1 2 𝐶= 6 −3 −1 1 = 1 1 1 −1 −4 5 = 1 2 2 −4 −1 3 = 1 3 1 3 1 6 = 1 −1 −4 5 = 1 −2 −0.5 1.5 = 1/3 1 1/3 2

Singular matrix For some Matrices, an inverse doesn’t exist. This is due to the determinant equalling zero. eg. Find the inverse of Matrix B = 6 3 2 1 = 1 (6−6) 1 −3 −2 6 = 1 0 6 3 2 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? = 1 2 3 −4 −1 2 2 4 1 3 = 1 0 0 1 Proof: A = 𝟐 𝟒 𝟏 𝟑 A-1 = 𝟏 𝟐 𝟑 −𝟒 −𝟏 𝟐 Find 𝐴 −1 .A = 1 2 3 −4 −1 2 2 4 1 3 = 1 0 0 1

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 AX = B and XA = B can be solved by using the inverse. 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: XA = B XA = B (Post-multiply by A-1) XAA-1 = BA-1 (Since AA-1 = I) X = BA-1 Given: AX = B AX = B (Pre-multiply by A-1) A-1AX = A-1B (Since A-1A = I) X = A-1B AX = B, solve using XA = B, solve using X = A-1B X = BA-1

eg. Given A= 3 5 1 2 𝐵= 4 2 0 1 Find X if: AX = B 1. Which rule to use? 2. Find A-1: = 1 (3×2)−(5×1) 2 −5 −1 3 = 1 6−5 2 −5 −1 3 A-1 = 2 −5 −1 3 3. Sub Matrix B and Matrix A-1 into the equation X = A-1B and solve So: X = A-1B X = 𝟐 −𝟓 −𝟏 𝟑 𝟒 𝟐 𝟎 𝟏 X = 𝟖 −𝟏 −𝟒 𝟏

You try: Given A= 1 6 0 2 𝐵= 3 4 −1 2 Find X if: XA = B 1. Which rule to use? 2. Find A-1: = 1 (1×2)−(6×0) 2 −6 0 1 = 1 2 2 −6 0 1 A-1 = 1 −3 0 0.5 3. Sub Matrix B and Matrix A-1 into the equation X = BA-1 and solve So: X = BA-1 X = 𝟑 𝟒 −𝟏 𝟐 𝟏 −𝟑 𝟎 𝟎.𝟓 X = 𝟑 −𝟕 −𝟏 𝟒

Solving problems using the inverse Using the same method, we are asked to solve for x and y 𝟑 𝟓 𝟐 𝟒 𝒙 𝒚 = 𝟑 𝟏 1. Which rule to use? A X = B 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 X = A-1B 𝑥 𝑦 = 1 2 4 −5 −2 3 3 1 = 1 2 12−5 −6+3 = 1 2 7 −3 = 3.5 −1.5

Solving problems using the inverse Using the same method, we are asked to solve for x and y 𝟐 𝟒 𝟏 𝟒 𝒙 𝒚 = 𝟑 𝟏 1. Which rule to use? A X = B 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 X = A-1B 𝑥 𝑦 = 1 4 4 −4 −1 2 3 1 = 1 4 12−4 −3+2 = 1 4 8 −1 = 2 −0.25

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 𝐴𝑋=𝐵 becomes 2 1 3 4 𝑥 𝑦 = 11 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 −1 −3 2 = 1 5 4 −1 −3 2 4. Substitute 𝐴 −1 & 𝐵 into X = A-1B, then solve. 𝑎𝑥+𝑏𝑦=𝑒 𝑐𝑥+𝑑𝑦=𝑓 𝑎 𝑏 𝑐 𝑑 𝑥 𝑦 = 𝑒 𝑓 2𝑥+1𝑦=11 3𝑥+4𝑦=19

Solving simultaneous equations using matrices 4. Substitute 𝐴 −1 & 𝐵 into 𝑋= 𝐴 −1 𝐵, then solve. X= 𝐴 −1 𝐵 = 1 5 4 −1 −3 2 11 19 = 1 5 44−19 −33+38 = 1 5 25 5 So, X= 𝑥 𝑦 = 5 1 Write the answers: 𝑥=5 𝑦=1

Solving simultaneous equations using matrices Write as matrices in the form AX=B, using: 3 3 4 2 𝑥 𝑦 = 15 12 Rearrange to get X by itself to solve the equation, using: 𝑋= 𝐴 −1 𝐵 3. Find 𝐴 −1 , using: 𝐴 −1 = 1 3×2 −(3×4) 2 −3 −4 3 = 1 −6 2 −3 −4 3 4. Substitute 𝐴 −1 𝑎𝑛𝑑 𝐵 into 𝑋= 𝐴 −1 𝐵: 𝑋= 1 −6 2 −3 −4 3 15 12 = 1 −6 30−36 −60+36 = 1 −6 −6 −24 = 1 4 5. Use solution to answer original question: 𝑥=1 𝑦=4 𝑎𝑥+𝑏𝑦=𝑒 𝑐𝑥+𝑑𝑦=𝑓 𝑎 𝑏 𝑐 𝑑 𝑥 𝑦 = 𝑒 𝑓 You try. Solve for x & y: 3𝑥+3𝑦=15 4𝑥+2𝑦=12

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.

20% of students who buy a Bread Roll today will buy a pastry tomorrow. 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 Bread Roll Pastry TO 0.8 0.3 0.2 0.7 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 Soft Drink Juice TO 0.6 0.25 0.4 0.75 T = 0.6 0.25 0.4 0.75 Represent as a Transition Matrix

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. 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. T = 0.8 0.3 0.2 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 0.2 0.7 1 100 100 = 110 90 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 𝑆 50 𝑎𝑛𝑑 𝑆 51 If these have the same solution, then this is the “Steady State”.

What are the totals when orders reach stability or “Steady State”? 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 . If these have the same solution, then this is the “Steady State”. 𝑆 𝑛 = 𝑇 𝑛 × 𝑆 0 𝑆 50 = 𝑇 50 × 𝑆 0 = 0.8 0.3 0.2 0.7 50 100 100 = 120 80 𝑆 51 = 𝑇 51 × 𝑆 0 = 0.8 0.3 0.2 0.7 51 100 100 = 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 Write a Transition Matrix to represent the data 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 Write a Transition Matrix to represent the data Write the Initial State Matrix, 𝑆 0 After 3 days, how many people order each juice? 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

Write the Initial State Matrix: 𝑆 0 = 120 100 80 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 Write a Transition Matrix to represent the data: T= 0.8 0.25 0.35 0.1 0.7 0.1 0.1 0.05 0.55 Write the Initial State Matrix: 𝑆 0 = 120 100 80 After 3 days, how many people order each juice? 𝑆 3 = 𝑇 3 ×𝑆 0 = 0.8 0.25 0.35 0.1 0.7 0.1 0.1 0.05 0.55 3 120 100 80 = 170 80 50 Find the Steady State: 𝑆 50 = 𝑇 50 ×𝑆 0 = 0.8 0.25 0.35 0.1 0.7 0.1 0.1 0.05 0.55 50 120 100 80 = 177 75 48 So at steady state, 177 Berry Juice, 75 Tropical, 𝑆 51 = 𝑇 51 ×𝑆 0 = 0.8 0.25 0.35 0.1 0.7 0.1 0.1 0.05 0.55 51 120 100 80 = 177 80 48 and 48 Vegie are ordered

Now try exercises from booklet Q1-6, 11-15, 20-22