- Let $A\in M_n(\mathbb{C})$; we consider the non-increasing sequence: $d_i=dim(\ker(A^i))-dim(\ker(A^{i-1}))$.
$A$ is a square IFF $A$ satisfies the following condition (P) about its iterated kernels (if $A$ is invertible, then there are no conditions!)
(P) (cf. Cross, Lancaster, Square roots of complex matrices, Linear and Multilinear Algebra): $(d_i)_i$ does not contain two successive occurrences of the same odd integer.
Note that, in Topics in Matrix Analysis, p. 472, Horn and Johnson add a condition which is useless.
- Let $A\in M_n(\mathbb{R})$. $A$ is a square over $\mathbb{R}$ IFF $A$ satisfies (P) and the following condition (Q) concerning the $<0$ eigenvalues of $A$.
(Q) $A$ has an even number of Jordan blocks of each size for every $<0$ eigenvalue. (Use the real Schur decomposition. cf. Functions of matrices, Higham, p.17 or Horn and Johnson -above-).
EDIT. Answer to Aaron. 1. The supplementary condition by H&J, can be rewritten: "if $dim(\ker(A))$ is odd, then $dim(\ker(A^2))<2dim(\ker(A))$". Note that $dim(\ker(A^2))\leq 2dim(\ker(A))$ is always true. Then it suffices to assume that $dim(\ker(A^2))=2dim(\ker(A))$; then $d_1=d_2$ are odd and, according to the other conditions, the square root of $A$ does not exist.
- The problem only stands for real $<0$ eigenvalues; indeed, if $\lambda$ is an eigenvalue of $A$ then $\bar{\lambda}$ too, and the dimensions of the Jordan blocks associated to $\lambda$ are the same as those of $\bar{\lambda}$; it is not difficult to find a square root of $diag(\lambda I+J_k,\bar{\lambda}I+J_k)$ when $\lambda\notin \mathbb{R}$ or of $\lambda I+J_k$ when $\lambda >0$ or of $diag(\lambda I+J_k,\lambda I+J_k)$ when $\lambda<0$.