Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 7

Introduction to Linear Transformations

Recommended resources

Hello! Welcome to the first lesson of our second module, "Linear Transformations and Matrices."

In our previous module, we built a solid foundation by exploring vector spaces, subspaces, and the structure of solution sets. We concluded by seeing that the solution to a system like can be seen as a geometric object—an affine subspace.

Now, we're going to shift our perspective, just as we previewed. Instead of thinking of as the left-hand side of an equation to be solved, we'll start viewing it as a function that takes an input vector and transforms it into an output vector . This is a profoundly important idea that connects the algebra of matrices to the geometry of space. It's the key to understanding how neural networks manipulate data and how quantum operators evolve physical systems.

Today, our goal is to define linear transformations and determine if a given function is linear. We will start by building a strong visual intuition for what "linear" means geometrically, and then connect that intuition to the formal mathematical definition.

1. What is a Transformation? A Visual Introduction

In linear algebra, "transformation" is essentially a synonym for "function," but it's used to evoke a sense of movement. A transformation takes an input vector and maps it, or "moves" it, to an output vector .

To understand a transformation's effect on the entire space, we can imagine it moving every point (or vector tip) in the space to its new location simultaneously.

Linear transformations and matrices

The 3Blue1Brown article, "Linear transformations and matrices", provides an excellent visual introduction to this idea. It helps build the intuition that your learning style favors.

Please read the first section, 'Transformations Are Functions'. Focus on the idea of visualizing a function of vectors as movement, and how observing a grid of points can help us understand the transformation as a whole.

While any function that maps vectors to vectors is a transformation, linear algebra focuses on a special, well-behaved class: linear transformations.

Visually, a transformation is linear if it adheres to two simple rules:

  1. All lines remain lines. The transformation can't curve or bend straight lines.
  2. The origin remains fixed. The point (or its higher-dimensional equivalent) must stay put.

This implies that grid lines must remain parallel and evenly spaced after the transformation.

Geometric Visualization of a Linear Transformation
This animation shows a linear transformation in action. Notice how the grid lines stretch and slant, but they remain straight, parallel, and evenly spaced. The origin also stays fixed at the center. This is the geometric essence of linearity.

Common examples of linear transformations that you can visualize include:

  • Scaling: Stretching or shrinking the entire space.
  • Rotation: Rotating the space around the origin.
  • Shearing: Pushing one part of the space in a direction parallel to an axis, like sliding the top of a deck of cards.

2. The Formal Definition of Linearity

The visual intuition is powerful, but we need a precise mathematical definition to work with. A transformation from a vector space to a vector space is linear if it satisfies two properties for all vectors in and any scalar :

  1. Additivity:

    • In words: The transformation of a sum of two vectors is the same as the sum of their individual transformations. You can either add the vectors first and then transform, or transform them first and then add.
  2. Homogeneity (Scalar Multiplication):

    • In words: The transformation of a scaled vector is the same as scaling the transformed vector. You can either scale first and then transform, or transform first and then scale.

These two algebraic rules are what enforce the geometric picture of "grid lines stay parallel and evenly spaced."

Oxford Linear Algebra: Linear Transformations Explained

This video from the "Oxford Linear Algebra" series provides a concise and clear explanation of this formal definition.

Watch the section from 0:27 to 2:52. It lays out the two defining properties of a linear transformation and explains how they preserve the essential structure of a vector space.

A More Efficient Test

Checking two separate properties can be tedious. Luckily, they can be combined into a single, equivalent condition:

A transformation is linear if and only if

for all vectors and all scalars . This single check verifies both additivity and homogeneity at once and is often the most practical way to prove a transformation is linear. The video you just saw discusses this combined property right after the initial definition (from 2:52 to 5:23), which you can review if you're interested in the proof of equivalence.


3. How to Determine if a Transformation is Linear

Now let's put this definition to work. How do you test a given function to see if it's a linear transformation?

A Quick Disqualification Test

Before diving into the full definition, there's a quick check you can do. A consequence of the homogeneity property is that a linear transformation must map the zero vector to the zero vector.
Let , then .

So, if , the transformation is not linear.

Warning: If , it does not automatically mean the transformation is linear. This is a necessary, but not sufficient, condition. It's only useful for quickly ruling out non-linear transformations.

Oxford Linear Algebra: Linear Transformations Explained

The same "Oxford Linear Algebra" video explains this property and its usefulness as a quick test.

Watch from 6:37 to 8:50 to see the proof and an explanation of how to use this test.

Applying the Full Definition: Examples

Let's look at some concrete examples.

Example 1: Matrix Multiplication
This is the most important class of linear transformations for our purposes. Let be an matrix. The transformation maps vectors from to . Is this linear?

Let's check the two properties using facts about matrix algebra:

  1. Additivity: . (This works because of the distributive property of matrix multiplication).
  2. Homogeneity: . (This works because scalars can be pulled out of matrix-vector products).

Both properties hold, so multiplication by any matrix is always a linear transformation. This is the crucial link we sought: the abstract idea of a "linear transformation" in is embodied by the concrete operation of matrix multiplication.

Example 2: The Derivative Operator
Your background in calculus will be useful here. Let be the vector space of all differentiable functions. Is the derivative operator , defined by , a linear transformation?

  1. Additivity: . (The derivative of a sum is the sum of the derivatives).
  2. Homogeneity: . (Constants can be pulled out of derivatives).

Yes, differentiation is a linear transformation! This shows that the concept of linearity is much broader than just matrices and applies to spaces of functions, which is fundamental in areas like quantum mechanics (where operators are linear transformations on function spaces).

Oxford Linear Algebra: Linear Transformations Explained

The "Oxford Linear Algebra" video works through both the matrix multiplication and differentiation examples.

Watch from 9:58 to 16:03 to see these two key examples worked out in detail.

Example 3: A Non-Linear Transformation
Consider the transformation defined by .

Let's test it. First, the quick check: . The test doesn't rule it out, so we must use the full definition.

Let's check homogeneity. Let and .

  • .
  • .

Since , the transformation is not linear. We only need to find one counterexample to disprove linearity.

As a rule of thumb, if the components of the output vector involve squares, products of components, or other non-linear functions (like or ), the transformation is likely not linear.

Test your understanding!

Determine if the following transformations from to are linear.

  1. (This is a reflection across the line )
Show answer
  1. Not linear. Let's use the quick test. . Since the zero vector is not mapped to the zero vector, this transformation is not linear. This is an example of a translation, which is an affine transformation, not a linear one.

  2. Linear. Let's check the two properties.

    • Additivity:
      Let and .
      .
      .
      They are equal.
    • Homogeneity:
      .
      .
      They are equal.
      Since both properties hold, this transformation is linear.

Conclusion

In this lesson, we introduced the fundamental concept of a linear transformation, moving from a visual, intuitive understanding to a formal algebraic definition.

Key Takeaways:

  • A transformation is a function that maps vectors to vectors, visualized as a "movement" of space.
  • A transformation is linear if it keeps grid lines straight, parallel, and evenly spaced, and leaves the origin fixed.
  • The formal definition of linearity requires two properties: additivity () and homogeneity ().
  • A quick way to spot a non-linear transformation is to check if .
  • Matrix multiplication is a linear transformation. This is the core example that we will build upon.

Preview of the Next Lesson:
We have seen that every matrix gives rise to a linear transformation. The natural next question is: does it work the other way around? For any linear transformation between spaces like and , can we find a matrix that represents it? The answer is a resounding yes! In the next lesson, we will learn how to construct the matrix representation for any given linear transformation. This will solidify the powerful equivalence between the geometry of linear transformations and the algebra of matrices.