Let $G$ be a group, and $S$ is a subset of $G$. Let relation $\sim$ on $G$ be as following.
$$a\sim b\iff a^{-1} b\in S$$
If $\sim$ is an equivalence relation, then $S$ is a subgroup of $G$. I want to prove this.
I know if we assume $S$ is a subgroup of $G$, then $\sim$ is an equivalence relation. But this problem asks the converse.
Take $x,y\in S$ and I want to show $x^{-1}y\in S$, but I don't have good ideas to use the condition that $\sim$ is an equivalence relation.
Thank you for your help.
Since $\sim$ is an equivalence relation, we know that it must be:
So we've already seen that $S$ is non-empty (from the second point), and just need to show that $S$ is closed under multiplication and inverses. For the latter, note that for $a \in S$, we have $a = 1^{-1}a \in S$, so $1 \sim a$, so $a \sim 1$ by symmetry, so $a^{-1} = a^{-1}1 \in S$.
For the former, if $a, b \in S$, then by the above, $a^{-1} \in S$, and as above, $a^{-1} \sim 1$ and $1 \sim b$, so by transitivity, $a^{-1} \sim b$, hence $ab \in S$.