Conjugacy classes for $G_1 \times G_2$ 
Let $G = G_1 \times G_2$ be the product of groups $G_1$ and $G_2$. Prove that
$$|\text{conjugacy classes of $G$}| = |\text{number of conjugacy classes of $G_1$}| \cdot |\text{number of conjugacy classes of $G_2$}|. $$

I believe that this proof requires that the groups be finite. Otherwise, I can't say that any of them possess a finite number of conjugate classes. So, suppose each of the groups in this problem are finite.
I know that the conjugacy classes have to partition the group, but their sizes can differ. Do I need to use the class equation?
 A: Here is a basic framework for a proof:

*

*Pick a conjugacy class of $G_1$ and a conjugacy class of $G_2$, and show that together they determine a single conjugacy class of $G$ in a very natural way

*Show that any conjugacy class in $G$ can be constructed this way

A: Consider the function $\phi$ that takes the conjugacy class $[(a,b)]$ of some element $(a,b)\in G_1\times G_2$ and gives you $\phi([(a,b)])=([a],[b])$, i.e., an ordered pair formed by the conjugacy class of $a\in G_1$ and the one of $b\in G_2$. This function (if it's well-defined) goes from the set of conjugacy classes of $G_1\times G_2$ to the set of ordered pairs formed by the conjugacy classes of $G_1$ (first component) and the conjugacy classes of $G_2$ (second component).
This last set has clearly cardinality $|\text{number of conjugacy classes of $G_1$}| \cdot |\text{number of conjugacy classes of $G_2$}|$, so all we need to do is show $\phi$ is a bijection. But first, we'll see it's well-defined. If $[(a,b)]=[(c,d)]$ then there is some $(g,h)\in G_1\times G_2$ such that $(a,b)=(g,h)*(c,d)*(g,h)^{-1}=(g,h)*(c,d)*(g^{-1},h^{-1})=(g*c*g^{-1},h*d*h^{-1})$, so $a=g*c*g^{-1}$ and $b=h*d*h^{-1}$, and thus $[a]=[c]$ and $[b]=[d]$. Therefore $([a],[b])=([c],[d])$ and $\phi$ is well defined.
Now, if $([a_1],[b_1])=([a_2],[b_2])$ then $[a_1]=[a_2]$ and $[b_1]=[b_2]$, so $a_1=g*a_2*g^{-1}$ for some $g\in G_1$ and $b_1=h*b_2*h^{-1}$ for some $h\in G_2$. Therefore $(a_1,b_1)=(g,h)*(a_2,b_2)*(g,h)^{-1}$, so $[(a_1,b_1)]=[(a_2,b_2)]$ and $\phi$ is one-to-one.
Lastly, take some $([a],[b])$. Considering $[(a,b)]$ we easily get $\phi([(a,b)])=([a],[b])$, so $\phi$ is onto.
We conclude $|\text{conjugacy classes of $G$}| = |\text{number of conjugacy classes of $G_1$}| \cdot |\text{number of conjugacy classes of $G_2$}|$.
