Solution (source code)

= Solution

The <rank-nullity theorem> says that for a <linear map> $T:V\to W$ with finite-dimensional <domain of a function> $V$,
$$
\boxed{\dim V=\dim\ker T+\dim\operatorname{im}T=\operatorname{nullity}T+\operatorname{rank}T.}
$$
Take a <basis> $k_1,\ldots,k_r$ of the <kernel of a linear map> and use <basis extension> to obtain a <basis> $k_1,\ldots,k_r,u_1,\ldots,u_s$ of $V$. We show that $T(u_1),\ldots,T(u_s)$ is a <basis> of the <image of a linear map>.

Every $v\in V$ is a <linear combination> of the extended <basis>, and its $k_i$ terms vanish under $T$. Therefore $T(v)$ is a <linear combination> of the $T(u_j)$, proving the required <linear span> property. For <linear independence>, suppose $\sum_j b_jT(u_j)=0$. Then $\sum_j b_ju_j\in\ker T$, so $\sum_j b_ju_j=\sum_i a_ik_i$ for some real <scalars> $a_i$. The extended <basis> is <linearly independent>, forcing every $a_i$ and $b_j$ to be zero. Thus the <image of a linear map> has <dimension> $s$, the <kernel of a linear map> has <dimension> $r$, and $\dim V=r+s$ proves the result.