Math 307 Spring, 2005 Hentzel Time: 10:00 to 10:50 MWF Room: 205 Carver Hall Instructor: Irvin Roy Hentzel Office 432 Carver Phone 515-294-8141 E-mail: hentzel@iastate.edu http://orion.math.iastate.edu/hentzel/class.307.05 Text: Linear Algebra and its Applications, Third Edition David C. Lay Monday, January 21 1.6 Page 90 Problem 15,16 Page 99 Problem 1 Page 101 Problem 12 Main Idea: Matrices can stretch things out and twist them around. Key Words: Linear Transformation, Domain, Codomain, Rotation. Goal: Set up the matrix which does a Linear Transformation. ------------------------------------------------------------ New Material: | a | |a+b+c| f| b | = |2a+3c| | c | |3b-c | Express f as a matrix. Simply put the necessary coefficients into the matrix A so that you get the correct output. | 1 1 1 || a | | a +b +c | | 2 0 3 || b | | 2a +3c | | 0 3 -1 || c | | 3b - c | --------------------------------------------------------- One has 3 piles of sand. The numbered arrows tell what fraction of the pile is given to the other piles. Write out the transition matrix. _______ 0.4 _______ | | ---> | | | A | ----------------- | B | |_____| <--- |_____| \ __ 0.3 / \ |\ / \ \ \0.6 __ / 0.2 \ \ \ 0.1 /| / _\| \ / / / 0.5 \ / |/_ \ ________ / \| |/ | C | |______| Anew = 0.3 B + 0.6 C + 0.4 A Bnew = 0.4 A + 0.1 C + 0.2 B Cnew = 0.5 B + 0.2 A + 0.3 C | Anew | | 0.4 0.3 0.6 | | A | | Bnew | = | 0.4 0.2 0.1 | | B | | Cnew | | 0.2 0.5 0.3 | | C | Notice that the column sums all equal 1. This means that no material is lost or gained, the matrix just redistributes the material amoung the three boxes. ------------------------------------------------------- A = {{0.4,0.3,0.6},{0.4,0.2,0.1},{0.2,0.5,0.3}}; 2 0.4 0.48 0.45 A = 0.26 0.21 0.29 0.34 0.31 0.26 3 0.442 0.441 0.423 A = 0.246 0.265 0.264 0.312 0.294 0.313 4 0.4378 0.4323 0.4362 A 0.2572 0.2588 0.2533 0.305 0.3089 0.3105 10 0.435898 0.435898 0.435896 A 0.256409 0.256411 0.256411 0.307693 0.307691 0.307693 -------------------------------------------------------- Write a matrix that flips elements on the xy plane about the x-axis. | | (x,y) | /|\ | | ------------------------+----------------|---------- | | | \|/ | (x,-y) | | | x | ----> | x | | y | | -y | A = | 1 0 | | 0 -1 | ----------------------------------------------------- Write a matrix that flips elements on the xy plane about the y-axis. | (-x,y)<-------------->(x,y) | | | -------------------------+------------------------- | | | | | | x | -----> | -x | | y | | y | A = | -1 0 | | 0 1 | --------------------------------------------------- Write a matrix that rotates elements on the xy plane 90 degrees counter clockwise. | . | ._ . | | . . | . \./ | . -------------------+-------->--------------- | | | | 1 | ----> | 0 | | 0 | | 1 | | 0 | ----> | -1 | | 1 | | 0 | | x | ----> | -y | | y | | x | A = | 0 -1 |. | 1 0 | ------------------------------------------------ Write a matrix that rotates an element through an angle theta in the counter clockwise direction. . . |. ' | . .'-- | / '. . | / '.__ . | / /. ' . t| / . ' . |/ t . ---------------------+------------------------ | | | | 1 | ----> | Cos[t] | | 0 | | Sin[t] | | 0 | ----> |-Sin[t] | | 1 | | Cos[t] | | x | ----> | x Cos[t] -y Sin[t] | | y | | x Sin[t] y Cos[t] | A = | Cos[t] - Sin[t] | | Sin[t] Cos[t] | ------------------------------------------------- Application: Rotate the square {0,0},{0,2},{2,2},{2,0} Through an angle of 30 degrees. A = | Sqrt[3]/2 -1/2 | | 1/2 Sqrt[3]/2 | The new corners are {0,0},{-1,Sqrt[3]},{Sqrt[3]-1,Sqrt[3]+1}, {Sqrt[3],1} ----------------------------------------------------- A = {{Sqrt[3]/2,-1/2},{1/2,Sqrt[3]/2}}; a = ListPlot[{{0,0},{0,2},{2,2},{2,0},{0,0}}, PlotJoined->True,AspectRatio->Automatic]; b = ListPlot[{A.{0,0},A.{0,2},A.{2,2},A.{2,0},A.{0,0}}, PlotJoined->True,AspectRatio->Automatic, PlotStyle->{RGBColor[1,0,0]}]; c = ListPlot[ {A.A.{0,0},A.A.{0,2},A.A.{2,2},A.A.{2,0},A.A.{0,0}}, PlotJoined->True,AspectRatio->Automatic, PlotStyle->{RGBColor[0,1,0]}]; d = Show[a,b,c]; Display["square.ps",d]; ------------------------------------------------------ We can do the same thing in three dimensions. We can project three dimensional points onto the xy plane with a matrix. A = | -1/2 1 0 | | -1/2 0 1 | A is a 2x3 matrix. A point is a 3-tuple which is a 3x1 matrix. Applying A to the point gives a 2x1 matrix which is a point in the xy plane. What is the image of the unit cube { {0,0,0}, {0,1,0}, {1,1,0}, {1,0,0}, {0,0,1}, {0,1,1}, {1,1,1}, {1,0,1}} --------------------------------------------------- A = {{-1/2,1,0},{-1/2,0,1}}; T = Table[0,{i,1,12}]; T[[1]] = Line[ {A.{0,0,0}, A.{0,0,1}} ]; T[[2]] = Line[ {A.{0,0,0}, A.{0,1,0}} ]; T[[3]] = Line[ {A.{0,0,0}, A.{1,0,0}} ]; T[[4]] = Line[ {A.{1,0,0}, A.{1,1,0}} ]; T[[5]] = Line[ {A.{1,0,0}, A.{1,0,1}} ]; T[[6]] = Line[ {A.{0,1,0}, A.{1,1,0}} ]; T[[7]] = Line[ {A.{0,1,0}, A.{0,1,1}} ]; T[[8]] = Line[ {A.{0,0,1}, A.{1,0,1}} ]; T[[9]] = Line[ {A.{0,0,1}, A.{0,1,1}} ]; T[[10]] = Line[ {A.{1,1,0}, A.{1,1,1}} ]; T[[11]] = Line[ {A.{1,0,1}, A.{1,1,1}} ]; T[[12]] = Line[ {A.{0,1,1}, A.{1,1,1}} ]; d = Show[Graphics[T],PlotLabel->" = {{-1/2,1,0},{-1/2,0,1}} "]; Display["cube.ps",d]; ------------------------------------------------------------ An easy way to set up a matrix is to find out where you want these vectors to go and use that as the matrix. | 1 | | 0 | | 0 | | 0 | | 0 | | 1 | | 0 | | 0 | | 0 | | 0 | | 1 | | 0 | . . . . . . . . . . . . | 0 | | 0 | | 0 | | 1 | Notice that | | | | . | | | 0 | | | | | C1 C2 C3 . Cn | | 0 | = | Ci | | | | | | | | . | | | | | 1 | | . | | . | | 0 | -------------------------------------------------------------- Explain what this linear transformation does. | 1 2 3 | | 4 5 6 | | 7 8 9 | | 1 | | 1 | It sends | 0 | to | 4 |. | 0 | | 7 | | 0 | | 2 | It sends | 1 | to | 5 |. | 0 | | 8 | | 0 | | 3 | It sends | 0 | to | 6 |. | 1 | | 9 | -------------------------------------------------------------