Generalized inverse solution to system of linear equations proof I'm going through a set of course notes for an introduction to the theory of linear models class at my university. Unfortunately, the professor who wrote this note set is no longer at this school, and I have no means of contacting him. So, I'm having trouble with a proof, and was looking for help.
Theorem 2.4
For an $m$ x $n$ matrix A, the matrix G is a generalized inverse of A if and only if G$y$ is a solution to A$x=y$ for every $m$ x $1$ vector $y$ that makes A$x=y$ a consistent system of linear equations.  
I know that I must prove two statements:
1) Assume that G is a generalized inverse of A and show that this implies G$y$ is a solution to A$x=y$ whenever it is consistent. 
2) Assume that G$y$ is a solution to A$x=y$ for every $y$ that makes the system consistent, then prove G is a generalized inverse of A.  
The first part was rather trivial. I proved it, and my proof agreed with the one provided by the professor. However, for the life of me, I cannot prove (2). I've sat at my desk for two hours now trying. The proof provided by the professor seems entirely incorrect, too.  
My attempt at a proof
All I have is restatement of the assumption. Let G be a solution to A$x=y$ whenever $y$ is such that the system is consistent.
Then AG$y$ = AGA$x$.  
The solution
The professor cherry picks $y=a_j$, the jth column of A. Then says
AGA = AG$[a_1 ... a_n] = [a_1 ... a_n] =$A. Thus, G is a generalized inverse of A. QED.  
This is  wholly unsatisfactory in my opinion. What about all of the $y$ vectors that ARE NOT merely column vectors of A but for which A$x=y$ is still consistent? This proof says nothing of these cases.  
Can someone please shed light on the correct method to prove the second statement?  
 A: The cherry-picking is the key idea.  The point is that the condition "whenever $y$ is such that the system is consistent" is stronger than needed.
Note that there are $n$ $y$'s for which the system is obviously consistent: the columns of $A$.  This is because with $x=x_i=(0,0,\ldots,0,1,0,\ldots,0)$, with a $1$ in position $i$, $Ax = a_i = y_i$.
Now it is not necessarily the case that $Ga_i = x_i$. Nevertheless, when you stack the columns $Ga_1, Ga_2, \ldots, Ga_n$ vertically, you obtain an $n\times n$ matrix--it's precisely $GA$, obviously--that when left-multiplied by $A$ must return the stack of columns $y_i$. But that's exactly $A$ itself, since $y_i=a_i$.  We have just seen that $A(GA) = A$, QED.

For a little more intuition, note that the set of $y$ that make the system consistent is a vector space $V$ (the column space of $A$).  Because what is to be proven is a consequence of various linear operations, it will suffice to demonstrate it on a generating set for $V$. An obvious, immediately available generating set consists of the columns of $A$ itself.  Statement (2) could just as well have been written

Assume that $Gy$ is a solution to $Ax=y$ for every $y$ in a basis for the column space of $A$.  Prove $G$ is a generalized inverse of $A$. 

