A finite semi-group with cancellation laws is a group . I don't understand how to get this:  

A finite semigroup with cancellation laws is a group.  

Thanks in advance for any help.

For every $a\in S$ consider the mappings $S\to S$,  $x\mapsto ax$ and $x\mapsto xa$. The cancellation conditions imply that these mappings are injective. Since $S$ is finite they are also surjective. This means for any $a,b\in S$ the equations $ax=b$ and $xa=b$ admit solutions. This already guarantees that $S$ is a group. (The idea is the same as for the usual proof that each finite integral domain is a field.)
