It’s Professor Dave, let’s talk about linear transformations.
We’ve already learned about vector spaces, so it’s time to talk about linear transformations
on vector spaces.
These transformations can be thought of more or less as functions on vector spaces.
Let’s take a closer look now.
Building on what we learned years ago in algebra, whereas a function f(x) will take some value
x and transform it into a new value, a linear transformation L(v) will take the vectors
in a vector space and transform them into new vectors.
The biggest difference here is that the transformed vector will not always be the same kind of
vector we started with.
For example, we could start with v in the vector space of vectors of length 2, R2, and
end up with a scalar.
Or we could start with 2 by 2 matrices and end up with a vector of length 3, and so on.
In this way, a linear transformation can be said to “map” one vector space V to another
vector space W. This is denoted as L colon, V to W. The linear transformation will only
take in vectors from the vector space V, and will always give back vectors from the space
W. For example in “mapping” L: R2 → R, this will only take in vectors of length two,
and it will give back scalars.
While linear transformations are flexible in mapping from one vector space to another,
it is still possible to map back to the same vector space, which would be represented as
L: V → V.
There are two important properties for these transformations to qualify as linear.
First, transforming the product of a vector v and a scalar c is the same as the product
of the scalar and the transformation of the vector v. Second, the transformation of the
sum of two vectors, v and w, is the same as the sum of the transformation of each vector.
These are the requirements that must be satisfied in order to be a linear transformation.
As an example of what a linear transformation might look like, consider the mapping L: R2
→ R3 given as follows.
L(v) will take in vectors of length two (v1, v2), and will give back vectors of length
three given by (v2, v1 + v2, v1 - v2).
Let’s go ahead and verify that this is a linear transformation.
First we will multiply the vector v by a scalar c, and see if the transformation of the product
can be written as cL(v).
Multiplying the vector v by c, our new vector become (cv1, cv2).
Once we transform this new vector we get (cv2, cv1 + cv2, cv1 - cv2).
We can factor out the c from each element of the vector, and then pull the scalar out
of the vector to obtain c times (v2, v1 + v2, v1 - v2).
We already know that this vector is just the linear transformation of the vector v, so
we can write this as cL(v).
We have verified the first requirement.
Next we must check that the transformation of the sum of two vectors, v and w, can be
written as the sum of the transformation of each individual vector.
Letting v = (v1, v2) and w = (w1, w2), then the sum is simply v + w = (v1 + w1, v2 + w2).
When we stick this new vector into our transformation we obtain [(v2 + w2), (v1 + w1) + (v2 + w2),
(v1 + w1) - (v2 + w2)].
Using the associative property of addition, we can rearrange this into (v2 + w2), (v1
+ v2) + (w1 + w2), (v1 - v2) + (w1 - w2)].
We can then split this into the sum of two vectors (v2, v1 + v2, v1 - v2) + (w2, w1 +
w2, w1 - w2).
Each of these is simply the transformation of the vectors v and w, meaning we can write
them as L(v) + L(w).
We have now satisfied the second requirement and demonstrated that this is in fact a linear
transformation.
As we might recognize, the conditions for linearity can be thought of as relating to
the commutativity of operations.
The first requirement is essentially saying that the processes of scalar multiplication
and applying the function commute, and the second requirement is saying that the processes
of vector addition and applying the function commute.
This is just like the commutativity of adding or multiplying numbers, the order shouldn’t matter.
A useful thing we can do with linear transformations that map Rn to Rm is representing them as
a matrix.
So a linear transformation of a vector, L(v), can be written as an m by n matrix A multiplied
by v. In order to get this matrix, all we must do is transform the standard basis of
Rn and that will make up the columns of our matrix A. To see this in action, let’s once
again consider our linear transformation from R2 to R3: L(v) = (v2, v1 + v2, v1 - v2).
Since we start with vectors from R2, we want to transform the standard R2 basis vectors,
(1, 0) and (0, 1).
Transforming (1, 0), we get (0, 1 + 0, 1 - 0) = (0, 1, 1).
Transforming (0, 1), we get (1, 0 + 1, 0 - 1) = (1, 1, -1).
These two vectors will be the columns for our matrix, giving us (0, 1 ; 1, 1 ; 1, -1).
We can verify that multiplying our vector v by this matrix will give us our linear transformation.
A times v gives us (0, 1 ; 1, 1 ; 1, -1) times (v1, v2).
Going through the matrix multiplication we get [0(v1) + 1(v2), 1(v1) + 1(v2), 1(v1) - 1(v2)].
Simplifying, we get (v2, v1 + v2, v1 - v2) which is exactly the form of the linear transformation
we started with.
There are many practical applications of linear transformations, such as stretching and squishing
coordinate systems, reflecting and rotating them, as well as shifting them.
But now that we’ve laid down the basics, let's check comprehension.