{VERSION 4 0 "SUN SPARC SOLARIS" "4.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 1 }{CSTYLE "2D Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 256 "" 1 14 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 257 "" 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 258 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 259 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 260 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 261 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 262 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 263 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 264 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 265 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 266 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 267 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 268 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 269 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 270 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 271 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 272 "" 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 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 260 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 261 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {PARA 256 "" 0 "" {TEXT 256 9 "Math 2270" }}{PARA 257 "" 0 "" {TEXT -1 17 " Maple Project 2 " }}{PARA 258 "" 0 "" {TEXT -1 15 "Septe mber, 2000" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 323 " We will study the geometric meaning of linear (hence matr ix) maps f(x)=Ax, from R^n to R^m. As does the book, we will focus on maps from R^2 to R^2 to illustrate more general properties. Of cours e, computer graphics are most concerned with those maps and with R^3 r otation maps and projection maps from R^3 to R^2. " }}{PARA 0 "" 0 " " {TEXT -1 63 " This project can be downloaded from our class mapl e page " }{TEXT 257 60 "http://www.math.utah.edu/~korevaar/2270fall00 /2270maple.html" }{TEXT -1 528 ". Save the \".mws\" file of this, the second Maple project, to your home directory, and then open it from M aple, as a ``Maple work sheet'' document. The questions which you are to answer are all listed at the end of this project, to give you a te mplate for what you should hand in. Some of the questions are duplic ated within the document, so that you can think about them as you work your way through it. The file you ultimately hand in should only in clude the qeustion list, together with your textual and Maple answers. " }}{PARA 0 "" 0 "" {TEXT -1 55 " The very definition of a linear map, namely that f(" }{TEXT 258 1 "u" }{TEXT -1 1 "+" }{TEXT 259 1 "v " }{TEXT -1 4 ")=f(" }{TEXT 260 1 "u" }{TEXT -1 4 ")+f(" }{TEXT 261 1 "v" }{TEXT -1 9 ") and f(s" }{TEXT 262 1 "u" }{TEXT -1 5 ")=sf(" } {TEXT 263 1 "u" }{TEXT -1 19 "), for all vectors " }{TEXT 264 1 "u" } {TEXT -1 1 "," }{TEXT 265 1 "v" }{TEXT -1 56 " and scalars s, has the \+ following geometric onsequences:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT 278 80 "(1) Lines are mapped to lines, and para llel lines are mapped to parallel lines:" }{TEXT -1 54 " This is beca use a line can be described as a set L=\{" }{TEXT 266 1 "u" }{TEXT -1 4 " + t" }{TEXT 267 1 "v" }{TEXT -1 17 "| t in R\}, where " }{TEXT 268 1 "u" }{TEXT -1 28 " is a point on the line and " }{TEXT 269 1 "v " }{TEXT -1 58 " is a direction vector. Therefore the image set f(L): =\{f(" }{TEXT 270 1 "u" }{TEXT -1 2 "+t" }{TEXT 271 1 "v" }{TEXT -1 6 ")\}=\{f(" }{TEXT 272 1 "u" }{TEXT -1 5 ")+tf(" }{TEXT 273 1 "v" } {TEXT -1 34 ")\} is also a line, going through f" }{TEXT 274 3 "(u)" } {TEXT -1 18 " with direction f(" }{TEXT 275 1 "v" }{TEXT -1 25 "). (I f the directions f(" }{TEXT 276 1 "v" }{TEXT -1 18 ") turns out to be \+ " }{TEXT 277 1 "0" }{TEXT -1 348 ", then the line degenerates into a p oint.) Therefore, line segments are mapped to line segments, polygon s are mapped to polygons, and regions bounded by polygons are mapped t o regions bounded by polygons; if we know where the vertices go, we kn ow everything. Let's use these facts to draw the images of some polyg onal regions under a matrix map." }}{PARA 0 "" 0 "" {TEXT -1 57 " \+ First load the linear algebra and plotting libraries" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "with(plots):with(linalg):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 323 "verts0:=[[0,0],[1,0],[1,1],[0,1]]; \n #corners of unit square\nunitsquare:=polygonplot(verts0, colo r=`yellow`):\n #this command make a polygon and colors\n #th e region inside it yellow. Make sure\n #to end this command with a colon!\ndisplay(unitsquare); #Now semicolon! this command\n # shows the square" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 261 "When you executed the sequence of commands above you sho uld have gotten a picture of a yellow unit square. If it looks more r ectangular than square you can click on the plot, and then use the \"c onstrain\" plot option under the \"projection\" menu item. Try it. \+ " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 96 " Now \+ we will use a linear map with matrix A defined below to map this squar e to a parallelegram:" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 83 "A:= matrix([[3,2],[-1,1]]); #the matrix of our\n #random linear tra nsformation" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "f:=x->evalm( A&*x); #our linear map f(x)=Ax" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 159 "1a) For our map f(x)=Ax defined above, w hat are the images of the vectors e1=[1,0] and e2=[0,1]? How do you f ind these images from the rows or columns of A? " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 259 "" 1 "" {TEXT -1 376 "We use the ``map'' command below to see where the vertic es of the unit square are sent by f. The syntax is to put the mapping function in as the first argument, and the list of input vectors as t he second argument. The result of the command will be the list of out put vectors. Check (not to hand in) that this is what happens below t o the four points in the list verts0. " }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 186 "verts1:=map(f,verts0); #use f to map the vertex set \+ to its image\nimage1:=polygonplot(verts1, color=`red`):\ndisplay(\{uni tsquare,image1\}); #show the unit square S and its\n #image f(S). " }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 281 "1b) Explain where f(e1) and f(e2) (which you identified in 1a) are repre sented in the picture you just made. Again, you may want to \"constra in\" the plot to make the x and y scales the same. Otherwise Maple sc ales the x and y-axes to make the picture fit nicely onto your screen. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 361 "1c) If we compute f(f(x)):=f^2(x), then \+ what will the matrix be for the resulting linear transformation? Work \+ your answer out by hand, and explain how you got it in your solution f ile. After answering that question, make the vertices for f(f(unitsqua re)) as follows, and draw the corresponding image polygons. Hopefully what you get agrees with your hand work." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 101 "verts2:=map(f,verts1);\nimage2:=polygonplot(verts2,` color`=blue):\ndisplay(\{unitsquare,image1,image2\});" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 90 "What do the columns \+ of the matrix for f^2 have to do with the picture you just made above? " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 160 "1d) \+ What is the inverse function to f? Hint : what is its matrix? Use M aple commands to verify that the inverse mapping takes image1 back to \+ the unit square." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 11 "" 1 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 279 144 "2) Translations of obje cts are mapped to translations of the image objects and scalings of ob jects are mapped to scalings of the image objects: " }{TEXT -1 1 " " } }{PARA 0 "" 0 "" {TEXT -1 150 " First let's review (or explain) wh at we mean by an ``object'' and by translations and scalings of an obj ect. An object is some set S of points " }{TEXT 280 1 "s" }{TEXT -1 64 ". By the image of S we mean the collection of image points f(" }{TEXT 281 1 "s" }{TEXT -1 112 ") . We write f(S) for this image (lik e we did for the line L and its image f(L) iin problem 1). Similarly if " }{TEXT 282 1 "b" }{TEXT -1 44 " is a translation vector, then th e object S+" }{TEXT 283 1 "b" }{TEXT -1 30 " means all points of the f orm " }{TEXT 285 1 "s" }{TEXT -1 1 "+" }{TEXT 284 1 "b" }{TEXT -1 7 " \+ where " }{TEXT 286 1 "s" }{TEXT -1 95 " is in S. If c is a scalar, th en the scaled (or dilated) set cS means all points of the form c" } {TEXT 287 1 "s" }{TEXT -1 8 ", where " }{TEXT 288 1 "s" }{TEXT -1 9 " \+ is in S." }}{PARA 0 "" 0 "" {TEXT -1 66 " Now, if we apply the lin ear map f to the translated object S+" }{TEXT 289 1 "b" }{TEXT -1 33 " we get all points of the form f(" }{TEXT 290 1 "s" }{TEXT -1 1 "+" } {TEXT 291 1 "b" }{TEXT -1 4 ")=f(" }{TEXT 292 1 "s" }{TEXT -1 2 ")+" } {TEXT 293 1 "b" }{TEXT -1 8 ", where " }{TEXT 296 1 "s" }{TEXT -1 58 " is in S (since f is linear), i.e. exactly the set f(S)+f(" }{TEXT 294 1 "b" }{TEXT -1 62 "), which is the translation of the image f(S) \+ by the vector f(" }{TEXT 295 1 "b" }{TEXT -1 94 "). Similarly, if we \+ apply f to the scaled set cS be get f(cS) to be the set of all points \+ f(c" }{TEXT 297 1 "s" }{TEXT -1 5 ")=cf(" }{TEXT 298 1 "s" }{TEXT -1 68 ") (since f is linear), i.e. the scaling cf(S) of the image set f(S )." }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 107 " Here's how to transla te and scale the unit square from #1: Let's translate it by the vecto r b=[2,3]:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 144 "b:=[2,3];\nt rans:=x->evalm(x+b);\nverts3:=map(trans,verts0);\nimage3:=polygonplot( verts3,color=`yellow`):\n #colon!\ndisplay(unitsquare,image3);" } }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 42 "Here's how to scale it by a factor of 0.2 :" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 129 "c:=0.2;\nshrink:=x->ev alm(c*x);\nverts4:=map(shrink,verts0);\nimage4:=polygonplot(verts4,col or=`red`):\ndisplay(\{image4,unitsquare\});" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 199 "(By the way, when I do the com mand above the little square gets hidden behind the big one, except fo r its outline. One way to see all of it is to uncolor the big one, bu t you don't have to do this.)" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 375 "2a) Describe where you expect the trans lated unit square, image3 above, to be mapped by our linear map f fr om problem 1. Then use the ``map'' command and the ``trans'' command, as well as polygonplot and display, to make a picture of the images o f the unit square and its translation when they are mapped by f . Ver ify that the images differ by the expected translation." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 139 "2b) Describe what you expect the image of the scaled do wn square above to be when you apply f , and then draw a picture illus trating this." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 299 42 "3) Special linear transformations in R^2:" }}{PARA 0 "" 0 "" {TEXT 300 14 "3a) Rotations:" }{TEXT -1 47 " The matrix for rotating \+ by an angle theta is:" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 71 "Rot :=theta->matrix([[cos(theta),-sin(theta)],[sin(theta),cos(theta)]]);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%$RotGR6#%&thetaG6\"6$%)operatorG%& arrowGF(-%'matrixG6#7$7$-%$cosG6#9$,$-%$sinGF3!\"\"7$F6F1F(F(F(" }}} {PARA 0 "" 0 "" {TEXT -1 55 "so to rotate the vector (2,3) by Pi/3, we would command" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "Rot(theta) ;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#-%'matrixG6#7$7$#\"\"\"\"\"#,$*$- %%sqrtG6#\"\"$F)#!\"\"F*7$,$F,F(F(" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "theta:=Pi/3;\nevalm(Rot(theta)&*[2,3]);\n" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%&thetaG,$%#PiG#\"\"\"\"\"$" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#-%'vectorG6#7$,&\"\"\"F(*$-%%sqrtG6#\"\"$F(#!\"$\" \"#,&F)F(#F-F0F(" }}}{PARA 0 "" 0 "" {TEXT -1 148 "You are asked below to draw a picture of the unit square rotated by Pi/3 radians. The fo llowing questions are also included in the answer template:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 301 18 "3b) Reflectio ns: " }{TEXT -1 402 " Define matrices which give reflections across th e x-axis, across the y-axis, and across the line y=x. Illustrate what each of these linear maps does to the unit square. Finally, verify w ith Maple that reflecting across the line y=x is the composition of f irst rotating Pi/4 in the clockwise direction, then reflecting across \+ the x-axis, then rotating (back ) Pi/4 in the counterclockwise directi on." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" } }{PARA 0 "" 0 "" {TEXT 302 30 "3c) Translations and scalings" }{TEXT -1 273 " revisited: Explain why a translation by a non-zero map is NO T LINEAR. (Show that the definition of linear does not hold.) On the other hand, explain why scaling IS a linear map and exhibit its matr ix. (This is a book homework problem disguised in a computer project. )" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT 306 3 "3d)" }{TEXT -1 10 " You can " }{TEXT 303 26 "scale by different factors" }{TEXT -1 170 " in the x and y-dir ections. For example, what matrix expands the x-direction by 3 and th e y-direction by 2? Make a picture of what this scaling does to the u nit square." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 304 16 "3e) Projections" }{TEXT -1 152 ": Write down the matrix which projects points onto the x-axis. \+ Illustrate what this projection map does to the unit square. Is there an inverse map? " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 305 11 "3f) Shears:" }{TEXT -1 67 " A shear of strength k in th e x-direction is defined by the matrix" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "Shear:=k->matrix([[1,k],[0,1]]);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%&ShearGR6#%\"kG6\"6$%)operatorG%&arrowGF(-%'matrixG6# 7$7$\"\"\"9$7$\"\"!F1F(F(F(" }}}{PARA 0 "" 0 "" {TEXT -1 167 "For k=1 \+ explore what the shear map does to the unit cube. What happens if you apply the shear map twice? Three times? What is the inverse map of \+ a strength k shear?" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 " " {TEXT 307 11 "3g) Movies" }{TEXT -1 529 ": As you discovered in (3 f), composing a shear with itself is another shear of twice the streng th. Make the following movie; it's a tiny indication of how computers and sequences of transformations can be used to make moving pictures. I stole the code from chapter 5 of the text ``Multivariable Mathemati cs with Maple'', by Carlson and Johnson. All you have to do is execut e it. You should, however, pause to think about what the commands are doing. This problem is for your enjoyment; there is nothing to han d in from 3g." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 555 "iter:= pro c(g,s,n) #take a set of points s and\n # apply the map g to it n times in a row.\n # Save the (n+1) sets which you generate in\n \+ # an array called d. Then convert d into a\n # list. \nlocal d,i; #local variables won't pollute your use\n #of the same let ters elsewhere \nd:=array(0..n);\nd[0]:=s;\nfor i from 1 to n do\n d[ i]:=map(g,d[i-1]); #apply the map g to the\n #set you have at sta ge i-1 to get the set\n #at stage i.\nod;\nconvert(d,list); #beca use you use a ``list'' data\n #structure in the next routine.\nend :" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 330 "film:=proc(d) #make a sequence of polygonplots\n #from a sequence of vertex sets like the\n #one you can generate above using iter. In the\n #end \+ you can view your film with the display\n #command.\nlocal i,j,n,F ;\nn:=nops(d);\nF:=array(1..n);\nfor i from 1 to n do\n F[i]:=polygo nplot(d[i]);\nod;\nconvert(F,list);\nend:" }}}{PARA 0 "" 0 "" {TEXT -1 81 "Now we use the two subroutines above to make a movie of a squar e getting sheared." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 142 "k:=0. 1; #make a film of iterated shears\n #where the shear strength of one step is 0.1\ng:=x->evalm(Shear(k)&*x); #the mapping function " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 162 "steps:=iter(g,verts0,2 0); #make a list of 20 sets\n #of vertices, starting with the uni t cube vertex\n #set and applying the shear 20 times in succession . " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 279 "display(film(steps), insequence=true);\n #a movie of a square getting squashed sideway s.\n #Use your menu options to view the movie.\n #The command \+ insequence=true means you want\n #to see the frames in sequence, r ather than\n #a display of all the frames at once." }}{PARA 13 "" 1 "" {TEXT -1 0 "" }}}{PARA 260 "" 0 "" {TEXT 308 15 "Answer Template " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 172 "1a) \+ For the map f(x)=Ax defined in part (1) above, what are the images of the vectors e1=[1,0] and e2=[0,1]? How do you find these images from the rows or columns of A? " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 275 "1b) Reproduce the Maple comma nds and picture you made in part (1) of the unit square and its image \+ under f. Explain where f(e1) and f(e2) (which you identified in 1a) a re represented in the picture you just made. \"Constrain\" the plot t o make the x and y scales the same. " }}{PARA 0 "" 0 "" {TEXT -1 0 " " }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 403 "1c) If we compute f(f(x) ):=f^2(x), then what will the matrix be for the resulting linear trans formation? Work your answer out by hand, and explain how you got it . \+ After answering that question, make the vertices for f(f(unitsquare)) \+ as you did above in part (1), and draw the corresponding image polygon s by pasting in the appropriate Maple commands. Hopefully what you ge t agrees with your hand work." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 160 "1d) What is the inverse funct ion to f? Hint : what is its matrix? Use Maple commands to verify th at the inverse mapping takes image1 back to the unit square." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" } }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 384 "2a) D escribe where you expect the translated unit square, image3 in part (2 ) above, to be mapped by our linear map f from part 1. Then use the ``map'' command and the ``trans'' command, as well as polygonplot and display, to make a picture of the images of the unit square and its t ranslation when they are mapped by f . Verify that the images differ \+ by the expected translation." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 194 "2b) Describe what you expect \+ the image of the scaled down square (by a factor of 0.2) to be in part (2) above, you apply f , and then draw a picture illustrating that yo ur reasoning is correct." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" } }{PARA 0 "" 0 "" {TEXT -1 62 "3a) Draw a picture of the unit square ro tated by Pi/3 radians." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" } }{PARA 0 "" 0 "" {TEXT 309 17 "3b) Reflections:" }{TEXT 314 1 " " } {TEXT -1 402 " Define matrices which give reflections across the x-axi s, across the y-axis, and across the line y=x. Illustrate what each o f these linear maps does to the unit square. Finally, verify with Map le that reflecting across the line y=x is the composition of first ro tating Pi/4 in the clockwise direction, then reflecting across the x-a xis, then rotating (back ) Pi/4 in the counterclockwise direction." }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 310 30 " 3c) Translations and scalings" }{TEXT -1 273 " revisited: Explain wh y a translation by a non-zero map is NOT LINEAR. (Show that the defin ition of linear does not hold.) On the other hand, explain why scali ng IS a linear map and exhibit its matrix. (This is a book homework p roblem disguised in a computer project.)" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 313 3 "3d)" }{TEXT 315 2 " " }{TEXT -1 7 "You can" }{TEXT 317 1 " " }{TEXT 311 26 "scale by different factors " }{TEXT -1 170 " in the x and y-directions. For example, what matrix expands the x-direction by 3 and the y-direction by 2? Make a pictur e of what this scaling does to the unit square." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 312 16 "3 e) Projections" }{TEXT 316 3 ": " }{TEXT -1 149 "Write down the matr ix which projects points onto the x-axis. Illustrate what this projec tion map does to the unit square. Is there an inverse map? " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" } }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 318 11 "3f) Sh ears:" }{TEXT 319 1 " " }{TEXT -1 66 " A shear of strength k in the x- direction is defined by the matrix" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "Shear:=k->matrix([[1,k],[0,1]]);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%&ShearGR6#%\"kG6\"6$%)operatorG%&arrowGF(-%'matrixG6# 7$7$\"\"\"9$7$\"\"!F1F(F(F(" }}}{PARA 0 "" 0 "" {TEXT -1 167 "For k=1 \+ explore what the shear map does to the unit cube. What happens if you apply the shear map twice? Three times? What is the inverse map of \+ a strength k shear?" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 261 "" 0 "" {TEXT -1 0 "" }}}{MARK "5 \+ 2" 422 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }