Step-by-Step Gauss Elimination -- "stepgauss" Program
Visualizing Linear Transfor m ations in the Plane
Rotation by an Angle
First execute the commands in the following prodedures.
Warning, the protected names norm and trace have been redefined and unprotected
The following defines an asymetrical shape.
The following command plots the shape. Think of the corners of the shape as the tips of certain vectors. In order to draw the picture, we only have to tell maple what the corners are. The shape is a sequence of points in the plane. The polygon will be collection of line segments connecting one point to the next.
We would like to translate the shape by the rigid motion that rotates it in the plane by an angle theta. As seen in the book, we use the following matrix representation of the linear transformation.
|>||R:=theta->matrix(2,2,[cos(theta), -sin(theta), sin (theta), cos(theta)]);R(theta);|
Let's give the value Pi/3 to theta
The command trans(matrix, shape) defined above will tranform the shape under the linear transformation. Notice that it is multiplying the shape which is a list of points (vectors) by the matrix representing the transformation. The output, is a new list of points, giving the coordinates of where the corners of the transformed shape. Straight lines map to straight lines under linear transformations.
Straight lines get mapped to straight lines. In the example above, we are assuming that a linear transformation will always map a straight line to a new straight line. Lets explore this idea. Think of the points as the tips of two vectors, u and v . An arbitrary point on this line segment gets mapped to a point on the line segment joining the points which are the tips of the vectors T( u ) and T( v ). Here is the proof. If (x,y) is on the line segment joining u and v then,
[x,y] = u + c( v-u ). So T([x,y]) = T( u ) + c(T( v ) - T( u )), which is on the line joining T( u ) and T( v ).
Then we can plot the new shape using the plot command.
If we want to, we can plot them both in the same coordinate axes.
For which theta is R(theta) invertible? We notice that if sin(theta)=0 or cos(theta)=0 then R(theta) is invertible. If sin(theta)=cos(theta) not=0, R(theta) is invertible. And otherwise R(theta) is invertible with
Since it is invertible, we can represent it by a product of elementary matrices. We start off using stepgauss to find the first few row operations then continue to reduce R(theta) to reduced row echelon form. For each row operation used, we find the elementary matrix.
Starting column 1
Pivot at [1,1]
Add -sin(theta)/cos(theta) times row 1 to row 2
Starting column 2
Pivot at [2,2]
Row echelon form:
|>||E1 := matrix(2,2,[1,0,-sin(theta)/cos(theta),1]);|
|>||E2 := matrix(2,2,[1/cos(theta),0,0,1]);|
|>||E3 := matrix(2,2,[1,0,0,cos(theta)]);|
|>||E4 := matrix(2,2,[1,sin(theta)/cos(theta),0,1]);|
Thus the product E4 E3 E2 E1 is the inverse of R(theta)
Since the inverse of the inverse of R(theta) is R(theta) itself, we find that
inverse (R(theta)) = inverse (E4 E3 E2 E1)= inverseE1 inverse E2 inverse E3 inverse E4
the inverse of an elementary matrix is still an elementary matrix. So we can see R expressed as a product of elementary matrices as follows.
check to see that we did everything correctly
which is indeed R(theta) if you look at it right.
Each elementary matrix represents a certain kind of transformation. So now we can break down rotation by an angle theta into several components. on a given shape, you would first perform EE4 then EE3 then EE2 then EE1 So rotaion by an angle is equivalent to first
EE4 - a shear
EE3 - horizonal expansion
EE2 - vertical expansion
EE1 - another shear
We graph them one at a time
The boldfaced graph above is the same as newshape - which is the rotation of ASYshape by Pi/3
N. Eaton, 2002