Skip to main content

Welcome to a Grasp lesson

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

Lesson 13

Matrix Transformations Under Basis Change

Recommended resources

Hello! Welcome to the final lesson in our module on Linear Transformations and Matrices.

In our last session, we built the tools to "translate" the coordinates of a vector from one basis to another. We saw that a change-of-basis matrix and its inverse act as a universal translator, allowing us to describe the same vector in different coordinate systems.

Today, we'll answer the question previewed last time: if we change our coordinate system, how does the matrix of a linear transformation change? A 90-degree rotation is still a 90-degree rotation regardless of your basis, but the matrix you'd write down to represent it will look different. Our goal for this lesson is to learn how to compute the new matrix for a transformation after a change of basis. This concept, called a similarity transformation, is fundamental to many advanced topics you're interested in, including the diagonalization used in quantum mechanics and Principal Component Analysis (PCA) in deep learning.

1. The Core Idea: One Transformation, Many Matrix Representations

Let's stick with the analogy from the last lesson. We have our standard basis ("our language") and a new basis (Jennifer's language). Suppose we have a linear transformation , like a rotation, represented by a matrix in our standard basis. This means if we have a vector , the transformed vector is , all in standard coordinates.

Now, how would Jennifer describe this same transformation? She needs a matrix, let's call it , that takes a vector's coordinates in her basis and returns the transformed vector's coordinates, also in her basis.

So, the goal is:
Given (a vector in Jennifer's language), find a matrix such that (the transformed vector, also in her language).

We can figure this out by taking a "detour" through the standard basis, which we already know how to work with. Here's the three-step process:

  1. Translate to Standard Coordinates: Take the input vector, which is in Jennifer's basis , and convert it to our standard basis . We already know how to do this using the change-of-basis matrix whose columns are Jennifer's basis vectors. Let's call this , or just for short.
  2. Apply the Transformation: Now that the vector is in our standard coordinate system, we can apply our transformation matrix . The result, , is the transformed vector, still in standard coordinates.
  3. Translate Back to Jennifer's Basis: The result is the correct final vector, but it's expressed in our language. To give the answer back to Jennifer, we must convert it into her basis, . We do this using the inverse change-of-basis matrix, .

This sequence of operations gives us exactly what we were looking for. The matrix that directly performs the transformation in Jennifer's basis is the combination of these three steps.


2. The Change of Basis Formula for Matrices

From the logic above, we can see that the matrix for the transformation in the new basis is the product of the three matrices from our procedure.

Let be the matrix of a transformation in the standard basis .
Let be a new basis.
Let be the matrix whose columns are the basis vectors of (this is the change-of-basis matrix from to ).

The matrix of the same transformation in basis , denoted , is given by:

This operation is called a similarity transformation.

The following video provides an excellent visual walkthrough of this exact three-step process.

Change of basis | Chapter 13, Essence of linear algebra

Let's watch the final segment of the 3Blue1Brown video 'Change of basis', which we previewed last time. It beautifully illustrates this 'translate-transform-translate back' procedure.

Watch from 08:55 to the end. Pay close attention to the idea that the expression P⁻¹MP represents the same transformation as M, but from a different 'point of view'. This is what the video calls 'mathematical empathy'.

This same logic is presented very clearly in the following textual resource, which you can use as a quick reference.

Change of Basis

The article 'Change of Basis' from Math for AI provides a concise, step-by-step derivation of the same formula.

Read the short sections that motivate the formula. Note that the matrix S in the article is the same as the matrix P we are using (the one whose columns are the new basis vectors).


3. A Concrete Example: Rotating in a New Basis

Let's solidify this with the numbers from the video.

  • Transformation : A 90-degree counter-clockwise rotation.
  • Standard Basis : The matrix is .
  • Jennifer's Basis : The basis vectors are and .

Step 1: Construct and find
The change-of-basis matrix from to is formed by the basis vectors of :

As we calculated in the last lesson, its inverse is:

Step 2: Calculate
We compute the product from right to left:
First, :

Now, multiply by on the left:

This is the matrix that represents a 90-degree rotation in Jennifer's basis. If she takes a vector written in her coordinates, say (which is just her first basis vector ), and multiplies by this matrix, she gets . This is the coordinate representation of the rotated vector in her own basis.


4. Similarity and Invariance

The relationship is of central importance in linear algebra.

  • Definition: Two square matrices and are said to be similar if there exists an invertible matrix such that .

What this means is that similar matrices represent the same linear transformation, just expressed in different bases. The matrix is the change-of-basis matrix between those two bases.

Since the underlying transformation is the same, some of its fundamental properties should not change, regardless of the basis we use. These are called invariants. For any two similar matrices, they will have the same:

  • Determinant: This relates to how the transformation scales volumes.
  • Trace: The sum of the diagonal elements.
  • Eigenvalues: These are special scalars we will study in depth soon.

This invariance is extremely useful. If you have a complicated matrix , you can sometimes find a new basis where the matrix is much simpler (for example, a diagonal matrix). Because is similar to , you can compute properties like the determinant or eigenvalues from the simpler matrix and know they are the same for the original, complex matrix.

Basis transformations — Mathematics for Quantum Physics

The textbook 'Mathematics for Quantum Physics' also covers this topic. It uses a slightly different notational convention but arrives at the same conceptual result.

Focus on the formula relating A^(v) and A^(w). The textbook defines the change-of-basis matrix P as going from basis v to w, leading to the formula A^(w) = P A^(v) P⁻¹. This is equivalent to our formula if you swap the roles of P and P⁻¹. The key takeaway is the sandwich-like structure P(...)P⁻¹.

Test your understanding!

Let a linear transformation be represented in the standard basis by the matrix .

Consider a new basis .

Find the matrix that represents in the basis .

Show answer
  1. Find P and P⁻¹:
    The matrix has the basis vectors of as its columns:

    The determinant is .
    The inverse is:

  2. Compute :
    First, calculate :

    Now, pre-multiply by :

    So, the matrix of the transformation in the basis is .

    Notice something remarkable? In this new basis, the transformation is represented by a simple diagonal matrix! This means the transformation simply scales vectors along the directions of the new basis vectors. Finding a basis that diagonalizes a matrix is a major theme we will explore later in the course.


Conclusion

This lesson concludes our exploration of the relationship between linear transformations and matrices. We've bridged the gap between changing a vector's coordinates and changing a transformation's matrix representation.

Key Takeaways:

  • The matrix for a linear transformation depends on the chosen basis.
  • To find the matrix in a new basis , you perform a similarity transformation: .
  • In this formula, is the matrix in the original (e.g., standard) basis, and is the matrix whose columns are the new basis vectors.
  • The process can be understood as a three-step journey: translate to the old basis (), apply the transformation (), and translate back to the new basis ().
  • Matrices that are related by a similarity transformation are called similar. They represent the same underlying transformation and share important properties like determinant, trace, and eigenvalues.

Preview of the Next Module:
We have now built a solid foundation in vector spaces and linear transformations. With these tools, we are ready to venture into some of the most geometrically rich and practically useful topics in linear algebra. In our next module, we will introduce the concept of inner products, which allow us to define notions of length, distance, and angle in any vector space—even abstract ones like spaces of functions. This will be our first step towards the geometric structures essential for both quantum mechanics (Hermitian products) and data analysis (orthogonal projections).