Suppose a finite set $G$ is closed under associative product and that both cancellation laws hold in $G$. Prove $G$ must be a group.

Suppose a finite set $G$ is closed under associative product and that both cancellation laws hold in $G$. Prove $G$ must be a group.

I somehow need to prove identity, inverse, that closure holds to prove that set is a group.

How do i begin? Hints?

Please mention the ideas behind the proof?

Thanks.

EDIT

The proof as posted in link below is

Prove that this is a group

I have doubts regarding this proof

1. There exists a element $e$ of G such that $f(e)=a$? Why does it exist?

2. Now as the function is surjective there exists an element $aa_{R} =e$? Why does it exist? What is the role of surjectivity here?

Thanks.

• @JyrkiLahtonen I have edited question .Can you unmark question as Duplicate – Taylor Ted Mar 22 '15 at 9:59
• Done. Sorry about the 1 hour delay. Deleting the comments that are no longer needed. – Jyrki Lahtonen Mar 22 '15 at 11:16
• He chose $f(g)=ag$ because it works. But, really, what else could you even try? You are trying to show that there's an identity, so, given $a$, you want to look at all the products $ag$ to see whether you can show one of them is $a$. – Gerry Myerson Mar 22 '15 at 11:52
• @GerryMyerson How should i think if i were to seek an alternate proof for this ? – Taylor Ted Mar 22 '15 at 16:48
• @GerryMyerson Without defining function – Taylor Ted Mar 22 '15 at 16:48