Recommended resources
The freely available resources this lesson will direct you to.
Hello! Welcome to the fifth lesson in our foundational module on linear algebra.
In our last session, we formally defined matrix operations. We concluded with the powerful insight that matrix multiplication is not just an arbitrary computational rule, but rather the algebraic representation of composing successive linear transformations. This was a deliberate preview, as it perfectly sets the stage for today's topic.
Today, we will make this connection explicit. Our learning outcome is to define linear transformations and represent them using matrices. We will formally define what makes a function "linear" and then prove the fundamental result that any linear transformation between finite-dimensional vector spaces can be uniquely represented by a matrix. This bridges the gap between the abstract geometric idea of a transformation (like a rotation or shear) and the concrete computational object of a matrix.
1. What is a Linear Transformation?
A linear transformation is a special kind of function between two vector spaces that preserves the underlying vector space structure. This means it respects the two fundamental operations: vector addition and scalar multiplication.
Formally, let and be two vector spaces. A function is called a linear transformation (or linear map) if for any two vectors and any scalar , the following two conditions hold:
- Additivity:
- Homogeneity:
These two properties can be combined into a single statement: for any vectors and scalars .
Geometrically, these properties ensure that grid lines in the input space remain parallel and evenly spaced after the transformation, and the origin maps to the origin . This is because . Transformations like rotations, reflections, scaling, shears, and projections are all linear. A simple translation, where , is not linear because it does not map the origin to the origin.
2. From Linear Maps to Matrices: The Core Idea
The crucial link between a linear map and a matrix lies in a simple but profound observation: a linear transformation is entirely determined by its effect on the basis vectors of the domain.
To understand this foundational concept, we'll watch a segment from a video by Mathoma.
Geometric Algebra - The Matrix Representation of a Linear Transformation
This video clearly explains the central idea that to know what a linear transformation does to any vector, you only need to know what it does to the basis vectors.
Watch the segment from 02:56 to 04:04. Focus on the core argument: since any vector is just a linear combination of basis vectors, and the transformation is linear, we can determine the transformed vector by applying the transformation to the basis vectors and then taking the same linear combination.
This insight is the key to constructing a matrix representation. If we know where the basis vectors of our domain land in the codomain , we can use the coordinates of these transformed vectors to build a matrix.
3. Constructing the Matrix Representation
Let's formalize the construction. Suppose we have a linear transformation . Let be a basis for (an n-dimensional space) and be a basis for (an m-dimensional space).
-
Transform each basis vector of V: Apply to each basis vector from to get a set of vectors in .
-
Find the coordinates in W: For each transformed vector , find its unique coordinate representation in the basis . This means finding the scalars such that:
The coordinate vector of with respect to the basis is therefore the column vector:
-
Form the matrix: The matrix of the linear transformation with respect to the bases and , denoted , is the matrix whose -th column is the coordinate vector .
This matrix has a remarkable property: applying the transformation to a vector in the abstract vector space is equivalent to multiplying the matrix by the coordinate vector of .
This relationship is not an accident; it's the very reason matrix multiplication is defined the way it is. The following resource provides a rigorous proof of this equivalence, which is central to your learning goals.
This article from StatLect provides a formal definition of the matrix of a linear map and, crucially, contains a constructive proof for the proposition that a map is linear if and only if it has a matrix representation.
Please read the sections 'Introduction', 'Definition', 'A map is linear if and only if it transforms coordinates through a matrix', and 'Uniqueness...'. The proof in the third section is particularly important. Follow it carefully to see how the matrix is constructed from the transformed basis vectors and how this leads to the matrix-vector multiplication rule.
The article also proves that for a given linear map and chosen bases, this matrix representation is unique.
The Mathoma video you watched earlier also contains a full derivation of this matrix-vector product rule from first principles. Watching it now will reinforce the algebraic steps from the article with a clear, narrated explanation.
Geometric Algebra - The Matrix Representation of a Linear Transformation
This segment provides a complete derivation showing how the matrix representation naturally leads to the familiar rule for matrix-vector multiplication.
Watch the video from 04:04 to 21:44. The video first shows how to assemble the matrix (04:04-06:41). It then generalizes the notation and demonstrates with index manipulation how applying the transformation to an arbitrary vector becomes matrix-vector multiplication (06:41-21:44). This derivation is a perfect example of the mathematical rigor you are seeking.
Test your understanding!
Let be a linear transformation defined by .
Find the matrix representation of with respect to the standard bases for and . The standard basis for is , where is the vector with a 1 in the -th position and 0s elsewhere.
Show answer
To find the matrix representation, we need to find what the transformation does to the basis vectors of the domain, , and express the result in the coordinates of the codomain's basis, .
The standard basis for the domain is , where and .
-
Transform the first basis vector:
The coordinate vector of the result in the standard basis of is simply . This will be the first column of our matrix.
-
Transform the second basis vector:
The coordinate vector of the result in the standard basis of is . This will be the second column of our matrix.
-
Assemble the matrix:
The matrix of the transformation, , is formed by these column vectors:
This is the matrix that represents the linear transformation .
4. Basis Dependence and Isomorphism
An essential takeaway is that the matrix representation of a linear map is basis-dependent. The same linear transformation (e.g., a 90-degree rotation) will be represented by different matrices if you choose different bases.
Geometric Algebra - The Matrix Representation of a Linear Transformation
To make the concept of basis dependence concrete, this segment of the Mathoma video works through a 2D rotation example, deriving its matrix representation in two different bases and showing the results are different.
Watch the example from 36:07 to 44:54. Observe how the same rotation yields a simple matrix in the standard basis but a more complex one in a different, non-orthogonal basis.
This basis-dependence highlights a deeper concept: isomorphism. An isomorphism is an invertible linear map between two vector spaces. If such a map exists, the two spaces are called isomorphic, meaning they are structurally identical from a linear algebra perspective—they are just different "labelings" of the same underlying structure.
A key theorem states that two finite-dimensional vector spaces are isomorphic if and only if they have the same dimension. This is why any n-dimensional real vector space is isomorphic to . The map that takes a vector to its coordinate vector is an isomorphism. The study of linear transformations can thus be mapped entirely to the study of matrices acting on coordinate vectors in , which is a cornerstone of computational linear algebra.
Conclusion
In this lesson, we established the fundamental link between abstract linear transformations and concrete matrices.
Key Takeaways:
- A linear transformation is a function between vector spaces that preserves vector addition and scalar multiplication.
- Any linear map between finite-dimensional vector spaces has a unique matrix representation with respect to a chosen pair of bases (one for the domain, one for the codomain).
- The columns of this matrix are the coordinate vectors of the transformed basis vectors of the domain.
- Applying a linear transformation to a vector is equivalent to multiplying its matrix representation by the vector's coordinate vector.
- The matrix representation is dependent on the choice of bases.
This understanding is crucial. When you use a library like Scikit-learn or LangChain to process data, the data points are represented as vectors, and the algorithms you apply are often sequences of linear transformations represented by matrices.
In our next lesson, we will apply these concepts to solve systems of linear equations using matrix methods. We can now interpret a system not just as a set of equations, but geometrically: we are seeking the input vector which, after being transformed by the linear map represented by , results in the output vector .