<s>[INST] Computing the trace and determinant of $A+B$, given eigenvalues of $A$ and an expression for $B$ Let $A$ be $4\times 4$ matrix with real entries such that $-1$, $1$, $2$, and $-2$ are its eigenvalues. 
If $B = A^4 - 5A^2+5I$, where $I$ denotes $4\times 4$ identity matrix, then what would be determinant and trace of matrix $A+B$?
 [/INST] Since $A$ is $4\times 4$ and its eigenvalues are $2$, $-2$, $1$, and $-1$, the minimal and characteristic polynomials of $A$ agree and are both equal to
$$(t-1)(t+1)(t-2)(t+2) = (t^2-1)(t^2-4) = t^4 - 5t^2 + 4.$$
In particular, by the Cayley-Hamilton Theorem,
$$A^4 - 5A^2 + 4I = 0,$$
and therefore
$$B+A = A^4 - 5A^2 + 5I + A = (A^4-5A^2+4I) + (A+I) = A+I.$$
Now notice that $\lambda$ is an eigenvalue of $A$ if and only if $\alpha\lambda+\beta$ is an eigenvalue of $\alpha A+\beta I$, to conclude that the eigenvalues of $B+A=A+I$ are $0$, $-1$, $2$, and $3$. Therefore, the trace is $0-1+2+3 = 4$, and the determinant is $0$ (since $A+I$ is not invertible, or since the determinant is the product of the eigenvalues). 
</s>