Linear AlgebraLinear Transformations
Functions describe relationships between sets and thereby add dynamism and expressive power to set theory. Likewise, linear transformations describe linearity-respecting relationships between vector spaces. They are useful for understanding a variety of vector space phenomena, and their study gives rise to generalization of the notion of linear dependence which is very useful in numerical applications of linear algebra (including describing the structure of real-world datasets).
A linear transformation is a function from one vector space to another which satisfies . Geometrically, these are "flat maps": a function is linear if and only if it maps equally spaced lines to equally spaced lines or points.
In reflection along the line defined by , is linear because
Many fundamental geometric transformations are linear. The figure below illustrates several linear transformations (as well as one nonlinear one, for comparison) from the plane to the plane. The leftmost column shows a square grid of points, and the rightmost column shows the images of those points. The other columns show each point somewhere along the path from its original location in the domain to its final location in the codomain, to help you get a sense of which points go where.
This 3Blue1Brown video provides some helpful animated illustrations of linear transformations:
The rank of a linear transformation from one vector space to another is the dimension of its range.
If , then the rank of is 2, since its range is the -plane in .
Find the rank of the linear transformation which maps each vector to the closest point on the line . The rank is
Solution. The range of is the line , since every point in the plane maps to a point on this line, and every point on the line is the image under of infinitely many points in the plane (all of the points on the line
What are the ranks of the five transformations illustrated above?
- The rank of the rotation is
- The rank of the reflection is
- The rank of the scaling transformation is
- The rank of the shearing transformation is
- The rank of the projection is
The null space of a linear transformation is the set of vectors which are mapped to the zero vector by the linear transformation.
If , then the null space of is equal to , since if and only if for some .
Note that the range of a transformation is a subset of its
Because linear transformations respect the linear structure of a vector space, to check that two transformations from a given vector space to another are equal, it suffices to check that they map all of the vectors in a given basis of the domain to the same vectors in the codomain:
Exercise (basis equality theorem) Suppose that and are vector spaces and that and are linear transformations from to . Suppose that is a basis of and that for all . Show that for all .
Solution. Let be an arbitrary vector. Since is a basis, we can find coefficients such that . Since and are linear, we have
What is the dimension of the null space of the linear transformation ? What is the rank of ?
The dimension of the null space is
Solution. To find the dimension of the nullspace, let us first describe it explicitly. when , regardless of what is. Thus the nullspace is , which is just a line with basis vector . Thus, the dimension of the nullspace is . The range of is the plane, which has dimension .
We call the dimension of the null space of a linear transformation the nullity of the transformation. In the previous exercise, the rank and the nullity of add to
Theorem (Rank-nullity theorem) If and are vector spaces and is a linear transformation, then the rank of and the nullity of sum to the dimension of .
Proof. If we
of , then we claim that
is a basis for the
These vectors are linearly independent because
which in turn implies that is in the null space of . Since spans the null space of , this implies that is equal to the zero vector, and that in turn implies that all the weights are zero. This concludes the proof that
To see that
by linearity of . This shows that is in the
Since the list spans the range of and is linearly independent, it is a
Suppose you're designing an app that recommends cars. For every person in your database, you have collected twenty values: age, height, gender, income, credit score, etc. In your warehouse are ten types of cars. You envision your recommendation system as a linear transformation that takes in a person's data and then returns a number for each car, reflecting how well that car fits their needs. The rank of can be as high as ten, which we might summarize by saying that your recommendation system can have ten degrees of complexity.
After some time, you find that storing all twenty variables takes up too much space in your database. Instead, you decide to take those twenty variables and apply a linear aggregate score function , with the three output components corresponding to health, personality, and finances. You also compute a linear map that takes in these three aggregate scores and returns a vector of recommendation values. The total recommendation system is the composition . What is the maximum possible rank of ? What does this mean for the complexity of this recommendation system?
Solution. The image of the transformation is contained in the image of the transformation . As a result, the rank of is at most the rank of , which is at most three. By reducing your twenty basic variables to three combined scores, your recommendation system only has three degrees of freedom, and can therefore only distinguish customers along three axes.