From: 3blue1brown

One foundational concept that illuminates linear algebra is the idea of a linear transformation and its relationship to matrices [00:00:22]. Focusing on two dimensions, this concept directly links to matrix vector multiplication [00:00:30]. Thinking about matrix vector multiplication in terms of transformations offers an intuitive understanding rather than rote memorization [00:00:39].

Understanding Transformations

A “transformation” is essentially a sophisticated term for a function [00:00:47]. It processes inputs and generates a corresponding output for each [00:00:50]. In linear algebra, transformations often take an input vector and produce another vector as output [00:00:59]. The term “transformation” is used to suggest a visual way of understanding this input-output relationship, particularly through the concept of movement [00:01:07].

When a transformation converts an input vector into an output vector, it can be visualized as the input vector “moving” to the position of the output vector [00:01:20]. To grasp a transformation’s overall effect, one might imagine every possible input vector moving to its new location [00:01:32].

Instead of envisioning each vector as an arrow, a useful technique is to represent each vector as a single point, specifically where its tip rests [00:01:43]. This allows for visualizing a transformation as every point in space moving to a new point [00:01:52]. For two-dimensional transformations, observing the movement of all points on an infinite grid, often with a copy of the original grid in the background, helps to understand the transformation’s shape [00:02:02]. This visualization evokes the feeling of space itself being squished and morphed [00:02:21].

Linear Transformations

Linear algebra specifically deals with a simpler type of transformation called linear transformations [00:02:34].

Visually, a transformation is considered linear if it satisfies two conditions [00:02:43]:

  1. All lines must remain straight lines, without curving [00:02:46].
  2. The origin (0,0) must remain fixed in place [00:02:46].

Examples of non-linear transformations include those that:

  • Cause lines to become curvy [00:02:54].
  • Keep lines straight but move the origin [00:02:59].
  • Appear to keep horizontal/vertical lines straight but curve diagonal lines [00:03:09].

In general, linear transformations preserve the parallelism and even spacing of grid lines [00:03:19]. Simple examples include rotations about the origin [00:03:28].

Describing Linear Transformations with Matrices

To describe linear transformations numerically, for instance, in programming animations, you only need to record the final positions of the two basis vectors, i-hat and j-hat [00:03:52]. All other vectors’ movements can be derived from these two [00:03:57].

Consider a vector v with coordinates (-1, 2), which can be written as -1 times i-hat plus 2 times j-hat [00:04:01]. Due to the properties of linear transformations (grid lines remaining parallel and evenly spaced), the transformed v will be -1 times the vector where i-hat landed, plus 2 times the vector where j-hat landed [00:04:25]. This means a vector’s final position is the same linear combination of the transformed basis vectors as its original components were of the initial basis vectors [00:04:30].

For example, if i-hat lands at (1, -2) and j-hat lands at (3, 0) [00:04:50]: A vector v = -1 * i-hat + 2 * j-hat [00:05:00] transforms to: -1 * (1, -2) + 2 * (3, 0) = (-1, 2) + (6, 0) = (5, 2) [00:05:07]

This principle allows us to deduce where any vector lands knowing only the landing spots of i-hat and j-hat, without needing to visualize the entire transformation [00:05:33].

For a general vector (x, y), it will land at: x * (where i-hat lands) + y * (where j-hat lands) [00:05:42]. If i-hat lands at (1, -2) and j-hat lands at (3, 0): x * (1, -2) + y * (3, 0) = (x, -2x) + (3y, 0) = (x + 3y, -2x) [00:05:51].

Matrices as Transformation Descriptors

A two-dimensional linear transformation is entirely defined by four numbers: the two coordinates where i-hat lands, and the two coordinates where j-hat lands [00:06:12]. These coordinates are typically arranged into a 2x2 grid of numbers called a matrix [00:06:23]. The columns of this matrix represent the landing spots of the i-hat and j-hat basis vectors [00:06:27].

To find where a linear transformation (represented by a matrix) takes a specific vector, you multiply the vector’s coordinates by the corresponding columns of the matrix and sum the results [00:06:44]. This directly corresponds to adding the scaled versions of the new basis vectors [00:06:48].

For a matrix with entries: A B C D

The first column (A, C) represents where i-hat lands, and the second column (B, D) represents where j-hat lands [00:07:13]. When this matrix is applied to a vector (x, y), the result is: x * (A, C) + y * (B, D) = (Ax + By, Cx + Dy) [00:07:28]. This is the definition of matrix vector multiplication, where the matrix is placed to the left of the vector, acting like a function [00:07:37].

Intuitive Understanding

It’s more intuitive to conceptualize matrix columns as the transformed basis vectors and the product as the appropriate linear combination of those vectors [00:07:54].

Examples of Matrix Vector Multiplication (Linear Transformations)

Rotation

If all of space is rotated 90 degrees counterclockwise [00:08:04]:

  • i-hat lands on (0, 1) [00:08:09].
  • j-hat lands on (-1, 0) [00:08:13]. The corresponding matrix has columns (0, 1) and (-1, 0) [00:08:17]. To rotate any vector 90 degrees, you multiply its coordinates by this matrix [00:08:26].

Shear

In a shear transformation [00:08:35]:

Deducing Transformation from a Matrix

Given a matrix, for example, with columns (1, 2) and (3, 1), you can deduce its transformation by:

  1. Moving i-hat to (1, 2) [00:09:08].
  2. Moving j-hat to (3, 1) [00:09:15].
  3. Ensuring the rest of space moves in a way that keeps grid lines parallel and evenly spaced [00:09:17].

If the vectors that i-hat and j-hat land on are linearly dependent (one is a scaled version of the other), the linear transformation will squish all of 2D space onto the one-dimensional line spanned by those two vectors [00:09:36].

Conclusion

Linear transformations move space while keeping grid lines parallel and evenly spaced, and the origin fixed [00:09:54]. These transformations can be described simply by the coordinates of where each basis vector lands [00:09:58]. Matrices provide a language for describing these transformations, where their columns represent the transformed basis vectors [00:10:06]. Matrix-vector multiplication is the computational method to determine how a transformation affects a given vector [00:10:12].

A crucial takeaway is that every matrix can be interpreted as a specific transformation of space [00:10:18]. This fundamental understanding is key to grasping advanced topics in linear algebra, such as matrix multiplication, determinants, change of basis, and eigenvalues [00:10:32].