Show that the elements $x^iy^j$ such that $i=0,1,2,3$ and $j=0,1$ are distinct elements of $G$, and hence constitute all elements of $G$. There exists a group $G$ of order $8$ having two generators $x,y:x^4=y^2=e$ and $xy=yx^3$. 
I found that $G=\{e,y,x,xy,x^2,x^2y,x^3,x^3y\}$
But how to show that these elements are distinct? Is saying that $|G|=8$ enough? Or maybe I should check all 56 possibilities and show that at that case $|G|<8$? Also I don't understand how to show that we have all elements of $G$ by checking only for $0\leq i\leq 3$ and $0\leq j\leq 1$? Maybe there are other distinct element for some finite combination $xxyyxyyxyxyy...xyyx$?
I just want to know intuitively what I can do with groups and what I can't. So I need answers, and some of them may seem stupid to you, but I just need them and that's all.
 A: Suppose we have a product of $x$'s and $y$'s in $G$. Repeatedly using $xy = yx^3$, we can move all the $x^k$ to the front of the product, giving us something of the form $x^iy^j$, where $i$ and $j$ are integers. Now using $x^4 = 1$ and $y^2 = 1$, we can arrange it so that $i \in \{0,1,2,3\}$ and $j \in \{0,1\}$. Since we can always do this beginning with any finite product, we deduce that $|G| \le 8$.
Now, suppose there are some $i,k\in\{0,1,2,3\}$ and $j,\ell\in\{0,1\}$ so that $x^iy^j = x^ky^\ell$ in $G$. Multiply on the left by $x^{-k}$ and on the right by $y^{-j}$. We see that $x^{i-k} = y^{j-\ell}$. The only equations we know that will let us deduce this are $x^4 = y^2 = e$, so we conclude $i-k =j-\ell = 0$. Thus $i = k$ and $j = \ell$, and we conclude $|G|=8$.

As an aside, I don't love the second paragraph as an argument for when you're first learning about groups. The idea I had behind it was that the equations that we are given are assumed to be enough to deduce any equality that is true in $G$. A nicer way to prove that there is such a group of order 8 is, as you say, to discuss $D_4$; show it satisfies the equations and has 8 elements.
