<s>[INST] Given $A^2$ where A is matrix, how find A? Problem is simple.
Given $$A^2=\begin{bmatrix}13 & 9 &-9 \\ 0 & 4 & 0 \\ 12 & 12 & -8 \end{bmatrix}$$
How find $A$?
I think a method using eigenvalues and I find them.
But I can't find an actual $A$.
Is it right to use eigenvalues?
 [/INST] Here is an answer obtained by simple inspection. It is not a generally applicable method, but every step below can be done very easily by hand. I have absolutely no intention to recommend this answer. I just want to see how far simple inspection can reach.


*

*Observe that the second row of $A$ has two off-diagonal zeroes. Therefore, if
$$
\pmatrix{4&0^\top\\ \color{blue}{v}&\color{red}{B}}
:=\pmatrix{0&1&0\\ 1&0&0\\ 0&0&1}A^2\pmatrix{0&1&0\\ 1&0&0\\ 0&0&1}
=\left(\begin{array}{c|cc}4&0&0\\ \hline\color{blue}{9}&\color{red}{13}&\color{red}{-9}\\ \color{blue}{12}&\color{red}{12}&\color{red}{-8}\end{array}\right)
=\pmatrix{2&0^\top\\ x&C}^2
\tag{1}
$$
for some $2$-vector $x$ and some $2\times2$ matrix $C$, one can set $A=\pmatrix{0&1&0\\ 1&0&0\\ 0&0&1}\pmatrix{2&0^\top\\ x&C}\pmatrix{0&1&0\\ 1&0&0\\ 0&0&1}$. 

*So, we try to solve
$$
\pmatrix{4&0^\top\\ v&B}
=\pmatrix{2&0^\top\\ x&C}^2
=\pmatrix{4&0^\top\\ (C+2I)x&C^2}.\tag{2}
$$
We need to find some $C$ such that $B=C^2$ and some $x$ such that $(C+2I)x=v$.

*Since $\det(B)=4$, we have $\det(C)=\pm2$. Let us assume that $\det(C)=2$ and see if $(2)$ is really solvable. By Cayley-Hamilton theorem, $C^2-\operatorname{tr}(C)C+\det(C)I=0$ and hence $\operatorname{tr}(C)C=B+2I$. Taking traces of both sides, we get $\operatorname{tr}(C)^2=9$. Set $\operatorname{tr}(C)=3$, we get $C=\operatorname{tr}(C)^{-1}(B+2I)=\pmatrix{5&-3\\ 4&-2}$.

*Solving $(C+2I)x=v$, we get $v=(3,4)^\top$ and hence we obtain the following solution:
$$
A=\pmatrix{0&1&0\\ 1&0&0\\ 0&0&1}
\pmatrix{2&0^\top\\ x&C}
\pmatrix{0&1&0\\ 1&0&0\\ 0&0&1}
=\pmatrix{5&3&-3\\ 0&2&0\\ 4&4&-2}.
$$

</s>