Bijection between conjugates and right cosets of centralizer I recently started studying undergraduate algebra, and I came across a proof about the right cosets of the centralizer and the conjugacy class.
As for notation, let $G$ be a group, and fix $a\in G$. Denote the centralizer of $a$ by $C_G(a)=\{g\in G:ga=ag\}$ and the conjugacy class of $a$ as $\{g^{-1}ag:g\in G\}$.
The theorem states that there is a bijection between the right cosets of $C_G(a)$ and the conjugates of $a$. However, instead of explicitly defining a bijective function between $\{g^{-1}ag\}$ and $C_G(a)$, the proof does the following:

Proof. If $x,y\in G$ are in the same right coset, then $y=cx$ for some $c\in C_G(a)$. Thus $y^{-1}ay=x^{-1}c^{-1}acx=x^{-1}c^{-1}cax=x^{-1}ax$. Conversely, if $y^{-1}ay=x^{-1}ax$ then $xy^{-1}a=axy^{-1}$ and $xy^{-1}\in C_G(a)$ giving $x,y$ are in the same right coset. $\blacksquare$

The algebra/manipulation is all straightforward, but I'm struggling to understand what this proof is actually doing. My rough understanding of this proof is that:

If two conjugates of $a$ are equal (call them $x^{-1}ax$ and $y^{-1}ay$), then $x$ and $y$ are in the same right coset of $C_G(a)$.
If two elements $x,y$ are in the same right coset of $C_G(a)$, then $x^{-1}ax=y^{-1}ay$.

Is this interpretation correct? And if so, why does this show a bijection between the right cosets and the conjugates?
Thank you!
 A: As the proof shows, the elements of a given (fixed) coset of $C=C_G(a)$ all end up giving the same outcome, and hence we can define a function $f$ from the set of right cosets of $C$ to the set of conjugates of $a$ by $f(Cx) = x^{-1}ax$. That this is well defined is the thing the author actually proves when they show that the conjugate is independent of the choice of representative. Thus, $f(Cx) = f(Cy)$ whenever $x$ and $y$ are in the same right coset of $C$.
The other direction will also show that there exists a well defined function going the opposite direction. Suppose $x, y\in G$ are such that $x^{-1}ax=y^{-1}ay$. As the author shows, this leads to $xy^{-1}\in C$, and this means that $Cx = Cy$: $xy^{-1} = c \Leftrightarrow x = cy$ for some $c\in C$. Thus, we may define a function $g$ by $g(x^{-1}ax)=Cx$. It follows that, with the same $y$ as before, $f(y^{-1}ay)=Cy=Cx=f(x^{-1}ax)$, as desired.
Now, let's compose them. $(g\circ f)(Cx) = g(x^{-1}ax)=Cx$ and $(f\circ g)(x^{-1}ax)=f(Cx)=x^{-1}ax$, so the composites are identities, and so $f$ and $g$ are mutual inverses. That's how you get the bijection(s). The same thing can also be done if you just switch right cosets to left ones.
