Does Gale-Shapley work when the number of men and women are not equal?
First thing is algorithm will definitely terminate in the case even when number of men are not equal to women. Now at the end of Gale-Shapley algorithm for the case when number of men$(m)$ and women$(w)$ are equal.


  Each man can have the best partner that he can have in any stable matching.


If you only care about men then there are two cases:


If $m &gt; w$ then algorithm will terminate but at the end there are going to be some men left out without matching
If $m &lt; w$ then algorithm will terminate then at the end, each man can have the best partner that he can have in any stable matching.