The Effects of Linear Transformations on Two –dimensional Objects.

125
The Effects of Linear Transformations on Two –dimensional Objects

Transcript of The Effects of Linear Transformations on Two –dimensional Objects.

  • Slide 1
  • The Effects of Linear Transformations on Two dimensional Objects
  • Slide 2
  • or
  • Slide 3
  • Timmy Twospace Meets Mr. Matrix (An ill-conceived attempt to introduce humor into learning) Alan Kaylor Cline
  • Slide 4
  • Dedicated to the Students of the Inaugural Math 340L-CS Class at the University of Texas at Austin, Fall, 2012
  • Slide 5
  • Hi. Im Timmy Twospace and I want to show you what happens to me when Mr. Matrix does his thing.
  • Slide 6
  • I want you to meet two friends of mine: Eee-Juan and Eee-too.
  • Slide 7
  • For the moment, I going to be invisible.
  • Slide 8
  • We write it This is Eee-Juan : just that green spot.
  • Slide 9
  • We write it Heres the other friend. He is Eee-too: just that pink spot.
  • Slide 10
  • Mr. Matrix and this is Mr. Matrix.
  • Slide 11
  • Mr. Matrix tells us where to go.
  • Slide 12
  • In fact, knowing where Mr. Matrix sends Eee-Juan and Eee-too actually tells us everything.
  • Slide 13
  • Eee-Juan gets his instructions from the first column of Mr. Matrix
  • Slide 14
  • Mr. Matrix is telling Eee-Juan to go to
  • Slide 15
  • Eee-too gets his instructions from the second column of Mr. Matrix.
  • Slide 16
  • Mr. Matrix is telling Eee-too to go to
  • Slide 17
  • and those are enough instructions to tell where everything moves.
  • Slide 18
  • For example, this blue point is half of Eee-Juan plus twice Eee-too.
  • Slide 19
  • So the point moves to twice where Eee-Juan moves plus one half of where Eee-too moves.
  • Slide 20
  • And all of the points in this square
  • Slide 21
  • are transformed to all of the points in this parallelogram
  • Slide 22
  • |ad-bc| 1 (and by the way, the area of the parallelogram is |ad-bc| times the area of the square.) ad-bc is the determinant of this matrix
  • Slide 23
  • Once again, knowing where Mr. Matrix sends Eee-Juan and Eee-too actually tells us everything.
  • Slide 24
  • And this even applies to me
  • Slide 25
  • First realize that, amusing as I am, Im actually just some points in the plane: line segments and circles.
  • Slide 26
  • So, all of my points move under the instructions of Mr. Matrix.
  • Slide 27
  • Every one of my points is just a sum of some amount of Eee-Juan and some amount of Eee-too.
  • Slide 28
  • This is where Mr. Matrix sends my points.
  • Slide 29
  • We are going to see what happens to me with various versions of Mr. Matrix.
  • Slide 30
  • You should pay attention to what happens to my line segments and circles and this box around me.
  • Slide 31
  • But before that, notice that I am not symmetric: one arm is raised the other arm isnt.
  • Slide 32
  • Pay special attention to the two arms.
  • Slide 33
  • So here we go. First, Mr. Matrix is the identity matrix. Mr. Matrix as the identity
  • Slide 34
  • and he transforms me to
  • Slide 35
  • Slide 36
  • Yup. No change whatsoever.
  • Slide 37
  • Pretty boring. Right? Written as I
  • Slide 38
  • This time Mr. Matrix is just half of what he was as the identity matrix. Written as I
  • Slide 39
  • and he transforms me to
  • Slide 40
  • Slide 41
  • (back to blue)
  • Slide 42
  • Ive been shrunk in half.
  • Slide 43
  • This is called a scaling. Notice the constant on the diagonal of Mr. Matrix.
  • Slide 44
  • Lets change that constant to 2. Written as 2 I
  • Slide 45
  • Slide 46
  • And now I am back to my original self. Notice the second process undid what the first did.
  • Slide 47
  • The two processes are inverses of each other. ( I) -1 = 2 I
  • Slide 48
  • and if we were to apply this scaling again to me
  • Slide 49
  • Slide 50
  • Slide 51
  • ... I get twice as big. Same shape just twice as big.
  • Slide 52
  • Now lets see what this one does with one 2 and one 1.
  • Slide 53
  • Can you see Ive been stretched?
  • Slide 54
  • My x-component s have been doubled but my y-components were left alone.
  • Slide 55
  • My head is no longer a circle but an ellipse.
  • Slide 56
  • The box around me is still a rectangle just twice as wide.
  • Slide 57
  • Im back to regular and now well reverse the positions of the 1 and 2.
  • Slide 58
  • Slide 59
  • Slide 60
  • My y-component s have been doubled but x- components were left alone.
  • Slide 61
  • Again my head is an ellipse.
  • Slide 62
  • and again the box around me is still a rectangle now twice as tall.
  • Slide 63
  • Back to normal. Now lets double the x-coordinate and halve the y-coordinate at the same time. Notice the 2 and the .
  • Slide 64
  • Big time squishing, right? The box is twice as wide and half as tall so the area is the same as before.
  • Slide 65
  • Lets go the other way: halve the x-coordinate and double the y- coordinate. The 2 and the are switched.
  • Slide 66
  • Slide 67
  • Those transformations stretched or shrank the x- or y-coordinate or both.
  • Slide 68
  • Mr. Matrix was diagonal: non-zeros only in the upper left and lower right positions.
  • Slide 69
  • Now lets go back to the identity - but add a non- zero in the upper right. The upper right is now 1/2.
  • Slide 70
  • Slide 71
  • The y-coordinates are left alone. The x- plus one half the y-coordinates are added to get the new x-coordinates.
  • Slide 72
  • This is called a shear.
  • Slide 73
  • There is another shear: We go back to the identity but add a non- zero in the lower left. The lower left is now 1/2.
  • Slide 74
  • Slide 75
  • The x-coordinates are left alone. The y- plus one half the x-coordinates are added to get the new y-coordinates.
  • Slide 76
  • Moving on So what will this do? It looks sort of like the identity. The 1s and 0s are reversed from the identity
  • Slide 77
  • Slide 78
  • Do you believe Ive been rotated?
  • Slide 79
  • Look closer. Look at the arm I have raised. Is this really a rotation?
  • Slide 80
  • Nope. Its a reflection. My x- and y- components have been reversed.
  • Slide 81
  • This is easier to see if I draw in this 45 degree line.
  • Slide 82
  • A reflection is a flipping across some line. I am a mirror image of my former self.
  • Slide 83
  • But other than that exactly the same: no shrinking, no stretching.
  • Slide 84
  • Im back to normal and Mr. Matrix is very similar to his last form but notice the -1. See the -1 in the lower left?
  • Slide 85
  • This is a rotation through 90 degrees.
  • Slide 86
  • Notice it is not a reflection - not a mirror image.
  • Slide 87
  • Quiz Time: Watch this - is it a reflection or a rotation? Two -1s
  • Slide 88
  • Slide 89
  • This is a reflection. Do you see that it is a mirror image across the line?
  • Slide 90
  • On the other hand, this one is a rotation of 90 degrees counterclockwise. Notice the same arm is raised and there is no mirror image.. One -1
  • Slide 91
  • So what is a general rotation?
  • Slide 92
  • This matrix performs a counterclockwise rotation of an angle The last example had = /2 or 90 degrees
  • Slide 93
  • Moving counterclockwise is considered the positive direction.
  • Slide 94
  • Lets try this rotation for = /10 or 18 degrees.
  • Slide 95
  • Slide 96
  • and again
  • Slide 97
  • Slide 98
  • Slide 99
  • Slide 100
  • Slide 101
  • Slide 102
  • You get the idea. If we call this matrix R, then the total effect is R 7.
  • Slide 103
  • Slide 104
  • Finally, we will see what happens when Mr. Matrix transforms me over and over.
  • Slide 105
  • This is a special matrix called a stochastic matrix: no negative numbers and each column has a sum of 1. Stochastic Matrix
  • Slide 106
  • It is sometimes used to describe the probabilities of movements between states.
  • Slide 107
  • Heres a state diagram corresponding to this matrix A B 4% 84%96% 16%
  • Slide 108
  • Thus, the probability of staying in state A is.96, the probability of moving from state A to state B is.04, A B 4% 84%96% 16%
  • Slide 109
  • Applying Mr. Matrix over and over is a way of finding the steady state. A B 4% 84%96% 16%
  • Slide 110
  • But lets see what happens when Mr. Matrix is applied over and over to me.
  • Slide 111
  • Slide 112
  • Slide 113
  • Slide 114
  • Slide 115
  • Slide 116
  • Slide 117
  • Slide 118
  • Slide 119
  • Slide 120
  • Slide 121
  • Slide 122
  • Slide 123
  • And lets skip forward an infinite number of steps to
  • Slide 124
  • And now Im fixed. All of my points are called eigenvectors corresponding to eigenvalue 1.
  • Slide 125
  • Timmy Twospace signing off. Bye.