Let $A$ be an $m \times n$ matrix of rank $r$. Suppose $\mathbf{v}_1, \ldots, \mathbf{v}_n$ are a basis for $\mathbb{R}^n$ such that $\mathbf{v}_{r+1}, \ldots, \mathbf{v}_n$ form a basis for $\operatorname{ker} A$. Prove that $\mathbf{w}_1=A \mathbf{v}_1, \ldots, \mathbf{w}_r=A \mathbf{v}_r$ form a basis for $\operatorname{img} A$.