Solution to Abstract Algebra by Dummit & Foote 3rd edition Chapter 3.2 Exercise 3.2.7
Let $G$ be a group and $H \leq G$. Define a relation $\sim$ on $G$ by $a \sim b$ if and only if $b^{-1} a \in H$. Prove that $\sim$ is an equivalence relation and describe for each $a \in G$ the equivalence class $[a]$. Use this to prove the following proposition.
Proposition: Let $G$ be a group and $H \leq G$. Then
(i) the set of left cosets of $H$ is a partition of $G$ and
(ii) for all $u,v \in G$, $uH = vH$ if and only if $v^{-1} u \in H$.
Solution: $\sim$ is an equivalence:
(a) Reflexive: $x^{-1}x = 1 \in H$, so that $x \sim x$ for all $x \in G$.
(b) Symmetric: Suppose $x \sim y$. Then $y^{-1} x \in H$. Since H is a subgroup, $$(y^{-1}x)^{-1} = x^{-1} y \in H,$$ and we have $y \sim x$.
(c) Transitive: Suppose $x \sim y$ and $y \sim z$. Then $y^{-1}x \in H$ and $z^{-1}y \in H$. Thus we have $$z^{-1}x =z^{-1}y\cdot y^{-1}x \in H$$ as $H$ is a subgroup. Thus $x \sim z$.
So $\sim$ is an equivalence.
Let $x \in G$ and suppose $y \sim x$. Then $x^{-1}y = h$ for some $h \in H$, hence $y = xh$. Thus $y \in xH$; so $[x] \subseteq xH$. Now suppose $y \in xH$. Then $y = xh$ for some $h \in H$, hence $x^{-1}y \in H$ and we have $y \sim x$, so that $xH \subseteq [x]$. Thus the $\sim$-equivalence classes of $G$ are precisely the left cosets of $H$.
Proof of Proposition 4: The left cosets of $H$ form the equivalence classes of a relation $\sim$ on $G$ defined by $x \sim y$ if and only if $y^{-1}x \in H$; the second conclusion of Proposition 4 follows trivially.