Problem proving: $V = \ker T \oplus \operatorname{im}T$

Let $V$ be a finite linear subspace and $T$ be a linear transformation defined like this: $T:V \to V$ such that $\ker T^2 \subseteq \ker T$

Prove that: $V = \ker T \oplus \operatorname{im}T$

What I did is:

It’s known that: $V = \operatorname{im}(T) + \ker(T)$ so all I need to prove is that:

$$\operatorname{im}(T) \cap \ker(T) = \{0\}$$

So I said that because $V$ is finite:

$$\dim(V) =N$$
$$\dim(\operatorname{im}(T)) + \dim(\ker(T)) = N$$

According to the dimensions theorem:

$$\begin{align*}
\dim(\operatorname{im}(T) + \ker(T)) &= \dim(\operatorname{im}(T)) + \dim(\ker(T)) – \dim(\operatorname{im}(T) \cap \ker(T))\\\\
\dim(\operatorname{im}(T) \cap \ker(T)) &= \dim(\operatorname{im}(T)) + \dim(\ker(T)) – \dim(\operatorname{im}(T) + \ker(T)) \\\\
\dim(\operatorname{im}(T) \cap \ker(T)) &= 0
\end{align*}$$

But for some reason I didn’t use the fact that $\ker T^2 \subseteq \ker T$, so I must have been wrong here.

Can someone please help me understand how to prove it?

Thanks.

Solutions Collecting From Web of "Problem proving: $V = \ker T \oplus \operatorname{im}T$"

From your response you seem to think that $$\dim(\operatorname{im}(T)+\ker(T))=\dim(\operatorname{im}(T))+\dim(\ker(T));$$ but as pointed out in the comments this is not necessarily the case (consider for example the linear map $T:\mathbb{R}^2\to \mathbb{R}^2$ defined by the matrix $\begin{pmatrix} 0 & 1\\0 &0 \end{pmatrix}$, where
$$\operatorname{im}(T)=\ker(T)=\mathbb{R}\cdot\begin{pmatrix} 1 \\ 0 \end{pmatrix}$$

To prove that $\operatorname{im}(T)\cap \ker(T)=\{0\}$, consider an element $x\in \operatorname{im}(T)\cap \ker(T)$; then $T(x)=0$ and $x=T(y)$ for some $y\in V$. Thus $T^2(y)=T(x)=0$, which means $y\in \ker(T^2)$; since $\ker(T^2)\subset \ker(T)$, $y\in \ker(T)$, and thus $x=T(y)=0$.