Cosets are Equal iff Product with Inverse in Subgroup

Theorem
Let $$G$$ be a group and let $$H$$ be a subgroup of $$G$$.

Let $$x, y \in G$$.

Let:
 * $$x H$$ denote the left coset of $$H$$ by $$x$$;
 * $$H x$$ denote the right coset of $$H$$ by $$x$$.

Then:
 * $$x H = y H \iff x^{-1} y \in H$$;
 * $$H x = H y \iff x y^{-1} \in H$$.

Proof

 * $$x H = y H \iff x^{-1} y \in H$$:

$$ $$ $$


 * $$H x = H y \iff x y^{-1} \in H$$:

$$ $$ $$