# Rank-Nullity confusion

Consider a linear map $$T\colon V\to V$$ and the composition $$T^2$$. Would the rank-nullity theorem applied to $$T^2$$ be $$\mathop{\mathrm{rank}}(T^2)+\mathop{\mathrm{nullity}}(T^2)=\dim V?$$ or can we say, let $$U$$ be the map restricted to $$\mathrm{im}(T)$$, then $$\mathop{\mathrm{rank}}(U)+\mathop{\mathrm{nullity}}(U)=\mathop{\mathrm{rank}}(T)?$$ or do both hold?

Both are correct, but you are applying the dimension theorem first to $$T^2\colon V\to V$$, and then to $$T\restriction \mathrm{im}(T)=U\colon\mathrm{im}(T)\to\mathrm{im}(T)$$, which are different maps.
To answer your question, the dimension theorem "applied to $$T^2$$" would be the first equality $$\mathop{\mathrm{rank}}(T^2)+\mathop{\mathrm{nullity}}(T^2)=\dim V.$$