# Eigenbasis and Diagonalization

Given that we know that a transformation can have up to Eigenvectors, where is the number of rows, what happens if we use the Eigenvectors as a change of basis, by multiplying the transformation by the matrix of the Eigenvectors?

As it turns out, converting the transformation to an Eigenbasis, if possible, is an incredibly useful conversion because of what happens to the transformation when it is converted in such a way.

Take for example, the matrix . This matrix scales by a factor of 2 along the y-axis, shears along the axis by a factor of 1.

This transformation has Eigenvalues and with algebraic multiplicity 2.

It also has Eigenvectors , for , and , and , for visualized below:

These Eigenvectors can be arranged into a new matrix called an Eigenbasis:

And the inverse of the Eigenbasis can be found too:

Consider what happens if we change the basis of our matrix by premultiplying by the inverse of the Eigenbasis, then postmultiplying by the Eigenbasis

Notice anything familiar? The result of changing the basis to a matrix to its Eigenbasis is that the matrix is put into a Diagonalized form. This is extremely useful, because while the matrix is in a diagonalized form, we can represent it like this

Thus, if we want to apply any matrix multiplication operation to the matrix in its diagonalized form, it is the same as applying a matrix-vector optimization. Computer Scientists will recognize this as a huge performance win, since an operation just became . Say for example we wanted to calcalculate the 16th power of the matrix:

Conventionally, this would take operations. If we did the same thing on the diagonal, we can exploit the fact that we are exponentiating by powers of two and same thing would take just three barrel-shift operations, preceded by and followed by a normal matrix multiplication to undo the diagonalization.