Solution (source code)

= Solution

Put $r=g_1$ and $s=g_2$. Direct <matrix multiplication> gives
$$
r^3=s^2=I,\qquad srs=r^{-1}.
$$
Moving every $s$ to the right shows that every word in these <generators of a group> has the form $r^a s^b$, with $a\in\{0,1,2\}$ and $b\in\{0,1\}$. The three $r^a$ are distinct diagonal <matrices>, and the three $r^as$ are distinct off-diagonal <matrices>. Hence
$$
\boxed{G=\{I,r,r^2,s,rs,r^2s\},\qquad |G|=6.}
$$
Since $srs=r^2\ne r$, this is a <non-abelian group>. Its <group presentation> identifies it with the <dihedral group> of an equilateral triangle, equivalently the <symmetric group> $S_3$.

The <conjugacy classes> are
$$
\boxed{\{I\},\qquad \{r,r^2\},\qquad \{s,rs,r^2s\}.}
$$
Indeed $s$ interchanges $r$ and $r^2$ by <conjugation>, while $r^a s r^{-a}=r^{2a}s$ runs through all three reflections. No reflection is conjugate to a rotation, since <conjugation> preserves <order of a group element>.

There are three inequivalent complex <irreducible representations>, one for each <conjugacy class>. The <sum of squares of irreducible representation dimensions> gives $d_1^2+d_2^2+d_3^2=6$. One <representation> is trivial, and the only possible positive integer dimensions are
$$
\boxed{d_1,d_2,d_3=1,1,2.}
$$