**Proof plan.** We construct a basis for $V$ by combining a basis for $\ker(T)$ with additional vectors, and show that the images of the additional vectors form a basis for $\operatorname{Im}(T)$.
**Step 1.** Let $\{u_1, \ldots, u_k\}$ be a basis for $\ker(T)$, where $k = \operatorname{nullity}(T)$. Extend this to a basis $\{u_1, \ldots, u_k, v_1, \ldots, v_r\}$ for $V$ (this is always possible, with $k + r = n$).
**Step 2.** We claim $\{T(v_1), \ldots, T(v_r)\}$ is a basis for $\operatorname{Im}(T)$.
*Spanning:* Any $w \in \operatorname{Im}(T)$ has the form $w = T(v)$ for some $v = \sum_i a_i u_i + \sum_j b_j v_j$. Then $w = \sum_i a_i T(u_i) + \sum_j b_j T(v_j) = \sum_j b_j T(v_j)$, since $T(u_i) = \mathbf{0}$.
*Independence:* Suppose $\sum_j c_j T(v_j) = \mathbf{0}$. Then $T(\sum_j c_j v_j) = \mathbf{0}$, so $\sum_j c_j v_j \in \ker(T)$, meaning $\sum_j c_j v_j = \sum_i d_i u_i$ for some scalars $d_i$. But $\{u_1, \ldots, u_k, v_1, \ldots, v_r\}$ is a basis for $V$, so all coefficients vanish: $c_j = 0$ and $d_i = 0$.
Therefore $\operatorname{rank}(T) = r = n - k = n - \operatorname{nullity}(T)$.