I want to prove that the unit element in a group is unique.
My attempt:
Suppose $e,e'$ are unit elements of a group $G$. By definition, we have:
$\forall g \in G: eg = g = ge$ and $e'g = g = ge'$
Thus we find that $eg = e'g$
Because $*: S \times S \rightarrow S$ (this is the multiplication on the group, but we never write it down) is a function, we can multiply both sides with an inverse of g (this inverse exists by the definition of a group and turns out to be unique). Denote this inverse with $h$. Hence, we obtain:
$(eg)h = (e'g)h \Rightarrow e(gh) = e'(gh) \Rightarrow e = e'$, using associativity and the definition of inverse elements and unit elements.
Can someone verify whether this proof looks correct? It bothers me that I did not use all the information from the definition of unit element.
Thanks in advance.