Showing formally that $H:=\langle x,y| x^2, y^n, yxyx^{-1} \rangle$ is a presentation of $D_{2n}$ I want to Show formally that $H:=\langle x,y| x^2, y^n, yxyx^{-1} \rangle$ is a presentation of $D_{2n}$. To start with, by the universal property of the free group, there is a group homomorphism $\phi: H \to D_{2n}$. Then it remains to show that the kernel of $\phi$ is the smallest normal subgroup containing $x^2, y^n, yxyx^{-1}$. I am so confused as to how to prove this, because all of the sources that I found never prove this directly by definition. Most of them even do not mention that we need to prove this. But isn't this the definition of the group presentation?
My $D_{2n}$ is defined to be the group of symmetries of an $n-gon$, and assume that I know $ D_{2n} = \{e, a, b, b^1, \ldots, b^{n-1}, ba, \ldots, b^{n-1}a\}$, where $a^2 = e$, $b^n = e$ and $ab = b^{-1}a$.
 A: First, note that you know that these relators are all required (although in theory some may be degenerate), as you have pointed out, so we have a surjective homomorphism $\phi: H\rightarrow D_{2n}$.

Task (left to reader). Show that every element in $H$ may be written in the form $y^ix^j$ for some integers $i\in\{0, 1\}$ and $j\in\{0, 1, \ldots, n-1\}$.

Once you have completed this task then the result follows, as it says that $H$ has order at most $2n$. Therefore, as $\phi$ is surjective onto a group with $2n$ elements, $\phi$ must infact be bijective and so an isomorphism.

My use of cardinalities in the last paragraph is unnecessary. You can clearly see that it is a bijection without using cardinalities. This idea then generalises to semidirect products (and further to all extensions, but that is more complicated): If $G=N\rtimes H$ and $H$ acts on $N$ via the automorphism $\varphi\in\operatorname{Aut}(N)$ then $G$ has the relative presentation* $\langle H, N\mid hnh^{-1}=\varphi(n)\rangle$, and that this is actually a relative presentation for $G$ is proved using the same ideas as above.
*To get an actual presentation for $G$ you add in generators and relators for $N$ and $H$ in the hopefully obvious way...
