Proving that if $A$ is an $m\times n$ matrix and has rank equal to $m$ then $A$ has a right inverse. By a "right inverse" I mean an $n\times m$ matrix $B$ such that $AB = I_m$, where $I_m$ is the $m\times m$ identity matrix.
So, obviously $m \leq n$ for $A$ to be of rank $m$.
I already know that if $m=n$ then $A$ is an $m$ x $m$ matrix with rank $m$ so it must be invertible.
Any hints on how to prove for when $m < n$? Am I going about it wrongfully in separating the problem into two different cases?
 A: Let $A$ be an $m \times n$ matrix of rank $m.$ Let $b \in \mathbb{R}^m$ be arbitrary. If $A'$ is the reduced echelon form of $A$, then $A'$ has a pivot  in every row, so the matrix $\begin{bmatrix}A \thinspace | \thinspace b  \end{bmatrix}$ does not have a pivot in the last column and thus the system $Ax=b$ has a solution. Since $b$ was arbitrary, we conclude that the system $Ax=b$ has a solution for every $b \in \mathbb{R}^m.$ In particular, for all $i=1,\ldots,m,$ the system $Ax=e_i$ (where $e_i=(0,\ldots,1,\ldots,0)^{t},$ the 1 in the $i$th component) has a solution, say $r_i$ for every $i$, that is,
$$ Ar_1=e_1, Ar_2=e_2,\hspace{0.4cm} \ldots \hspace{0.4cm} Ar_m=e_m.$$
Let $R=\begin{bmatrix} r_1 & \cdots & r_m\end{bmatrix}.$ Then
$$ AR=A\cdot \begin{bmatrix} r_1 & \cdots & r_m\end{bmatrix}=\begin{bmatrix} Ar_1 & \cdots & Ar_m\end{bmatrix}=\begin{bmatrix} e_1 & \cdots & e_m\end{bmatrix}=I_m.$$
A: If $A$ is $m\times n$, then it represents a linear map $T_A:\mathbb{R}^n\longrightarrow \mathbb{R}^m$. That its rank equals $m$ also implies that the image of $T_A$ is all of $\mathbb{R}^m$, ie, it is surjective.
For each $i\in\{1,\dots,m\}$, choose some $v_i\in {T_A}^{-1}(\{e_i\})$ and let $V=\bigoplus_{i=1}^m\text{span}(v_i)$. Notice that $V\subset\mathbb{R}^n$ is $m$-dimensional, and $A(V)=\mathbb{R}^m$.
A right inverse $B$ would be an $n\times m$ matrix such that $AB=I_m$, the $m\times m$ identity. Such a $B$ would represent a linear map $T_B:\mathbb{R}^m\longrightarrow \mathbb{R}^n$, and can be defined as follows. Let $Be_i=v_i$ for each $i=1,\dots,m$. Since this defines $B$ throughout a basis of $\mathbb{R}^m$, it defines $B$ entirely. It's also easy to see by construction that $ABv=v$, so we're done.
