Similarity transformations#
In section [sec:linear], we saw that matrices can be viewed as taking a set of basis vectors to another set of basis vectors. This means that the actual numbers in a matrix are intimately connected to the initial basis. For example, a matrix
takes the unit vector \(\hat{\rm e}_x = \begin{pmatrix} 1 \\ 0 \end{pmatrix}\) to the vector \(\begin{pmatrix} 2 \\ 5 \end{pmatrix}\), and it takes the unit vector \(\hat{\rm e}_y = \begin{pmatrix} 0 \\ 1 \end{pmatrix}\) to the vector \(\begin{pmatrix} 1 \\ 3 \end{pmatrix}\). The numbers in the matrix tell us directly what is the destination of \(\hat{\rm e}_x\) and \(\hat{\rm e}_y\). So now what do we do if we want to express the matrix \(A\) in different coordinates, let’s say
Clearly the numerical values of the matrix elements of \(A\) much change in some way. To answer this question, we first note that given the basis vectors \(\hat{\rm e}_j\) we can find the matrix element \(a_{jk}\) via
where in the example above \(j,k = x,y\). You should verify that you can reproduce the values
So if the matrix elements of \(A\) with respect to the basis \(\{ \hat{\rm e}_j \}\) are given by \((\hat{\rm e}_j,A\hat{\rm e}_k)\), then the same matrix, but in different coordinates, i.e., a basis \(\{ \hat{\rm e}_j' \}\), will be given by \(a_{jk}' = (\hat{\rm e}_j',A\hat{\rm e}_k')\). We can denote the matrix in the primed basis by \(A'\).
Next, we define the primed basis \(\{ \hat{\rm e}_j' \}\) in terms of a transformation \(S\) that has an inverse \(S^{-1}\), acting on the basis \(\{ \hat{\rm e}_j \}\):
We can then write
where we used \((S^{-1}\a,\b) = (\a,S\b)\). You can see this by noting that changing \(\b\) in the scalar product is equivalent to changing \(\a\) in the opposite way. Therefore the matrix elements of \(A\) in the \(\{ \hat{\rm e}_j \}\) basis are the same as the matrix elements of \(A'\) in the \(\{ \hat{\rm e}_j' \}\) basis, and we can write
This is called a similarity transformation of \(A\). It allows us to write matrices in different coordinate systems, among other things.
Returning to our example above, we note that the transformation \(S\) that takes \(\hat{\rm e}_x\) and \(\hat{\rm e}_y\) to \(\hat{\rm e}_u\) and \(\hat{\rm e}_v\) is
The matrix \(A'\) is then
Again, you should verify this.
The main subtlety of similarity transformations is to figure out which operation is \(S\) and which one is \(S^{-1}\). It requires careful thought about what the basis vectors are doing. In that sense similarity transforms are the trickiest part of this course on matrices.
Rotations around an arbitrary axis#
We left a question in section Linear Matrices about how we can construct a matrix around an arbitrary axis in three dimensions. Consider the 3D rotation matrix around the \(x\)-axis:
Suppose we want to rotate around the axis that lies 45\(^\circ\) rotated towards the \(z\)axis. This axis rotation is
This rotation takes the unit in the \(x\) direction to the rotation axis. However, the similarity transform \(S\) above is actually the opposite (inverse) of this, because \(S\) is the matrix that changes the basis vectors and \(\hat{\rm e}_x\) rotates away from the rotation axis towards the negative \(z\)-axis. The rotation matrix around an axis midway between the \(x\) and \(z\)-axis is therefore
We used that the inverse of a rotation matrix \(R(\theta)\) is rotating by the same amount in the opposite direction \(R(-\theta)\). We can obtain other rotation axes using suitable rotations, and this technique also works if one wants to reflect in some arbitrary axis or plane.
Invariants under similarity transformations#
Similarity transforms preserve some aspects of a matrix. From the properties of the determinant in section Determinants you can see that the determinant of a matrix after a similarity transform remains unchanged:
This makes sense, because a similarity transform takes a matrix to a matrix that has the same effect on vectors, but in a different coordinate system.
Another important quantity that remains invariant under similarity transformations is the trace. The idea is simple: add up all the elements along the diagonal:
Without proof we state that the trace has the so-called cyclic property:
Using this property, we can show that the trace of a matrix is invariant under similarity transformations:
The trace will play a key role in the calculation of probabilities in quantum mechanics.