Change basis effect
Use the mouse to move the dots to change the basis B, transformation T, and transformed point w. Note that changing B does not change where w is, but changes how it is written.
Note that the transformation T is determined by the images of the basis elements B.
v0
v1
T(v0)
T(v1)
w
T(w)
Basis B={v0,v1}
wrt standard basis:
v0 = (1,0)
v1 = (0,1)
w wrt B:
w = (1,1)B
linear transformation T
wrt
B:
1v0
1v1
1T(v0)
1T(v1)
1
0
0
1
1
0
0
1
initial graph
transformed graph
mouse:
Note on controls: click on a dot to toggle moving that dot.
Then mouse will move that dot, even if mouse is not down.
To release the dot, click again where you want it to be positioned. You
can't move another dot until you click the mouse to put the
moving dot down. You can move dots labled v0,
v1, w,
T(v0),
T(v1). The position of T(w) is determined by the position of
w, and the map T. Changing v0 or
v1 does not change w, only how w is written in terms of them.
The point of this graphic is to illustrate writing linear transformations
with respect to different basis.
Our basis is the set B= {v0,
v1}, given by the red and blue points. These can be moved to
define a different basis by using the mouse.
The green point is a point w in our space.
When the basis changes, how we write w in terms of
{v0,
v1} changes, but w stays in the same place; changing basis doesn't change w, it just changes how w is written in terms of the basis.
w can be moved to a
different point with the mouse.
The transformation T can be described by a matrix. The matrix is written
in terms of the basis {v0,
v1}. The images of these two vectors are
{u0,
u1}, given by magenta and cyan dots. These are
{T(v0),
T(v1)},
These points determine the transformation, and can be moved by the mouse
to determine a different transformation. The image of w
is T(w).
T is a linear map, which means that the relationship between
T(w) and {T(v0),T(v1)} is the same as the
relationship between
w and {v0,v1}. This is why a linear map is
represented by a matrix with columns just the images of the basis vectors.
The point of the random blob shape is that the transformation T
(determined by moving T(v0) and T(v1))
is applied to this blob, and so you can see from how it is transformed what the action of
T is, e.g., the vectors T(v0) and T(v1)) can be chosen to
scale, rotate, reflect, or apply some other linear transformation to the shape.
The shape is attached to the point w, so if it is moved, the shape moves.
In this example, both source and target spaces use the same basis B.
You might choose different basis for these spaces,
to give other ways of writing T.
If we took the source basis to be {v0,v1}
and the target basis to be {T(v0),T(v1)}, then
the transformation matrix with respect to these basis would just look like
the identity matrix. But it's subtly different from the identity, because
the identity matrix usually is thought of as mapping a space to
itself, but in this case, it would map between two different spaces when
the additional structure of the basis is taken into account.
In the picture on this page, the same basis is used for source and target,
which is indicated by the same underlying graph paper background.
If you want to be able to compose transformations by multiplying their
matrices, you need to keep to the same basis, or make sure
to carefully match up source and target basis when composing.
Practically, in this example, how is T(w) computed, given
the values of v0,
v1, w,
u0,
u1, given by the user?
All these points are initially given in terms of a standard basis.
(Actually we need to take into account transforming from the space of
the mouse coords in pixels, to the local coordinate spaces for the
two graphs, but let's assume this is already done, and describe the
linear algebra from there on. )
We want a linear map T satisfying
T(v0)=u0 and
T(v1)=u1.
It's easy to write a map (in standard basis)
taking (1,0) and (0,1) to v0 and v1; it is a matrix
M1 with columns v0 and v1.
Similarly, we have a matrix
M2 with columns u0 and u1.
so, the matrix we want is T = M2M1-1, and the point T(w) is in terms of the standard basis, given by
M2M1-1(w).