Let $V,W$ be vector spaces. Prove that if there exists a linear transformation $T:V \to W$ such that both $\ker(T)$ and $\operatorname{Im}(T)$ are finite-dimensional then $V$ is finite-dimensional as well.
I'm not sure how to prove this. My first intuition was to use the dimension theorem, but I can't because it requires that the domain is finite dimensional, and that's what I want to prove.