Dimensionality
Previously, we introduced the concept of linear transformations. We ran through a few examples in 2D to aid our understanding. In this section, we will extend our discussion to different dimensions.
Table of Contents
Linear Transformations in 3D
In 2D, we had linear transformations that mapped vectors from 2D to 2D.
Symbolically, we explored transformations of the form
We visualized these transformations by observing how it transformed the coordinate grid in 2D:
It's important to note that in this visualization, each point on the grid is simply a condensed representation of a vector with the tip at that point. The transformation is applied to each of these vectors, and we visualize that by observing how they physically move.
2D linear transformations can be represented by a
In 3D, things are very similar, except we are now working with vectors in
2D | 3D |
---|---|
Below is a visualization of a 3D linear transformation. They're notably harder to visualize, but we can still observe how the transformation affects the coordinate grid:
In this transformation, the basis vectors
Recall that after a linear transformation, a vector
Generalizing, if we have any
Linear Transformations Between Dimensions
The linear transformations that we've discussed so far have been between the same dimensions. This means that if you give the transformation a 2D vector, it will output a 2D vector, and likewise for 3D vectors. This does not have to be the case - we can have linear transformations that map vectors from one dimension to another. (In an even more general sense, we can have linear transformations that map vectors from any vector space to another.)
Consider a linear transformation that takes a 2D vector and outputs a 3D vector:
In a visual sense, this transformation can be thought of as taking a 2D vector and "lifting" it into 3D space. When applying transformations like this to the coordinate grid, it's less helpful to think of "moving" vectors. Instead, let's place a 2D grid and a 3D grid side by side, and observe the basis vectors on both:
Alternatively, we can place a copy of the 2D grid on the
We can go the other way as well: a linear transformation that takes a 3D vector and outputs a 2D vector:
This transformation can be thought of as "flattening" a 3D vector into 2D space. These flattening and lifting transformations are common in computational stuff. For instance, in games and graphics, we have a virtual 3D world that we need to project onto a 2D screen. This is done by a transformation that takes 3D vectors and outputs 2D vectors. This is also why GPUs can be thought of as specialized hardware for performing matrix and vector operations.
Nonsquare Matrix Representation
If we want to represent the transformation in the previous example with a matrix, we will do what we did before: place the coordinates of each basis vector in a column.
In the transformation,
Notice that our matrix is no longer square. Instead, it has
Transformation Compatibility
When we have a linear transformation that maps vectors from one dimension to another, we need to ensure that the dimensions of the matrix match the dimensions of the input and output vectors.
For example, if we have a linear transformation mapping from
More generally, if we have a linear transformation mapping from
- Each column represents a transformed basis vector. Since the input vector has
components, the matrix must have basis vectors, so it must have columns. - Each row represents one component of the transformed basis vector. The output vector has
components, so the matrix must have rows.
The input to this transformation must have
Summary and Next Steps
In this section, we extended our discussion of linear transformations to different dimensions.
Here are the key points to remember:
-
Linear transformations can map vectors from one dimension to another.
-
The matrix representation of a linear transformation must have dimensions that match the input and output vectors.
More specifically, if we have a linear transformation mapping from
to , the matrix representing the transformation must have rows and columns. This matrix is known as a matrix.
In the next section, we will explore how we can combine multiple linear transformations and multiply matrices to represent these transformations.