## Matrices with square roots

Let $F$ be a field whose characteristic is not 2. Characterize those matrices $A$ over $F$ which have square roots. That is, characterize $A$ such that $A = B^2$ for some matrix $B$.

We claim that $A$ has a square root if and only if the following hold.

1. Every eigenvalue of $A$ is square in $F$.
2. The Jordan blocks of $A$ having eigenvalue 0 can be paired up in such a way that the sizes of the blocks in each pair differ by 0 or 1.

First we tackle the ‘if’ part. Suppose $P^{-1}AP = \bigoplus J_i \oplus \bigoplus H_i \oplus \bigoplus K_i$ is in Jordan canonical form, where $J_i$ are the Jordan blocks having nonzero eigenvalue $\lambda_i$ and $H_i$ and $K_i$ are the blocks with eigenvalue 0 such that the sizes of $H_i$ and $K_i$ differ by 0 or 1. As we showed in this previous exercise, $J_i = Q_iM_i^2Q_i^{-1}$ is the Jordan canonical form of the square of the Jordan block $M_i$ with eigenvalue $\sqrt{\lambda_i}$, and $H_i \oplus K_i = T_iN_i^2T_i^{-1}$ is the Jordan canonical form of the square of the Jordan block whose size is $\mathsf{dim}\ H_i + \mathsf{dim}\ K_i$ with eigenvalue 0. So we have $P^{-1}AP = C^2$, and so $A = (P^CP^{-1})^2$ $= B^2$ is a square.

Conversely, suppose $A = B^2$ is a square, and say $P^{-1}BP = J$ is in Jordan canonical form. Now $PAP^{-1} = J^2$. Now say $Q^{-1}J^2Q = K$ is in Jordan canonical form; then $Q^{-1}PAP^{-1}Q = K$. By the previous exercise, the nonzero eigenvalues of $K$ are square in $F$, and the Jordan blocks having eigenvalue 0 can be paired so that the sizes in each pair differ by 0 or 1.