Solution to Abstract Algebra by Dummit & Foote 3rd edition Chapter 1.5 Exercise 1.5.3
Find a set of generators and relations for $Q_8$.
Solution: Let $$X = \langle x, y \ |\ x^4 = y^4 = 1, y^2 = x^2, yx = x^3 y \rangle.$$ We claim that $Q_8 = X$ with the substitutions $x = i$ and $y = j$. Note that due to the relations in $X$, we can write every element of $X$ uniquely in the form $x^a y^b$ where $0 \leq a < 4$ and $0 \leq b < 2$, so $|X| = 8$. Moreover, since $i^4 = j^4 = 1$, $i^2 = -1 = j^2$, and $ji = -k = i^2 ij$, $i,j \in Q_8$ satisfy the relations in $X$. So we have $$Q_8 = \langle x, y \ |\ x^4 = y^4 = 1, y^2 = x^2, yx = x^3 y \rangle.$$