Blogs, Linear Algebra

Diagonalized Matrix

We saw in Standard Matrix of a Transformation how to find the matrix of a transformation with respect to the standard basis of \(\mathbb{R}^{n}\). Here, we will want to find the matrix of a linear transformation with respect to a basis other than the standard basis. In particular, we will want to choose a basis that results in this matrix being diagonal.

Our transformation

Let \(T: \mathbb{R}^{3} \to \mathbb{R}^{3}\) be given by \(T(x,y,z)=(2x-2y+3z,3y-2z, -y+2z)\). Then find

    • the standard matrix, \(A\), of \(T\),
    • a basis, \(B\), of \(\mathbb{R}^{3}\) such that the matrix of \(T\) with respect to \(B\) is diagonal,
    • the transition matrix, \(P\), from the standard basis to \(B\),
    • the matrix of \(T\) with respect to \(B\).

Standard Matrix

To begin with, we will find the standard matrix of the transformation using the process we had in Standard Matrix of a Transformation. Recall that we will find the image of the standard basis and turn these vectors into columns. We, therefore, have
\begin{align*}
T(1,0,0)&=(2,0,0) \\
T(0,1,0)&=(-2,3,-1) \\
T(0,0,1)&=(3,-2,2).
\end{align*}

Hence, the standard matrix is
\begin{align*}
\begin{bmatrix}
2 & -2 & 3 \\
0 & 3 & -2 \\
0 & -1 & 2
\end{bmatrix}.
\end{align*}

Basis of \(\mathbb{R}^{3}\)

In order to find a basis a \(\mathbb{R}^{3}\) such that the matrix will be diagonal, we need to find three linearly independent eigenvectors of the transformation. We first need to find the eigenvalues.

Eigenvalues

In order to find the eigenvalues of the linear transformation, we can find the eigenvalues of the standard matrix. We want to first find the characteristic polynomial. Therefore, we find that
\begin{align*}
|A- \lambda I|&=\left|\begin{bmatrix} 2-\lambda & -2 & 3 \\
0 & 3- \lambda & -2 \\
0 & -1 & 2- \lambda \end{bmatrix} \right|.
\end{align*}

If you need extra help with the determinate of a matrix, please see the post Finding a Determinant (Part 1) and Finding a Determinant (Part 1).

In this case, we will find that
\begin{align*}
|A- \lambda I|&=\left|\begin{bmatrix} 2-\lambda & -2 & 3 \\
0 & 3- \lambda & -2 \\
0 & -2 & 2- \lambda \end{bmatrix} \right| \\
&=(2-\lambda)[(3-\lambda)(2-\lambda)-(-2)(-1) \\
&=(2-\lambda)(6-5 \lambda +\lambda^{2}-2) \\
&=(2-\lambda)(\lambda^{2}-5\lambda+4) \\
&=(2-\lambda)(\lambda-4)(\lambda-1).
\end{align*}

In order to find the eigenvalues, we then find the roots of this polynomial. That is, we solve the equation
\begin{align*}
(2-\lambda)(\lambda-4)(\lambda-1)=0.
\end{align*}
This gives us \(\lambda_{1}=2\), \(\lambda_{2}=4\) and \(\lambda_{3}=1\).

Eigenvectors

Now that we have the eigenvalues, we can find the eigenvectors. In order to do so, we will need to find the null space of the matrix \(A-\lambda I\) for each eigenvalue \(\lambda\).

First eigenvalue

First, we will let \(\lambda_{1}=2\), and we find that
\begin{align*}
A-2I&=\begin{bmatrix}
0 & -2 & 3 \\
0 & 1 & -2 \\
0 & -2 & 0
\end{bmatrix}.
\end{align*}
In order to find the nullspace, we need to row reduce this matrix. For more on row reducing, see the post Solving a System of Equations or Finding a Determinant (Part 2). Performing this row reduction, we arrive at
\begin{align*}
A_{1}’&=\begin{bmatrix}
0 & 1 & 0 \\
0 & 0 & 1 \\
0 & 0 & 0
\end{bmatrix}.
\end{align*}

In finding the nullspace for this matrix, we note that \(x_{1}\) is the free variable, so we let this be \(t\). Then, \(x_{2}=x_{3}=0\). therefore, we see that
\begin{align*}
nullspace(A_{1})&=\left\{(t,0,0):t \in \mathbb{R}\right\} \\
&=span(\left\{(1,0,0)\right\}
\end{align*}

Hence, \((1,0,0)\) is an eigenvector for the eigenvalue \(\lambda_{1}=2\). We can also check our work by multiplying \(A\) be this vector, which does give the result \((2,0,0)\).

Second Eigenvalue

Now, we will repeat this process using \(\lambda_{2}=4\). We now find
\begin{align*}
A-4I&=\begin{bmatrix} -2 & -2 & 3 \\
0 & -1 & -2 \\
0 & -1 & -2 \end{bmatrix}.
\end{align*}
We then row reduce this matrix and find
\begin{align*}
A_{2}&=\begin{bmatrix} 1 & 0 & -\frac{7}{2} \\
0 & 1 & 2 \\
0 & 0 & 0 \end{bmatrix}.
\end{align*}

Here, we will have that the free variable will be \(x_{3}\), so we let \(x_{3}=t\). Then \(x_{1}=\frac{7}{2}t\) and \(x_{2}=-2t\). Therefore, the nullspace is
\begin{align*}
nullspace(A_{2})&=\left\{(\frac{7}{2}t, -2t,t):t \in \mathbb{R}\right\} \\
&=span(\left\{(7,-4,2)\right\}.
\end{align*}
Note that we found the basis by letting \(t=2\).

This now tells us that \((7,-4,2)\) is an eigenvector for the eigenvalue \(\lambda_{2}=4\).

Third eigenvalue

Next, we will find the eigenvector for \(\lambda_{3}=1\). We now find
\begin{align*}
A-1I&=\begin{bmatrix}
1 & -2 & 3 \\
0 & 2 & -2 \\
0 & -1 & 1
\end{bmatrix}.
\end{align*}

Again, we need to find the nullspace, so we row reduce this to
\begin{align*}
A_{3}&=\begin{bmatrix}
1 & 0 & 1 \\
0 & 1 & -1 \\
0 & 0 & 0
\end{bmatrix}.
\end{align*}

Now, the free variable will be \(x_{3}\), so we let \(x_{3}=t\). Then \(x_{1}=-t\) and \(x_{2}=t\), so
\begin{align*}
nullspace(A_{3})&=\left\{(-t,t,t): t \in \mathbb{R}\right\} \\
&=span(\left\{(-1,1,1)\right\}).
\end{align*}

Hence, \((-1,1,1)\) is an eigenvector for the eigenvalue \(\lambda_{3}=1\).

Basis

Now that we have the eigenvectors, these will form the basis of \(\mathbb{R}^{3}\) that will result in a diagonal matrix. Hence, this basis will be \(\left\{(1,0,0), (7,-4,2),(-1,1,1)\right\}\).

Transition Matrix

Now that we have a basis that will give us a diagonal matrix, we need to find the transition matrix from the standard basis to this basis. First, we will find the transition matrix from the new basis to the standard basis. In order to do this, we note that if we were given a vector in the form \(\mathbf{v}=v_{1}(1,0,0)+v_{1}(7,-4,2)+v_{3}(-1,1,1)\), we would find the coordinates with respect to the standard basis by taking
\begin{align*}
\begin{bmatrix}
1 & 7 & -1 \\
0 & -4 & 1 \\
0 & 2 & 1
\end{bmatrix}
\begin{bmatrix}
v_{1} \\ v_{2} \\ v_{3}
\end{bmatrix}=\begin{bmatrix}
c_{1} \\ c_{2} \\ c_{3}
\end{bmatrix}.
\end{align*}

That is, if we want a linear transformation starting with our new basis, \(B\), and mapping this into the standard basis, this would be represented by the matrix \(T(\mathbf{v})=P’\mathbf{v}\) where \(P’\) is the matrix
\begin{align*}
P’=\begin{bmatrix}
1 & 7 & -1 \\
0 & -4 & 1 \\
0 & 2 & 1
\end{bmatrix}.
\end{align*}

Now, since this sends the basis, \(B\), to the standard basis, if we want to find the matrix from the standard basis to the \(B\), we need to find the inverse of this matrix. That is, \(P’\) is actually the inverse, \(P^{-1}\), of the matrix we want. Hence, finding the inverse of the gives us
\begin{align*}
P&=\begin{bmatrix}
1 & \frac{3}{2} & -\frac{1}{2} \\
0 & -\frac{1}{6} & \frac{1}{6} \\
0 & \frac{1}{3} & \frac{2}{3}
\end{bmatrix}.
\end{align*}

That is, \(P\) is the transition matrix from the standard basis to the new basis, \(B\).

Matrix with respect to \(B\)

In order to find the matrix with respect to \(B\), note that we can assume that we were given the coordinates with respect to \(B\). We can map these to the standard basis by multiplying by \(P\). Then, you can find the image with respect to the standard basis by multiplying by \(A\). Finally we can find the coordinates with respect to \(B\) by multiplying by \(P^{-1}\). That is, the matrix with respect to \(B\) is given by \(PAP^{-1}\). That is,
\begin{align*}
PAP^{-1}&=\begin{bmatrix}
1 & \frac{3}{2} & -\frac{1}{2} \\
0 & -\frac{1}{6} & \frac{1}{6} \\
0 & \frac{1}{3} & \frac{2}{3}
\end{bmatrix}* \begin{bmatrix}
2 & -2 & 3 \\
0 & 3 & -2 \\
0 & -1 & 2
\end{bmatrix} * \begin{bmatrix}
1 & 7 & -1 \\
0 & -4 & 1 \\
0 & 2 & 1
\end{bmatrix} \\
&=\begin{bmatrix}
2 & 0 & 0 \\
0 & 4 & 0 \\
0 & 0 & 1
\end{bmatrix}.
\end{align*}

Note that, the point of choosing this basis was to make the resulting matrix diagonal. Furthermore, we know that the eigenvalues will be the entries in the diagonal with the column they appear in the same as the column we used for its eigenvector. That is, the result we have is exactly what we would expect.

Conclusion

Starting with a linear transformation, we were able to represent this transformation using matrix multiplication. We took the further step of choosing a basis that would result in a diagonal matrix, hence making the transformation even easier to find.

As always, I hope this helps you with your studies and that you enjoyed the process. If you did, make sure to share this post with someone else that would find it helpful. Also, be sure to subscribe to our YouTube channel.

We'd love to hear your thoughts!

This site uses Akismet to reduce spam. Learn how your comment data is processed.