TITLE: Finding a matrix $X$ that changes the basis(?)
QUESTION [5 upvotes]: If I have some two dimensional vector space $V$ and a linear operator $\phi:V\to V$ and a matrix $A$ of $\phi$ with respect to some basis $\{a,a'\}$ and let $B$ its matrix with respect to another basis $\{b,b'\}$ and I want to find $X$ such that $XAX^{-1}=B$

I have a few thoughts:
I think I am looking at 
$$X\,\begin{bmatrix}a_1 & a_2 \\ a_1' & a_2 '\end{bmatrix}\,X^{-1} = \begin{bmatrix}b_1 & b_2 \\ b_1'& b_2'\end{bmatrix}$$
And I am also not sure, but it would seem to be the same form as diagonalisation(possibly coincidence). Is there any reason to believe this would imply $B_2=0=B_1'$?
Also: Since $X$ seems to be invertible, it must be square, so I guess I can look at how that treats $A$ after computing $XAX^{-1}$. I will have a look at this and edit.

REPLY [3 votes]: I hope that a graphical representation can help. In this representation one of the two basis is the canonical one (to simplify the figures) but the use of two generic non orthonormal basis does not substantially change the meaning.

The key fact is that vectors and transformations are geometric entities that do not change changing the basis in which they are represented. In other world: The components of a given vector and the entries of the matrix that represent a given transformation are different in different basis, but in such a way that the vector (or the transformation) remain the same.
The figures illustrate such situation for a linear transformation in $\mathbb{R}^2$.  Here the transformation has matrix:
$$
T_{i,j}=
\left[
\begin{array}{cccc}
1&2\\
1&-1
\end {array}
\right]
$$
where the subscript refers to the canonical basis $\{\mathbf{i},\mathbf{j}\}$. Acting on a vector $\mathbf{v}$ ( in the first figure $\mathbf{v}=[1,2]^T$), this transformation gives the vector $\mathbf{v'}$, that, in  the canonical basis, is (second figure):
$$ \mathbf{v'_{i,j}}=
T_{ij}\mathbf{v_{ij}}=
\left[
\begin{array}{cccc}
1&2\\
1&-1
\end {array}
\right]
\left[
\begin{array}{cccc}
1\\
2
\end {array}
\right]
=
\left[
\begin{array}{cccc}
5\\
-1
\end {array}
\right]
$$
Now we want to represent this same vectors and transformation in a new basis, e.g. $\{\mathbf{e_1},\mathbf{e_2}\}$ in the figure. This new basis is obtained transforming the canonical basis with the matrix
$$
P=
\left[
\begin{array}{cccc}
1&3\\
-1&1
\end {array}
\right]
$$
and his inverse
$$
P^{-1}=\dfrac{1}{4}
\left[
\begin{array}{cccc}
1&-3\\
1&1
\end {array}
\right]
$$
represents the transformation that returns from the new basis to the canonical one.
In this new basis the vectors $\mathbf{v}$ and $\mathbf{v'}$ have components:
$$
\mathbf{v_{1,2}}= P^{-1}\mathbf{v_{i,j}}=
\dfrac{1}{4}\left[
\begin{array}{cccc}
-5\\
3
\end {array}
\right]
$$
$$ \mathbf{v'_{1,2}}=
P^{-1}\mathbf{v'_{ij}}=
\left[
\begin{array}{cccc}
2\\
1
\end {array}
\right]=
P^{-1}T_{i,j}\mathbf{v_{i,j}}=P^{-1}T_{i,j}P\mathbf{v_{1,2}}=T_{1,2}\mathbf{v_{1,2}}
$$
where $T_{1,2}$ is the matrix that represents the transformation in the new basis.
So we have:
$$
T_{1,2}=P^{-1}T_{i,j}P=
\dfrac{1}{4}
\left[
\begin{array}{cccc}
-7&-1\\
1&7
\end {array}
\right]
$$