I have a matrix $$A= \begin{pmatrix} 1 & 1 & 1 & 1\\ 0 & 1 & 1 & 2\\ 1 & 1 & 1 & 1\\ 0 & 1 & 1 & 2\\ \end{pmatrix} $$
Its characteristic polynomial is
$$p(t)=t^2(t-4)(t-1)$$
How do I find 2 different matrices such that each one has different eigenvalues from $A$ and both suttisfies $B^2=A$? (both are B, separately).
I know I should use the fact that $A$ is diagonalizable and I should build $B$ with other matrices, but I don't see how I can get what I asked for.
From $p$ alone it is not clear that $A$ is diagonalizable. Fortunately, we easily find that the kernel is two-dimensional so that indeed $A$ is similar to a diagonal matrix, namely $$A'=\begin{pmatrix}0&0&0&0\\0&0&0&0\\0&0&4&0\\0&0&0&1\end{pmatrix}.$$ We can immediately name four matrices $B'$ with $B'^2=A'$, namely $$B'=\begin{pmatrix}0&0&0&0\\0&0&0&0\\0&0&\pm2&0\\0&0&0&\pm1\end{pmatrix}$$ (with independently chosen signs). As "similar" meas that $A=TA'T^{-1}$ for suitable $T$, we conclude that $(TB'T^{-1})^2=TB'^2T^{-1}=A$.
The condition "different eigenvalues from $A$" is a bit confusing: While eigenvalues $\pm2$ of $B'$ (and $B$) are certainly not eigenvalues of $A$, and while we can pick $-1$ to avoid the eigenvalue $1$, we cannot avoid that $B$ is singular, i.e., has eigenvalue $0$ just as $A$ has.
Another remark: We could also pick $B'$ as a non-diagonal matrix (and $B$ as not diagonalizable): $$B'=\begin{pmatrix}0&1&0&0\\0&0&0&0\\0&0&\pm2&0\\0&0&0&\pm1\end{pmatrix}.$$