To show the matrices are similar Given 
$A=\begin{bmatrix}0&1&0\\0&0&1\\0&0&0\end{bmatrix}$
&
$B=\begin{bmatrix}0&0&0\\1&0&0\\0&1&0\end{bmatrix}$
Show that $A$ & $B$ are similar matrices. 
I just know these two matrices are nilpotent matrices of index 3. How do I show them similar? Is there is any easy way? I know by the definition of similarity that I had to find matrix $P$ such that $B = P^{-1}AP$. But I am unable to find it. Please help me. 
 A: You can explicitly show that $A$ and $B$ are similar.
Let $a$ be the linear map from $\mathbb{R}^3$ to itself which is represented, into the canonical basis $(e_1, e_2, e_3)$, by the matrix $A$. Then we have :
$$ a(e_1) = 0, \quad a(e_2) = e_1, \quad a(e_3) = e_2. $$
Showing that $A$ is similar to $B$ is equivalent to finding another basis, say $(\varepsilon_1, \varepsilon_2, \varepsilon_3)$, of $\mathbb{R}^3$ such that $a$ is represented in this basis by the matrix $B$. So, we would like to have : $a(\varepsilon_1) = \varepsilon_2$, $a(\varepsilon_2) = \varepsilon_3$ and $a(\varepsilon_3) = 0$. 
It follows that a possible choice is :
$$ \varepsilon_1 = e_3, \quad \varepsilon_2 = e_2, \quad \varepsilon_3 = e_1. $$
Here, the matrix $P$ is simply :
$$ P = \begin{bmatrix} 0 & 0 & 1 \\ 0 & 1 & 0 \\ 1 & 0 & 0 \end{bmatrix}. $$
By definition, the $j$-th row $(1 \leq j \leq 3)$ of $P$ contains the coordinates of the vector $\varepsilon_j$ in the basis $(e_1, e_2, e_3)$. Note that in this case, the change of basis matrix $P$ (invertible) such that $AP = PB$ is a permutation matrix.
A: $$\begin{bmatrix}0&0&0\\1&0&0\\0&1&0\end{bmatrix} = 
\begin{bmatrix}0&0&1\\0&1&0\\1&0&0\end{bmatrix}^{-1}\begin{bmatrix}0&1&0\\0&0&1\\0&0&0\end{bmatrix} \begin{bmatrix}0&0&1\\0&1&0\\1&0&0\end{bmatrix}$$
A: Any matrix $P$ of the following form satisfies this equation.
$$
        \begin{bmatrix}
        x & y & z \\
        y & z & 0 \\
        z & 0 & 0 \\
        \end{bmatrix}
$$
where $x,y,z \in\Bbb R$
