Solve $A^2=B$ where $B$ is the $3\times3$ matrix whose only nonzero entry is the top right entry Find all the matrices $A$ such that  $$A^2= \left( \begin {array}{ccc} 0&0&1\\ 0&0&0 \\ 0&0&0\end {array} \right) $$  where $A$ is a $3\times 3$ matrix. 
$A= \left( \begin {array}{ccc} 0&1&1\\ 0&0&1 \\ 0&0&0\end {array} \right) $
 and 
$A= \left( \begin {array}{ccc} 0&1&0\\ 0&0&1 \\ 0&0&0\end {array} \right) $ work, 
but how can I find all the matrices?
 A: You have $A^4=0$, and since it is a $3\times 3$ matrix it follows that $A^3=0$. This means that 
$$A\begin{pmatrix}
0&0&1\\
0&0&0\\
0&0&0\end{pmatrix}=0$$
and 
$$\begin{pmatrix}
0&0&1\\
0&0&0\\
0&0&0\end{pmatrix}A=0$$
Giving that
$$A=\begin{pmatrix}
0&a&b\\
0&c&d\\
0&0&0\end{pmatrix}$$ Now we have 
$$A^2=\begin{pmatrix}
0&ac&ad\\
0&c^2&dc\\
0&0&0\end{pmatrix}$$
 So $c=0$ and $ad=1$. Thus the general solution is 
$$A=\begin{pmatrix}
0&a&b\\
0&0&a^{-1}\\
0&0&0\end{pmatrix}.$$
A: Note that $A^4=0$. Thus all eigenvalues of $A$ must be $0$ thus its Jordan normal form has one of the following forms
$$
A_1=\left( \begin {array}{ccc} 0&0&0\\ 0&0&0 \\ 0&0&0\end {array} \right) \text{ or }  
A_2=\left( \begin {array}{ccc} 0&1&0\\ 0&0&0 \\ 0&0&0\end {array} \right)
\text{ or }
A_3=\left( \begin {array}{ccc} 0&1&0\\ 0&0&1 \\ 0&0&0\end {array} \right)
$$
The first two options are immediately disqualified because their square is $0$. Thus $A$ must be similar $A_3$, i.e. $A= CA_3C^{-1}$ for an invertible C. Now $B = A^2 = C A_3^2 C^{-1} = C B C^{-1}$, thus $B$ and $C$ have to commute. Thus your space of solutions to $A^2 = B$ is given by
$$\{CA_3C^{-1}\vert C \in Gl(\mathbb{R},3), [B,C] = 0\}$$
By solving the linear equation $[B,C] = 0$ you see $C$ satisfies $C \in Gl(\mathbb{R},3), [B,C] = 0$ if and only if it is of the form
$$C=\left( \begin {array}{ccc} \lambda&*&*\\ 0&\mu&* \\ 0&0&\lambda\end {array} \right) $$
for $\lambda,\mu \neq 0$.
A: I don't know about all solutions, but given one solution, you can generate an infinity many other solutions: Let
$$
P=
\begin{pmatrix}
1 & x & y\\
0 & 1 & z \\
0 & 0 & 1\\
\end{pmatrix}
$$
Note that 
$$
P^{-1}=
\begin{pmatrix}
1 & -x & xz-y\\
0 & 1 & -z \\
0 & 0 & 1\\
\end{pmatrix}
$$
If 
$$
A^2=
\begin{pmatrix}
0 & 0 & 1\\
0 & 0 & 0 \\
0 & 0 & 0\\
\end{pmatrix}
$$
then 
$$
(P^{-1}AP)^2=P^{-1}A^2P=
\begin{pmatrix}
1 & -x & xz-y\\
0 & 1 & -z \\
0 & 0 & 1\\
\end{pmatrix}
\begin{pmatrix}
0 & 0 & 1\\
0 & 0 & 0 \\
0 & 0 & 0\\
\end{pmatrix}
\begin{pmatrix}
1 & x & y\\
0 & 1 & z \\
0 & 0 & 1\\
\end{pmatrix}=
\begin{pmatrix}
0 & 0 & 1\\
0 & 0 & 0 \\
0 & 0 & 0\\
\end{pmatrix}
$$
