Lecture 30 · Linear transformations and their matrices
Understand how linear transformations correspond to matrices, and how the choice of basis changes the matrix.
On this page
Linear transformations and their matrices | Gilbert Strang | MIT 18.06 Linear Algebra
Lecture 30 / Total 35 Lectures |Part 3 · Eigenvalues, positive definiteness and linear transformation
Video of this lecture: Bilibili p31 · Linear transformation and its matrix ↗(49:27)| MIT OCW official page ↗
Illustration: MIT OCW 18.06SC official lecture summary (CC BY-NC-SA 4.0) and Bilibili classroom video frames (time stamped), about 10 frames per lecture.
Introduction to this lecture
In the previous twenty lectures, the matrix has always been the protagonist: elimination turns it into an upper triangle, four basic subspaces are cut out from it, and determinant, eigenvalue, and singular value decomposition each add a layer of structure to it. But where did the matrix itself come from? This lecture returns to a more primitive object——linear transformation (linear transformation). It requires no coordinates or matrices: assigning an output vector to each vector is like assigning a function value to each number. Linear algebra courses decades ago started with linear transformations, and physicists prefer to look at problems this way because they don’t want to lay out a bunch of coordinates as soon as they open their mouths.
The question to be answered in this lecture is: How can an abstract linear transformation be represented by a matrix? The solution is to choose two sets of basis - one in the input space and one in the output space - and then just look at what the transformation does to the input basis vectors: convert each Written as a linear combination of output basis vectors, the coefficient of the combination is the first columns. In turn, each matrix is also passed Gives a linear transformation. Matrices were originally invented to study linear transformations.
The third level conclusion is more intriguing: the shape of the matrix depends on the basis. For the same projection, if a set of basis is changed, the matrix may be as simple as leaving only one non-zero element, or it may be written as Such a full matrix. This lecture uses three examples of projection, rotation, and derivation to complete this path. Finally, you will see that the multiplication of a matrix corresponds to the composition of a transformation, and the inverse of a matrix corresponds to the inverse of a transformation.

MIT OCW Official Lecture Notes Summary Page 1/4 (18.06SC Lecture 30 Summary, CC BY-NC-SA 4.0).
1. Linear transformation and two rules
transform (Transformation) is a function: input a vector, output a vector, sometimes also called mapping (mapping). customarily used means, because the first letter of transformation is T. It is not essentially different from the functions seen in middle school, except that the input and output are replaced by vectors; writing , read as ” in The image below.”
The first example is projection (projection). on plane Here, a straight line passing through the origin is fixed, and each vector becomes its projection on a straight line . The entire process does not require coordinates: as long as you know where the line is, the image of each vector is uniquely determined. Take another vector , also cast on this straight line. Axes, scales, and weights can all be erased, while the geometric relationships remain intact.
There are infinite kinds of mappings that can be written. This lecture is only concerned with the type that satisfies a special rule, that is, linear transformation. Projections fall into this category, and the rule is: there are only two operations on vectors - addition and multiplication - and transformations should match these two operations in the simplest way.
If the vector is doubled in length, the projection will also be doubled in length; if the vector is reversed, the projection will also be reversed; adding two vectors first and then projecting them will produce the same result as first projecting them separately and then adding them. These properties, written as formulas, are the two requirements for linear transformation:
Two rules can be combined into one: the image of any linear combination is equal to the same linear combination of the image,
Note that the second rule holds for any real number are established, OK, That’s ok too.
There is an immediately applicable corollary: The zero vector must map to the zero vector, the origin cannot be moved. take , , the second rule gives , subtract both sides to get . This corollary requires almost no effort, but it is the fastest way to deny a transformation: as long as a transformation is found to move the origin, it must not be linear.

Video 00:04:57 | Approximately corresponding to Section 1 “1. Linear Transformation and Two Rules”.
2. Two counterexamples: translation and length
It seems that natural rules are not necessarily linear. Two counterexamples illustrate this point.
The first counterexample translates the entire plane by a fixed vector :
Each vector moves forward the same distance. This rule seems simple and reasonable, but linearity requires something else. double cannot be doubled : The left side becomes , the right side is , unless , the two are not equal - the translation amount is always the same , does not become as the input doubles . The addition rule is also broken because , while . You can see the problem at a glance using the criteria from the previous section: , the origin has been moved.
The second counterexample takes the length: Each vector in is mapped to its length, and the result is a real number, which can be viewed as vector in . Transformations allow for dimensionality reduction, so this in itself is not a problem. A zero vector does map to zero, and doubling does double: . But changing it to a negative multiple is confusing:
The length only remembers the size and loses the direction: with Being pressed to the same number is the reason why it cannot handle the negative coefficient. This counterexample also shows why the two rules must be written separately: it passes the test of zero vector, and it also passes the test of positive multiples. The real constraints are hidden in situation. The two counterexamples fail in different ways, which just shows that linearity is not an automatically established property, but a real restriction on transformation.

Video 00:11:55 | Approximately corresponding to section 2 “2. Two counterexamples: translation and length”.
3. Rotation, whole house and matrix multiplication
Give another true linear transformation: put every vector in the plane around the origin rotate(rotation). No coordinates are needed to describe it - given an input vector, the output is the rotated that vector. It is linear: put If the length is doubled, the turned arrow will also be twice as long; adding the two vectors first and then rotating them, or rotating them separately and then adding them, will get the same result.
There’s a point worth emphasizing here: you don’t have to focus on one vector at a time. Apply the transformation to an entire graphic - such as the small house on the plane painted on the cover of the textbook, and send every point on the outline into ——You can see what the transformation does to the entire space at once. rotate After that, the whole house followed , the orientation of the roof and the orientation of the door change together. Linear transformation is a movement of the entire space, and matrix multiplication is just its coordinate writing.
A third category of examples comes from the matrix itself. fix a matrix , order
This is a linear transformation because matrix multiplication distributes both addition and numerical multiplication:
Each matrix is given a transformation, and the examples are endless. The meaning of matrix multiplication by vector is also revealed here: the input vector is multiplied by the matrix to obtain an output vector, and this output vector often falls in another space and can have different dimensions. The shapes are also automatically aligned: let the input fall on , the output falls into , It should be matrix. For example from Arrive The linear transformation of matrix is given; use a The matrix multiplies the three-component input vector to get exactly the two-component output.
Let’s look at an example specifically. take
it is Diagonal, the function couldn’t be simpler: Keep the portions as they are, Components change sign. Use it to transform that house, the tip of the roof become ——The horizontal coordinate does not move, and the vertical coordinate flips to the bottom. As a result, the whole house is turned upside down, and the door runs to the top. This is what a matrix does to the entire plane.
So the task of this lecture is clear: given a linear transformation described in geometric language, Find the matrix hidden behind it. To achieve this, you must first have coordinates; and coordinates come from the basis. This is the bridge that will be built in the following sections.

MIT OCW Official Lecture Notes Summary Page 2/4 (18.06SC Lecture 30 Summary, CC BY-NC-SA 4.0).

Video 00:18:48 | Approximately corresponding to section 3 “3. Rotation, whole house and matrix multiplication”.
4. If you know the image on the basis, you will know the entire transformation
Set from reflected , that is, input Dimension, output dimension. A natural question is: in order to be fully known to others What is the minimum information required for all input functions?
tell the other person , he only knows this value, which is far from enough. Give another vector and its likeness , the situation immediately changed: he knew with , we know through linearity Applies to all combinations The above result means that we know on the entire plane based on these two vectors. The premise is linearly independent (linearly independent); if , then It’s calculated, and this piece of information doesn’t bring anything new.
One step further promotion, the conclusion is: as long as you know in a base By taking the image of each basis vector, we know the entire transformation. because of base Zhang Cheng (span) the entire input space, each can be written uniquely
while linearity enforces
There is no choice. Therefore, the amount of information of a linear transformation is limited: output vectors, each output vector in need To describe the number, a total of number - this is exactly one The number of elements of the matrix.
The next question is: how to arrange these numbers into the matrix? The answer depends coordinates. Coordinates are generated by the basis: once the basis is selected, the way each vector is written as a combination of basis vectors is unique - the basis is spread into a space, which means it must exist; it has nothing to do with linearity, which means it must be unique - the coefficient of the combination is its coordinates. usually write , in fact, a set of basis is implicitly assumed: Standard base(standard basis), three numbers are three coordinates. But you can also change a set of bases, such as the eigenvectors of a certain matrix, and then the coordinates of the same vector will completely change. The reason why the matrix changes with the basis is here.
5. Creating a matrix from transformation: two sets of bases and the meaning of each column
Now write the rules down. Given a linear transformation , choose two sets of bases: input base (all in middle), output base (all in middle). Since the output space has a basis, each can be uniquely written as a combination of output bases:
Arrange these coefficients vertically in a column to form a matrix of the Column:
Summarize it in one sentence: Take the first place input basis vectors, perform transformation, and write the image as a combination of output basis vectors. The coefficient is the columns. Do this column by column, It’s set up. its shape is : The number of rows comes from the dimensionality of the output space, and the number of columns comes from the dimensionality of the input space, which is the same as “from Arrive use Matrix” is exactly the same. This also explains why two sets of bases must be given at the same time - without bases, there are no coordinates, and without coordinates, there is no way to talk about matrices.
The entire calculation process can be explained in one sentence: first use the input basis to translate the vector into coordinates, multiply , and then translate the resulting array back into a vector using the output base. This matrix does exactly what it is supposed to do: multiply the input coordinate vector by , get the output coordinate vector. To verify, just look at the basis vectors. Take the input coordinates as , the input vector it represents is ; Multiplying this column, we get The first column of , which is constructed to be exactly Coordinates in the output basis. The same is true for the second column, the third column… and every column. Since the equation is true for every basis vector and both sides are linear for the inputs, it must hold for all inputs. This is exactly the argument from Section 4 that “the image of the base determines everything”, but now translated into matrix language.

Video 00:32:09|Approximately corresponding to Section 5 “5. Creating matrices from transformations: two sets of bases and the meaning of each column”.

MIT OCW Official Lecture Notes Summary Page 3/4 (18.06SC Lecture 30 Summary, CC BY-NC-SA 4.0).
6. The same projection, two bases
Make a complete presentation with projection. Take the projection in the plane and project it onto a straight line passing through the origin. Choose a set first Good gay: The input base and the output base are in the same group, is the unit vector on the straight line, is the unit vector perpendicular to the line.
Construct column-by-column according to the rules of Section 5. , because the vector does not move after projection on the straight line; its coordinates in the output basis are , this is the first column. , the component perpendicular to the straight line is killed by projection; the coordinates are , this is the second column. So
Check it out: enter coordinates was sent to , it is the projection that “retains the parallel components and kills the vertical components”. This matrix is diagonal, with diagonal elements and Just projected eigenvalue (eigenvalue), while is its eigenvector (eigenvector). Under a good basis, two algebraic properties of projection can be seen at a glance: the diagonal matrix is of course symmetric; the diagonal element has only and , the square is still itself, so .
Replace with Standard base Do the math again. Suppose it is projected onto Straight line, both input basis and output basis are taken , . What you get at this time is not the beautiful matrix, but the one derived when talking about projection earlier. projection matrix(projection matrix):
Spot check two columns: Enter get , indeed Project to the result of a straight line; input also get . This matrix is no longer diagonal because the standard basis is not an eigenvector. But it is still symmetrical and still satisfies : It’s another “good-looking matrix”, just not as easy to see at a glance as a diagonal matrix.
The same projection, two bases, two matrices. The transformation has not changed, only the coordinates describing it have changed. The weight of this matter lies in: The matrix is not the transformation itself, but the coordinate record of the transformation under a certain set of bases. If you want to see the nature of a transformation, look for its eigenvectors; those are the same set of coordinates that physicists pick when forced to use coordinates. The basis transformation in the next lecture is to write “how does the matrix change when a group of basis is changed” into a formula.

Video 00:38:33 | Approximately corresponding to Section 6 “6. One projection, two bases”.
7. Derivative is also a linear transformation
A final example that leaves geometry but is more illustrative: Derivative (differentiation) is a linear transformation.
Let the input space be all of the form of polynomials whose bases are the three simplest functions . The output after derivation is , falls by In the spanned space, the output basis is . So put dimensional space mapped to dimensional space.
Calculate column by column. , giving the first column ; , giving the second column ; , giving the third column . So
one The matrix has completely recorded the derivation.
To write down the sentence “derivative is a linear transformation”, there are two familiar rules: the derivative of a sum is equal to the sum of the derivatives, ;The derivative of the numerical multiplication is equal to the numerical multiplication of the derivative, . These two requirements are exactly the two requirements for linear transformation, except that the vector is replaced by a function. Because of this, transformations in function space can also be loaded into matrix multiplication, and the previous “base-coordinate-matrix” language is equally applicable to polynomials.
The fact that derivation is linear means much more than just one example. Because it is linear, it can calculate the derivatives of a few functions -, , Such a short list - you can use linear combinations to calculate the derivatives of all combinations without having to start from scratch every time you encounter a new function. If the derivation is not linear, calculus cannot do it.
At this point, the entire language of this lecture is closed. The inverse of a matrix corresponds to the inverse of a transformation: The vector sent out is then sent back, and the matrix should be multiplied by the identity matrix. . The multiplication of matrices corresponds to the composition of transformations: first do one transformation, then another, and the combined matrix is exactly the product of the two matrices. Matrix multiplication is not an operation specified out of thin air. It grows out of the composition of linear transformations.

Video 00:44:30 | Approximately corresponding to Section 7 “7. Derivatives are also linear transformations”.

MIT OCW Official Lecture Notes Summary Page 4/4 (18.06SC Lecture 30 Summary, CC BY-NC-SA 4.0).
Summary of this lecture
- linear transformation is a mapping that preserves addition and multiplication: , ; the two together are Map linear combinations into linear combinations.
- The zero vector must map to zero: given by Got , which is the criterion for denying a fastest transformation.
- Counterexample: translation Break two rules (); take the length Through the test of zero vector and positive multiple, but in failed.
- Projection and rotation are linear transformations that can be described without coordinates; by applying the transformation to the entire house, you can see clearly what it does to the entire space at once.
- Each matrix passes gives a linear transformation, Matrix correspondence ; Turn the plane upside down and the house is upside down.
- know in a group base As shown above, you know the entire transformation: force .
- Rules for constructing matrices: Selecting the input basis with output basis , put The coefficients of column; so .
- The same projection: using the eigenvector basis (along the straight line and perpendicular to the straight line), we get , the diagonal element is the eigenvalue ;Project to using standard basis Straight line , symmetrical and , but no longer diagonal.
- The derivative is a linear transformation: Correspondence matrix .
- The inverse of a matrix corresponds to the inverse of a transformation, and the product of a matrix corresponds to the composition of a transformation; matrix multiplication is generated from a linear transformation, not the other way around.
keywords
| English | Chinese | One sentence explanation |
|---|---|---|
| linear transformation | linear transformation | Maintain mapping of vector addition and multiplication |
| transformation / mapping | Transform/Map | Rules for assigning each input vector to an output vector |
| projection | projection | Press each vector vertically to a point on a straight line |
| rotation | rotate | Rotate each vector through a fixed angle around the origin |
| basis | base | A set of vectors spanned into a space and linearly independent, used to generate coordinates |
| coordinates | coordinates | Vectors are written as coefficients when combining basis vectors |
| standard basis | Standard base | The default basis consisting of unit coordinate vectors, the coordinates being the components |
| linear combination | linear combination | Several vectors are each multiplied by a coefficient and then added |
| linearly independent | linearly independent | There are no non-trivial combinations of zeros, every vector brings a new direction |
| span | Zhang Cheng | The set of all linear combinations of a set of vectors |
| eigenvalue | eigenvalue | The factor by which the eigenvector is scaled after being transformed; the projected eigenvalue is with |
| eigenvector | eigenvector | A vector whose direction remains unchanged (or reversed) after transformation |
| projection matrix | projection matrix | matrix projected onto a standard basis , satisfy |
| differentiation | Derivative | Mapping polynomials into linear transformations of derivative functions |
| inverse matrix | inverse matrix | Represents the matrix of the inverse transformation, multiplied by the original matrix to obtain |
| identity matrix | identity matrix | A matrix representing an identity transformation, with all diagonal elements being |
Machine-assisted translation · Read Chinese original
