# $X$, find $A$ such that $A^m=X$

I encountered a problem as folows:

Show a $3\times 3$ real matrx $A$, such that

$$A^4=\left(\begin{array}{ccc}3&0&0\\0&3&1\\0&0&0\end{array}\right)$$

well, this problem is not difficult, one can first find $B=\left(\begin{array}{ccc}\sqrt3&0&0\\0&\sqrt3&x\\0&0&0\end{array}\right)$ such that $B^2=\left(\begin{array}{ccc}3&0&0\\0&3&1\\0&0&0\end{array}\right)$.

My problem is:

Let $m,n$ be two positive integers. then, for what $n\times n$ real matrix $X$, there exist real matrix $A$ such that $A^m=X$? Is there a general method or theorem to calculate all the matrices $X$ and $A$?

Maybe, there does not exist a general answer. then, How about $n=3$ or $4$?

Thanks a lot!

• Everything over $\mathbb C$? – Git Gud May 17 '14 at 15:20
• @GitGud over $\Bbb C$, $A$ always exist – Clin May 17 '14 at 15:24
• That is false, just take $X=\begin{bmatrix} 0 & 1\\0 & 0\end{bmatrix}$ and $m=2$. – Git Gud May 17 '14 at 15:27

If you're working over $\mathbb{C}$, then everything boils down to the Jordan canonical form. I actually needed to look this up a while ago and there's a very good paper on the topic that is completely elementary (needs only knowledge of the Jordan canonical form):
Decompose $\mathbb{C}^n$ into generalized eigenspaces. Then if you find such an X for each eigenspace, you can combine them together to give an X for $\mathbb{C}^n$.
Therefore we can assume that $\mathbb{C}^n$ is a generalized eigenspace. Then we can choose a basis so that the matrix will be upper triangular. If the eigenvalue is non-zero, it will be simple to find such a matrix, one row at a time, starting from the bottom.