I'm trying to solve this problem from my group theory course:
Given $G$ finite group generated by two different order $2$ elements. Prove that $G\cong \mathbb{Z}_2^2$ or $G\cong D_n$ for some $n\geq 3$ (being $D_n$ the dihedral group of degree $n$).
The first part is easy, since if I consider $a,b$ these two different order $2$ elements, and suppose $G$ abelian, then I get $$G=\{1,a,b,ab\},$$ and obviously this is isomorphic to $\mathbb{Z}_2^2$.
I'm having trouble with the second part. I understand the idea of two different reflections from $D_n$ generating the whole $D_n$, but I don't know how to prove it. I know that $$D_n\cong\mathbb{Z}_n\rtimes_\phi \mathbb{Z}_2$$ for $\phi$ verifying that $\phi(\bar0)=id$ and $\phi(\bar1)$ being the inversion (correct me if I'm wrong), but I don't know if this is even useful here or how to use it in that case. How can I prove this? Any help will be appreciated, thanks in advance.
There are, of course, infinitely many different possibilities for the value of $n$. So the first thing one has to do is to specify which particular $n$ is the correct one.
For this purpose, it helps to have some knowledge of the finite dihedral group $D_n$, starting with this presentation: $$D_n = \langle \alpha,\beta \mid \alpha^2 = \beta^2 = (\alpha \beta)^n = \text{Id} \rangle $$ Furthermore, it helps to know that $n$ is, actually, equal to the order of $\alpha\beta$ in $D_n$.
With that in mind, using that your given group $G$ is finite, it follows that its element $ab$ has finite order; let $n$ be the order of $ab$.
At this point, you can now deduce the existence of a surjective homomorphism $\phi : D_n \to G$, given by the formula $\phi(\alpha)=a$, $\phi(\beta)=b$.
The last thing left to do is to prove that $\phi$ is injective. We know that $\text{kernel}(\phi)$ contains neither $\alpha$ nor $\beta$ (since $a$ and $b$ are nontrivial), nor any element conjugate to $\alpha$ or to $\beta$ (since $\text{kernel}(\phi)$ is normal), nor $(\alpha\beta)^k$ when $1 \le k < n$ (since $ab$ has order $n \ge 2$). That is, in fact, the complete list of all nontrivial elements of the group $D_n$. Thus $\text{kernel}(\phi)$ is trivial, so $\phi$ is injective.