Can you solve for the identity matrix where A is non-invertible? If you have an $n\times m$ matrix $A$, and we assume that those dimensions are something like $3\times6$, is there a matrix $D$ such that $AD = I$?
You can prove the following result:
Claim Let $A$ be a $2 \times n$ matrix. Then, there exists a $n \times 2$ matrix $B$ so that $AD=I_2$ if and only if $\mbox{Rank}(A)=2$.
More generally, for an $m \times n$ matrix $A$, there exists a $n \times m$ matrix $B$ so that $AD=I_m$ if and only if $\mbox{Rank}(A)=m$.
This can be proven by using the fact that the corresponding linear transformation $T :\mathbb R^n \to \mathbb R^2$ is onto and hence has a right inverse.
A more elementary solution, which also tells you how to find $D$, is the following:
The systems
$$Ax= \begin{bmatrix} 1 \\ 0 \end{bmatrix} \\
Ay= \begin{bmatrix} 0 \\ 1 \end{bmatrix} \\
$$
are consistent (why?). Let $D$ be the matrix with columns $x$ and $y$ respectively.
Then
$$
AD = \begin{bmatrix} 1 &amp;0 \\ 0&amp;1 \end{bmatrix} 
$$
If $AA^T$ is invertible, then $D=A^T(AA^T)^{-1}$. This is the Moore-Penrose inverse; see https://en.wikipedia.org/wiki/Moore%E2%80%93Penrose_inverse.
Below is a series of Python commands to find the pseudo-inverse of a 2 x 4 matrix.
&gt;&gt;&gt; import numpy as np
&gt;&gt;&gt; A = np.array([[2, 4, -6, -10], [4, 8, -8, -8]])
&gt;&gt;&gt; A
array([[  2,   4,  -6, -10],
       [  4,   8,  -8,  -8]])
&gt;&gt;&gt; np.linalg.pinv(A)
array([[-0.06060606,  0.06818182],
       [-0.12121212,  0.13636364],
       [ 0.02272727, -0.05681818],
       [-0.17424242,  0.10227273]])
C = np.linalg.pinv(A)
&gt;&gt;&gt; C.dot(A)
array([[ 1.00000000e+00, -2.22044605e-16],
       [ 8.88178420e-16,  1.00000000e+00]])

Note that since $n &lt; m$, we can only find a left-inverse. Rank-nullity quickly implies that no right-inverse exists.