<s>[INST] Find all the right inverses of a matrix How do I find the right inverse of a non square matrix?
The matrix i have is
$$M =
\begin{bmatrix}
1 & 1 & 0 \\
2 & 3 & 1\\
\end{bmatrix}$$
Im really not sure how to even start this?
 [/INST] Right inverse means a matrix $A_{3 \times 2}$ such that $MA=I_{2 \times 2}$. So you are looking for a matrix $A=\begin{pmatrix}x&p\\y&q\\z&r\end{pmatrix}$ such that
$$MA =
\begin{pmatrix}
1 & 1 & 0 \\
2 & 3 & 1\\
\end{pmatrix}\begin{pmatrix}x&p\\y&q\\z&r\end{pmatrix}=\begin{pmatrix}1&0\\0&1\end{pmatrix}.$$
This gives the following system:
\begin{align*}
x+y & = 1\\
2x+3y+z & = 0\\
p+q & = 0\\
2p+3q+r & = 1.
\end{align*}
Solving this gives 
$$A=\begin{pmatrix}3+z & r-1\\-2-z & 1-r\\z & r\end{pmatrix},$$
where $r,z \in \mathbb{R}$.
</s>