Why is $\det(I + A^{50}) = 4$ here? I’m trying to understand the reasoning behind the following:

Let $A \in \mathbb{R}^{3\times3}$ with eigenvalues $1$, $-1$, $0$. What is $\det \left(I + A^{50} \right)$?

The given answer is 4.
A is obviously singular due to eigenvalue 0. Moreover, spectral decomposition of $A$ exists:
$$
A = T diag(1, -1, 0) T^{-1}\\
A^{50} = T diag(1, -1, 0)^{50} T^{-1}
$$
But I can’t see why $\det(I + T diag(1, -1, 0)^{50}T^{-1})$ would be 4 either, due to the limited knowledge about $T$. Can somebody shed light on this for me?

As you said, you can diagonalize $A=PDP^{-1}$ with $D=\operatorname{diag}(1,-1,0)$. Then $A^{50}=PD^{50}P^{-1}$. $D^{50}=\operatorname{diag}(1,1,0)$. 
So, 
$$\det(I+A^{50})=\det(P^{-1}(I+A^{50})P)=\det(I+D^{50})=\det(\operatorname{diag}(2,2,1))=4.$$
The first equality follows from the fact that determinants are invariant under change of basis. The second follows from distributing.
