TMA4115 Matematikk 3 Andrew Stacey Norges Teknisk-Naturvitenskapelige Universitet Trondheim Spring 2010
Lecture 12: Mathematics Marvellous Matrices Andrew Stacey Norges Teknisk-Naturvitenskapelige Universitet Trondheim 19th February 2010
Key Points Process Matrix: Obvious manipulations of processes Matrix manipulations The true meaning of invertible
Detailed Recap Definition A matrix is a rectangular grid (of numbers)
Detailed Recap Definition Example A matrix is a rectangular grid (of numbers) 1 3 4 5 π e π π e e 0 28 2 0
Detailed Recap Definition Example A matrix is a rectangular grid (of numbers) 1 3 4 5 π e π π e e 0 28 2
Detailed Recap Definition Example A matrix is a rectangular grid (of numbers) 1 3 5 π e π π e e 0 28 2 0
Meaningful Matrices Key Point Matrices encode certain processes Input Process Output x 1,..., x n a 11 x 1 + + a 1n x n..... a m1 x 1 + + a mn x n
Dairy Production Factory 1 Factory 2
Dairy Production Butter Factory 1 Cream Factory 2 Yogurt Cheese
Dairy Production Butter Factory 1 Factory 2 Cream Yogurt Cheese Trondheim Bergen Oslo
The Processes Factories to Products Products: how much of factory 2 s output is butter? factory 1 factory 2 butter.3.1 cream.1.0 yogurt.2.4 cheese.4.5 Products to Cities How much of each tonne of butter goes to Trondheim? butter cream yogurt cheese Trondheim.22.25.27.21 Bergen.30.30.30.30 Oslo.48.45.43.49
From Factory to City How much stuff goes from Factory 1 to Trondheim? T B O F 1 F 2 =.22.25.27.21.30.30.30.30.48.45.43.49.3.1.1.0.2.4.4.5
From Factory to City How much stuff goes from Factory 1 to Trondheim? T B O F 1 F 2 =.22.25.27.21.30.30.30.30.48.45.43.49.3.1.1.0.2.4.4.5.22.3 +.25.1 +.27.2 +.21.4
From Factory to City How much stuff goes from Factory 1 to Trondheim? F 1 F 2 T.229 B O =.22.25.27.21.30.30.30.30.48.45.43.49.3.1.1.0.2.4.4.5.22.3 +.25.1 +.27.2 +.21.4 =.229
From Factory to City How much stuff goes from Factory 1 to Trondheim? F 1 F 2 T.229 B O =.22.25.27.21.30.30.30.30.48.45.43.49.3.1.1.0.2.4.4.5.22.1 +.25.0 +.27.4 +.21.5
From Factory to City How much stuff goes from Factory 1 to Trondheim? F 1 F 2 T.229.235 B O =.22.25.27.21.30.30.30.30.48.45.43.49.3.1.1.0.2.4.4.5.22.1 +.25.0 +.27.4 +.21.5 =.235
From Factory to City How much stuff goes from Factory 1 to Trondheim? F 1 F 2 T.229.235 B O =.22.25.27.21.30.30.30.30.48.45.43.49.3.1.1.0.2.4.4.5.30.3 +.30.1 +.30.2 +.30.4
From Factory to City How much stuff goes from Factory 1 to Trondheim? F 1 F 2 T.229.235 B.300 O =.22.25.27.21.30.30.30.30.48.45.43.49.3.1.1.0.2.4.4.5.30.3 +.30.1 +.30.2 +.30.4 =.300
From Factory to City How much stuff goes from Factory 1 to Trondheim? F 1 F 2 T.229.235 B.300 O =.22.25.27.21.30.30.30.30.48.45.43.49.3.1.1.0.2.4.4.5.30.1 +.30.0 +.30.4 +.30.5
From Factory to City How much stuff goes from Factory 1 to Trondheim? F 1 F 2 T.229.235 B.300.300 O =.22.25.27.21.30.30.30.30.48.45.43.49.3.1.1.0.2.4.4.5.30.1 +.30.0 +.30.4 +.30.5 =.300
From Factory to City How much stuff goes from Factory 1 to Trondheim? F 1 F 2 T.229.235 B.300.300 O =.22.25.27.21.30.30.30.30.48.45.43.49.3.1.1.0.2.4.4.5.48.3 +.45.1 +.43.2 +.49.4
From Factory to City How much stuff goes from Factory 1 to Trondheim? F 1 F 2 T.229.235 B.300.300 O.471 =.22.25.27.21.30.30.30.30.48.45.43.49.3.1.1.0.2.4.4.5.48.3 +.45.1 +.43.2 +.49.4 =.465
From Factory to City How much stuff goes from Factory 1 to Trondheim? F 1 F 2 T.229.235 B.300.300 O.471 =.22.25.27.21.30.30.30.30.48.45.43.49.3.1.1.0.2.4.4.5.48.1 +.45.0 +.43.4 +.49.5
From Factory to City How much stuff goes from Factory 1 to Trondheim? F 1 F 2 T.229.235 B.300.300 O.471.465 =.22.25.27.21.30.30.30.30.48.45.43.49.3.1.1.0.2.4.4.5.48.1 +.45.0 +.43.4 +.49.5 =.465
Add in Depots Butter Factory 1 Factory 2 Cream Yogurt Cheese Trondheim Bergen Oslo
Add in Depots Factory 1 Butter Cream Depot 1 Trondheim Bergen Factory 2 Yogurt Depot 2 Oslo Cheese
Add in Depots Factory 1 Butter Cream Depot 1 Trondheim Bergen Factory 2 Yogurt Depot 2 Oslo Cheese
Partitioning Processes Factory to City
Partitioning Processes Factory to City via Depot 1.087.105.087.105.116.140 via Depot 2.142.030.213.195.355.325
Partitioning Processes Factory to City via Depot 1 Total.087.105.087.105.116.140 via Depot 2.142.030.213.195.355.325 Factory 1 to Trondheim = Factory 1 to Trondheim via Depot 1 + Factory 1 to Trondheim via Depot 2.087.105.142.030.229.235.087.105 +.213.195 =.300.300.116.140.355.325.471.465
Combining Processes 1. One process follows the other: multiply matrices 2. Two processes partition another: add matrices
A Secret Process Question How do we increase factory output?
A Secret Process Question How do we increase factory output? Answer Increase Milk Production!
A Secret Process Question How do we increase factory output? Answer Increase Milk Production! Factory output proportional to milk production
A Secret Process Question How do we increase factory output? Answer Increase Milk Production! Factory output proportional to milk production View factory output, (p 1, p 2 ), as a process: Milk Produce
A Secret Process Question How do we increase factory output? Answer Increase Milk Production! Factory output proportional to milk production View factory output, (p 1, p 2 ), as a process: Milk Representing matrix is: [ p1 Produce ] p 2
Vectors Definition A column vector is a matrix with one column
Vectors Definition A column vector is a matrix with one column Remark 1. Column vectors written as u or u or u
Vectors Definition A column vector is a matrix with one column Remark 1. Column vectors written as u or u or u 2. View as initial process : defining the input data for a process
Vectors Definition A column vector is a matrix with one column Remark 1. Column vectors written as u or u or u 2. View as initial process : defining the input data for a process 3. Matrix column vector = column vector because output of one process is input of next
Matrices and Column Vectors = 1 3 4 5 2 8 0 0 2 1 3 4 3 2 1 0
Matrices and Column Vectors = 1 3 4 5 2 8 0 0 2 1 3 4 3 2 1 0
Matrices and Column Vectors 1 = 1 3 4 5 2 8 0 0 2 1 3 4 3 2 1 0
Matrices and Column Vectors 1 = 1 3 4 5 2 8 0 0 2 1 3 4 3 2 1 0
Matrices and Column Vectors 1 10 = 1 3 4 5 2 8 0 0 2 1 3 4 3 2 1 0
Matrices and Column Vectors 1 10 = 1 3 4 5 2 8 0 0 2 1 3 4 3 2 1 0
Matrices and Column Vectors 1 10 10 = 1 3 4 5 2 8 0 0 2 1 3 4 3 2 1 0
Column Vectors and Linear Systems Linear System Find x, y, z such that x + 2y + z = 2 2x 3y + z = 3 x + y + 2z = 4
Column Vectors and Linear Systems Linear System Find x, y, z such that Matrices x + 2y + z = 2 2x 3y + z = 3 x + y + 2z = 4 x 1 2 1 x 2 Find y such that 2 3 1 y = 3 z 1 1 2 z 4
Column Vectors and Linear Systems Linear System Find x, y, z such that Matrices x + 2y + z = 2 2x 3y + z = 3 x + y + 2z = 4 x 1 2 1 x 2 Find y such that 2 3 1 y = 3 z 1 1 2 z 4 Same question!
A Convenient Notation Write generic linear system as: A x = b
A Convenient Notation Write generic linear system as: A x = b Composition order: A and B represent processes
A Convenient Notation Write generic linear system as: A x = b Composition order: A and B represent processes feed outputs of A into B to get new process, matrix C
A Convenient Notation Write generic linear system as: A x = b Composition order: A and B represent processes feed outputs of A into B to get new process, matrix C write C = BA
A Convenient Notation Write generic linear system as: A x = b Composition order: A and B represent processes feed outputs of A into B to get new process, matrix C write C = BA substitute into notation for linear system: C x = BA x do A first and then B
Factory to Depot Passing Through the Depots F1 F2 D1.29.35 D2.71.65
Factory to Depot Passing Through the Depots F1 F2 D1.29.35 D2.71.65 Recall: matrix records proportions
Factory to Depot Passing Through the Depots F1 F2 D1.29.35 D2.71.65 Recall: matrix records proportions Question Can we find out the productivity of the factories by measuring what arrives at the depots?
Factory to Depot Passing Through the Depots F1 F2 D1.29.35 D2.71.65 Recall: matrix records proportions Question Can we find out the productivity of the factories by measuring what arrives at the depots? Solve:.29p 1 +.35p 2 = d 1.71p 1 +.65p 2 = d 2
Solution [ ].29.35 d1.71.65 d 2
Solution [ ].29.35 d1.71.65 d 2 [ ] R 2.29R 2.29.35 d1.2059.1885.29d 2
Solution [ ].29.35 d1.71.65 d 2 [ ] R 2.29R 2.29.35 d1.2059.1885.29d 2 R 2.71R 1 [.29.35 d1 0.06.29d 2.71d 1 ]
Solution [ ].29.35 d1.71.65 d 2 [ ] R 2.29R 2.29.35 d1.2059.1885.29d 2 R 2.71R 1 [.29.35 d1 0.06.29d 2.71d 1 R 1.06R 1 [.0174.0210.06d1 0.06.29d 2.71d 1 ] ]
Solution [ ].29.35 d1.71.65 d 2 [ ] R 2.29R 2.29.35 d1.2059.1885.29d 2 R 2.71R 1 [.29.35 d1 0.06.29d 2.71d 1 R 1.06R 1 [.0174.0210.06d1 0.06.29d 2.71d 1 R 1.35R 2 [.0174 0.1885d1.1015d 2 0.06.29d 2.71d 1 ] ] ]
Solution [ ].29.35 d1.71.65 d 2 [ ] R 2.29R 2.29.35 d1.2059.1885.29d 2 R 2.71R 1 [.29.35 d1 0.06.29d 2.71d 1 R 1.06R 1 [.0174.0210.06d1 0.06.29d 2.71d 1 [ R 1.35R 2.0174 0.1885d1.1015d 2 0.06.29d 2.71d 1 [ ] R 1.29 1 R 1.06 0.65d1.35d 2 0.06.29d 2.71d 1 ] ] ]
Back and Forth.29p 1 +.35p 2 = d 1.71p 1 +.65p 2 = d 2 100 6 100 6 (.65d1.35d 2 ) = p1 (.71d1 +.29d 2 ) = p2
Back and Forth.29p 1 +.35p 2 = d 1.71p 1 +.65p 2 = d 2 100 6 100 6 (.65d1.35d 2 ) = p1 (.71d1 +.29d 2 ) = p2 Remark 1. Can figure out what leaves factories from what arrives at depots.
Back and Forth.29p 1 +.35p 2 = d 1.71p 1 +.65p 2 = d 2 100 6 100 6 (.65d1.35d 2 ) = p1 (.71d1 +.29d 2 ) = p2 Remark 1. Can figure out what leaves factories from what arrives at depots. 2. Can arrange for any desired arrival amounts by adjusting productions.
Back and Forth.29p 1 +.35p 2 = d 1.71p 1 +.65p 2 = d 2 100 6 100 6 (.65d1.35d 2 ) = p1 (.71d1 +.29d 2 ) = p2 Remark 1. Can figure out what leaves factories from what arrives at depots. 2. Can arrange for any desired arrival amounts by adjusting productions. 3. No presumption of cause or effect.
Invertible Definition A process is said to be invertible if 1. Each input is uniquely determined by its output 2. Each potential output is possible A matrix is invertible if it represents an invertible process
Invertible Examples 1. [.29 ].35.71.65 represents an invertible process
Invertible Examples 1. [.29 ].35.71.65 represents an invertible process 2. [ 1 2 ] 3 4 5 6 is not invertible: (0, 0, 0) and (1, 2, 1) both go to (0, 0)
Invertible Examples 1. [.29 ].35.71.65 represents an invertible process 2. [ 1 2 ] 3 4 5 6 is not invertible: (0, 0, 0) and (1, 2, 1) both go to (0, 0) 3. [ ] 0 1 is not invertible: no way to get (1, 0)
An Incredibly Important Process Introducing
An Incredibly Important Process Introducing The do nothing process!
An Incredibly Important Process Introducing The do nothing process! Output = Input
An Incredibly Important Process Introducing The do nothing process! Output = Input y 1 = x 1, y 2 = x 2,..., y n = x n
An Incredibly Important Process Introducing The do nothing process! Output = Input y 1 = x 1, y 2 = x 2,..., y n = x n Representing matrix: 1 0 0 0 1 0 I n...... 0 0 1
An Incredibly Important Process Introducing The do nothing process! Output = Input y 1 = x 1, y 2 = x 2,..., y n = x n Representing matrix: 1 0 0 0 1 0 I n...... 0 0 1 (Technically, one for each size n)
Inverses Rough Definition An inverse of a process is another process such that composing either way around results in the do nothing process.
Inverses Rough Definition An inverse of a process is another process such that composing either way around results in the do nothing process. In matrix language: an inverse of A is B such that AB = I m and BA = I n.
Inverses Rough Definition An inverse of a process is another process such that composing either way around results in the do nothing process. In matrix language: an inverse of A is B such that AB = I m and BA = I n. Lemma A matrix is invertible if and only if it has an inverse.
Computing Inverses Does 1 2 3 2 3 4 3 4 6 have an inverse?
Computing Inverses Does 1 2 3 2 3 4 3 4 6 have an inverse? If so, A x = b has a solution for any b.
Computing Inverses Does 1 2 3 2 3 4 3 4 6 have an inverse? If so, A x = b has a solution for any b. 1 0 0 For example... 0 or 1 or 0 0 0 1
Computing Inverses Does 1 2 3 2 3 4 3 4 6 have an inverse? If so, A x = b has a solution for any b. 1 0 0 For example... 0 or 1 or 0 0 0 1 Let s see if it does.
Simultaneous Gaussian Elimination 1 2 3 1 0 0 2 3 4 0 1 0 3 4 6 0 0 1
Simultaneous Gaussian Elimination 1 2 3 1 0 0 2 3 4 0 1 0 3 4 6 0 0 1 R 2 2R 1 R 3 3R 1 1 2 3 1 0 0 0 2 2 2 1 0 0 2 3 3 0 1
Simultaneous Gaussian Elimination 1 2 3 1 0 0 2 3 4 0 1 0 3 4 6 0 0 1 R 2 2R 1 R 3 3R 1 R 3 2R 2 R 1 +2R 2 1 2 3 1 0 0 0 2 2 2 1 0 0 2 3 3 0 1 1 0 1 3 2 0 0 1 2 2 1 0 0 0 1 1 2 1
Simultaneous Gaussian Elimination 1 2 3 1 0 0 2 3 4 0 1 0 3 4 6 0 0 1 R 2 2R 1 R 3 3R 1 R 3 2R 2 R 1 +2R 2 R 2 +2R 3 R 1 +R 3 1 2 3 1 0 0 0 2 2 2 1 0 0 2 3 3 0 1 1 0 1 3 2 0 0 1 2 2 1 0 0 0 1 1 2 1 1 0 0 2 0 1 0 1 0 0 3 2 0 0 1 1 2 1
Simultaneous Gaussian Elimination 1 2 3 1 0 0 2 3 4 0 1 0 3 4 6 0 0 1 1 2 3 1 0 0 0 2 2 2 1 0 0 2 3 3 0 1 1 0 1 3 2 0 0 1 2 2 1 0 0 0 1 1 2 1 1 0 0 2 0 1 0 1 0 0 3 2 0 0 1 1 2 1 1 0 0 2 0 1 0 1 0 0 3 2 0 0 1 1 2 1 R 2 2R 1 R 3 3R 1 R 3 2R 2 R 1 +2R 2 R 2 +2R 3 R 1 +R 3 R 2 R 2
Check Your Answer Is 2 0 1 B = 0 3 2 1 2 1 an inverse for A?
Check Your Answer Is 2 0 1 B = 0 3 2 1 2 1 an inverse for A? Check: AB = I 3 and BA = I 3
Summary Matrix manipulations follow from what happens to processes Invertible matrices correspond to invertible processes Invertible process means input and output determine each other