The book I'm reading presents a proof for the following proposition. (Note: Sylows theorem has not been presented yet.)
Let $G$ be a group of order $2p$, where $p$ is a prime greater than $2$. Then $G$ is isomorphic to $Z_{2p}$ or $D_p$.
They first show that if there's an element of order $2p$ then it generates a cyclic group, which can be shown to be isomorphic to $Z_p$. If no such element exists, they show there can be elements of orders only $p$ and $2$. Letting $|a|=p$ and $|b|=2$, they show $ab=ba^{-1}$. They then make the following claim:
Since the multiplication table for all noncyclic groups of order $2p$ is uniquely determined by the relation $ab=ba^{-1}$, all noncyclic groups of order $2p$ must be isomorphic to each other.
How do I see that's true?