TITLE: Prove that $(G, \circ)$ is a group if $a\circ x = b$ and $x\circ a = b$ have unique solutions
QUESTION [13 upvotes]: I have some difficulties with a task in algebra. I guess it's trivial and really easy but I can't figure out how to solve it.
I have a set $G$ and a binary operation on it, let it be $\circ$. I have that the operation is associative and that the equations $a\circ x = b$ and $x\circ a = b$ have unique solutions. I have to prove that $(G, \circ)$ is a group.
I already have that the operation is binary and associative, so I have to prove that there is unique identity element and unique inverse element and it will come from the equations, but how exactly?

REPLY [15 votes]: Just for the heck of it, we can do it even without the uniqueness assumption.
Assumed: that multiplication is associative and that the equations $ax=b$ and $xa=b$ have at least one solution for all $a$ and $b$.

If $e$ and $a$ are given such that $ea=a$, then $e$ is a left identify for every element.
Proof: Given $b$ let $x$ be such that $ax=b$. Then $eb=eax=ax=b$.
Similarly, anything that is a right identity for something is a right identity for everything.
If $l$ is a left identity for something and $r$ is a right identity for something, then $l=r$. 
Proof: By (1) and (2) $lr=l$ and $lr=r$.
There is a unique identity element. Namely pick any element $a$ and let $e$ solve $ea=a$. Then by (3) the solution to $ax=a$ must equal this $e$, and then by (3) again, everything that is a right or left identity of something must be $e$.
Uniqueness of inverses now follows by the usual argument: If $xa=ya=e$, then let $z$ be such that $az=e$ and then $x=xe=xaz=yaz=ye=y$ as well as $z=ez=xaz=xe=x$.


Come to think of it, this is actually a nicer characterization of groups than the usual mucking around with identities and inverses. A group is simply something with an associative operation such that everything can be made into anything else by multiplying it with something form the left or from the right, as we choose. Borrowing some terminology from graph theory we might call this a left-transitive and right-transitive associative operation. (Edit: It turns out this already has a name, though: Left simple semigroup and right simple semigroup -- and what the above proves is that groups are exactly those semigroups that are both left and right simple).