find special basis to make null space part equal to zero Let $V,W$ be two vector spaces over a field $K$. Assume $dim(V)=m,dim(W)=n$. Consider the pairs $(A,w)$ where $A:V\to W$ is a linear map and $w\in W$.
(a) Assume that $w\notin Im(A)$. Prove that there exists a number r, $1\le r\le min(m,n-1)$ and bases $\{v_1,\cdots,v_m\}$ and $\{w_1,\cdots,w_n\}$ of $V, W$ respectively such that $A(v_i)=w_i$ for $1\le i\le r$ and $A(v_i)=0$ for $i>r$, and $w_n=w$.
(b) Assume that $w\in Im(A)$. Prove that there exists a number r, $1\le r\le min(m,n)$ and bases $\{v_1,\cdots,v_m\}$ and $\{w_1,\cdots,w_n\}$ of $V, W$ respectively such that $A(v_i)=w_i$ for $1\le i\le r$ and $A(v_i)=0$ for $i>r$, and $w_1=w$.
I kind of understand the conclusion in this problem. And I know that this $r$ must be the rank. And I think this result must be true, since we can always change basis to make things clean(the redundant column could be zeros). But I don't know how to prove it. 
I think maybe I can use singular value decomposition $A_{n\times m}V_{m\times m}=U_{n\times n}\Sigma_{n\times m}$? The $r$ is included in $\Sigma$. We can arbitrarily change the last $(n-r)$ column in $U$(since the last (n-r) row are zeros?) and thus make the last column be $w$?
Thank you very much!
 A: For part a:
Define $r:= m-\dim (\ker A)$, and then choose a basis $\{ v_{r+1}, ... , v_m\}$ for $\ker A$. Then extend this to a basis $\{ v_1, ..., v_m \}$ for all of $V$. Then I claim that $\{ Av_1, ..., Av_r \}$ are linearly independent members of $W$, and form a basis for $Im(A)$. Check this (it's not hard). So define $ w_i:= Av_i$ for $1 \leq i \leq r$. Since $w \notin Im(A)$, we know that $\{w_1,...,w_r,w\}$ is a linearly independent set, and so it can be extended to a basis $\{w_1, ..., w_{n-1},w \}$ for $W$. Define $w_n:=w$. Then the two bases $\{v_1,...,v_m\}$ and $\{w_1,...,w_n\}$ satisfy all of the desired properties.
For part b:
If $w=0$, then it's false, so assume $w \neq 0$.
Again, define $r:= m-\dim (\ker A)$, and then choose a basis $\{ v_{r+1}, ... , v_m\}$ for $\ker A$. Then choose $v_1 \in V$ such that $Av_1=w$. Since $Av_1=w \neq 0$, we know that $v_1$ is linearly independent of $\{v_{r+1}, ... , v_m\}$. Therefore, we can extend $\{v_1,v_{r+1}, ... , v_m\}$ to a basis $\{v_1,...,v_m\}$ for $V$. Define $w_i:=Av_i$ for $1 \leq i \leq r$, and then argue that $\{w_1,...,w_r\}$ is linearly independent, as in part a. Then extend $\{w_1,...,w_r\}$ to a basis $\{w_1,...,w_n\}$ for $W$. Then the two bases $\{v_1,...,v_m\}$ and $\{w_1,...,w_n\}$ satisfy all of the desired properties.
Note: $\ker A$ denotes the null space of $A$
