Given a minimal polynomial of $A$ - calculating for $A$-squared What should be the SOP for this type of question: the minimal polynomial of matrix $A$ is something, calculate the minimal polynomial of $A$-squared.
Thanks!
 A: The basic algorithm that is ensured to give the right answer is the following: take the even powers $1=X^0, X^2, X^4,\ldots$ of $X$, reduce each one modulo the minimal polynomial $\mu_A\in K[X]$ of$~A$, and check the resulting polynomials (each one of degree${}<\deg\mu_A$) for linear dependence over the field$~K$. Once you found such a linear dependence (and it is bound to happen for the monomial $X^{2\deg\mu_A}$ if it did not happen before), the coefficients of the relation expressing the remainder of say $X^{2k}$ in terms of previous remainders will give you the coefficients of the minimal polynomial of$~A^2$.
Another way to express this is to take the companion matrix of $\mu_A$, square it, and take the minimal polynomial of the resulting matrix. Unlike the companion matrix itself, it may happen that its square has a minimal polynomial that differs from (so is a strict divisor of) its characteristic polynomial.
A: Here's the true algorithm:
Let $q(x)$ be the minimal polynomial of $A$. If $A$ is singular, let $q(x) = x^\alpha p(x)$ with $p(0)\ne 0$.
Take the GCD between $p(x)$ and $p(-x)$, obtaining
$$(p(x),p(-x)) = a(x)\implies p(x) = a(x)r(x)$$
Now, $a(x)$ has only even exponent terms, so $a(x) = b(x^2)$. $r(x)$ has at least an odd exponent term, so $r(x) = r_1(x^2) + xr_2(x^2)$, and putting all the odd terms on one side and squaring you obtain $r_1(x^2)^2 - x^2r_2(x^2)^2$.
The final answer, that is, the minimal polynomial for $A^2$, is
$$ q(y) = y^{\lceil\frac{\alpha}{2}\rceil}b(y) (r_1(y)^2-yr_2(y)^2) $$

First Properties
let us first suppose that $A$ is already in Jordan form, since the minimal polynomial doesn't change.
If $p(x)$ is the minimal polynomial of $A$, then it is in the form
$$
p(x) = \prod_i (x-\lambda_i)^{m_i}
$$
with $\lambda_i$ eigenvalues, and $m_i$ the dimension of the greatest block relative to the eigenvalue $\lambda_i$. The eigenvalues of $A^2$ can only be $\lambda_i^2$ so its minimal polynomial will be in the form
$$
q(y) = \prod_i (y-\lambda_j^2)^{s_j}
$$
and we have only to find the exponents $s_j$, that is, the greatest size of eigenvalues blocks relative to $\lambda_j^2$ in $A^2$.
First Case
If $\lambda$ is an eigenvalue of $A$, and $-\lambda$ is NOT an eigenvalue of $A$, then the exponent $s$ of $(y-\lambda^2)^s$ can be determined looking only the $\lambda$ blocks in $A$. Given the largest block of size $m$
$$
B = \lambda I + \begin{pmatrix}0&1&&\\ &\ddots&\ddots&\\ & &\ddots&1\\ &&&0 \end{pmatrix} = \lambda I +J
$$
then
$$
B^2 = \lambda^2 I + 2\lambda J + J^2
$$
that is still similar to $B$, so the biggest block in $A^2$ has still size $s=m$.
Second Case
If $\lambda\ne 0$, but both $\lambda$ and $-\lambda$ are eigenvalues of $A$, then the exponent $s$ of $(y-\lambda^2)^s$ will be the greater between the exponents $m$ of $\lambda$ and $-\lambda$ for the First Case
Third Case
If $\lambda = 0$ is an eigenvalue, then $A$ has a nilpotent block $J$ of size $m$, and $J^2$ is still nilpotent, but with index $\lceil \frac{m}{2}\rceil$
Proof
The algorithm above is correct since

*

*The exponent relative to the eigenvalue 0 is $\lceil \frac{\alpha}{2}\rceil$ since the polynomial of $A$ have $\alpha$ as exponent of $(x-0)$.

*Let $n_i=\min\{m_i,m'_i\}$, where $m_i$ and $m'_i$ are the exponents of $\lambda_i$ and $-\lambda_i$ eigenvalues of $A$. Then
$$a(x) = \gcd(p(x),p(-x)) = \prod_i (x^2-\lambda_i^2)^{n_i} = b(x^2) $$
and $p(x) = a(x) r(x)$ implies that $r(x)$ hasn't opposite eigenvalues, and also implies that $r(x)$ is either constant or has an odd term.

*Now we need to add the exponents left in $r(x)$, so we need to multiply by a polynomial with the same degree of $r(x)$ , and the operation on $r(x)$ described above produce a polynomial in $y$ of the same degree and with the right roots and multiplicity.

Adding all together you obtain that the algorithm is correct.
