When given $T:V \to V$ such that $T^2=I$, prove that $U,W \subseteq V$ subspaces exist such that:

$$V=U\oplus W$$

$$T(u)=u, \forall u \in U$$

$$T(w)=-w, \forall w \in W$$

My first thought was to define $W=kerT$ and $U=ImT$, then I can prove that $\dim(U+W)=\dim(U)+\dim(W) = \dim(V)$. that shows $U \oplus W=V$, and also $T(-w)=w=\bar{0}$.

But the second condition is not met.
I was also trying to define $U=sp\{\bar{u\_1},....,\bar{u\_n}\}\subseteq V$ as a subspace but I can't prove that $T(u)=u$

The problem should be solved with knowledge about direct sums and linear transformation.

any help will be much appreciated