One way to define the quaternion group is to define it as the group generated by 2 elements $a, b$ with:
- $a^4 = 1$;
- $b^2 = a^2$;
- $b^{-1}ab = a^{-1}$.
There are also other groups defined in a similar way, that is, defined as the group generated by elements satisfying certain equations or conditions. For example, the generalized quaternion groups.
The problem is, how do we know such conditions are able to define one and only one group structure? If we use random equations or conditions, it may happens that they are incompatible and no group can satisfy them, or that there are more than one non-isomorphic groups satisfying them.
Are there any theorems on when the conditions are well-selected? (In general cases or in certain circumstances of interest\importance)
Given a set of generators and relations on those generators, yes, there is always a group satisfying those relations. The trivial group will always work. Notice that if $G=\{1\}$, then setting $a=b=1$, the quaternion relations are satisfied.
What is more interesting is to ask what the largest group satisfying those relations might be. If you sort out exactly what "largest" should mean (for finite groups this just means size), it turns out that not only is there such a group, but it is unique (up to isomorphism).
Here's a sketch of how this is done: Take your generators and create all words over the generators and symbols representing inverses. For example, form all words over the alphabet $a,a^{-1},b,b^{-1}$. Words here just mean finite strings of letters. For example, $aaba^{-1}bbb^{-1}a^{-1}a$.
Next, introduce an equavalence relation allowing you to insert and delete $xx^{-1}$ and $x^{-1}x$ for any generator $x$. Thus, for example, $abb^{-1}=a=b^{-1}ba=b^{-1}aa^{-1}ba$.
Introduce an operation: concatenation. To multiply words, you just slap them next to each other. $ab$ times $b^{-1}ab$ is $abb^{-1}ab$.
With some trouble you can prove that this operation is well-define (i.e., respects the equivalences of words). It is associative, the identity is the equivalence class of the empty word, and inverses are just words written backwards with $x$'s swapped for $x^{-1}$'s and vice-versa.
What we get here is the so-called Free Group (it is free of all relations except for those which are required to have a group). If $F$ is the free group on one generator, say $a$, words look like $aaa^{-1}aa^{-1}a^{-1}aa$. Any word here can be simplified to some power of $a$ and this group is isomorphic to the integers under addition.
Now let $S$ be a set of generating letters. For example, $S=\{a,b\}$. Let $R$ be a set of words over the generators and their inverses. For example, $R=\{a^4,b^2a^{-2},b^{-1}aba^{-1}\}$.
Let $F(S)$ be the free group generated by $S$. Let $N$ be the intersection of all normal subgroups (of $F(S)$) containing $R$ (i.e., the normal subgroup generated by $R$) - call this $N$. Then $G=F(S)/N$ is a group generated by $S$ and since we quotiented by $N$ which contains $R$ we have that $w=1$ for every word $w \in R$. Thus $G$ is generated by $S$ and satisfies the relations in $R$. Since we found the smallest possible $N$ that contains $R$, the quotient $F(S)/N$ is as big as possible.
This group is called the group presented by $\langle S\;|\; R\rangle$. One can show that any other group generated by $S$ and satisfying the relations $R$ must be a quotient of this group.
Note: My $R$ contained stuff like $b^2a^{-2}$. In the quotient (modding out by $R$), this becomes $b^2a^{-2}=1$ so this encodes $b^2=a^2$.