Linear Algebra Powertool
Image of a Transformation
OnLine 3.3
Worksheet by Russell Blyth.
> restart: with(linalg): with(plots): with(plottools):
Warning, the protected names norm and trace have been redefined and unprotected
Warning, the name changecoords has been redefined
Warning, the name arrow has been redefined
Outline
This worksheet covers material similar to that covered in the On Line 3.3 section.
The basic objectives are:
Working with the image of a linear transformation
Let's define a random 2 x 3 matrix of rank 1. Recall how to do this from section 2.3.
>
A := randmatrix(1,3,entries=rand(-10..10));
A := stackmatrix(A,rand(-10..10)()*row(A,1));
Let's consider A as a matrix that represents a linear transformation T from
to
What is the dimension of the image of T? We'll investigate by creating 100 random points in
and finding and plotting the images of these 100 points under multiplcation on the left by the matrix A. First the 100 points:
>
setofpoints :=
{seq(vector(3,[rand(-10..10)(),rand(-10..10)(),rand(-10..10)()]),
i=1..100)}:
pointplot3d(setofpoints,view=[-10..10,-10..10,-10..10],
axes=normal,color=black);
Rotate the plot to see that the points are spread around in
.
Next, plot the images of these points:
>
setofimages := {seq(evalm(A&*setofpoints[i]),i=1..100)} minus {0}:
pointplot(setofimages,color=black);
Questions: why are you getting only a line segment for the image rather than a whole line? How can you get more of the line? What is the slope of the line (just note that the line does not have the slope it appears to have due to the scaling of the axes).
Next, let's look at the null space of A
> nullbasis:=nullspace(A);
Let's plot a few points in the nullspace by computing some random linear combinations of the basis elements.
>
nullpoints := {seq(evalm(rand(-10..10)()*nullbasis[1] +
rand(-10..10)()*nullbasis[2]),i=1..500)} minus {0}:
pointplot3d(nullpoints,view=[-10..10,-10..10,-10..10],
axes=normal,color=black);
Rotate the plot to see that the null space is a plane, and hence has dimension 2.
Exercise:
1) Now create a random 3x3 matrix B of rank 2. Repeat the calculations and plots performed above for the matrix A for your matrix B. Note that B represents a linear transformation from
to
, so all plots will be 3D plots.
>
>
>