Find maximum order of a group G Let $G$ be a non-abelian group with $e$ being the identity element. We know that there exists $y$ of order $2$ in $G$ so that $x^2=y$ for all $x \in G \setminus \{e,y\}$.
Find the maximum order that $G$ can have.
I have no clue where to start, I know that every element has order $1,2$ or $4$ so the group must have order a power of $2$, but I don't have ideas how to find a way to "limit" the number of elements. I found out that the quaternions are a group of order $8$ that verify these requirements, so the minimum is greater or equal to 8.
 A: The quaternion group shows you can have a group of order $8$.
In fact, this is the only possibility. We could invoke the following:

Theorem. A finite $p$-group having a unique subgroup of order $p$ is either cyclic or generalized quaternion.

This is Theorem 5.46 in Rotman's Introduction to the Theory of Groups, 4th Edition.
The generalized quaternion group of order $2^n$ is
$$Q_n = \langle a,b\mid a^{2^{n-1}}=1,\ b^2=a^{2^{n-2}}, bab^{-1}=a^{-1}\rangle.$$
This is abelian for $n=2$, so assume $n\geq 3$. Since $a$ has order $2^{n-1}$, and in our group every element has order dividing $4$, the only possible value for $n$ is $n=3$.
Thus, the only finite group with the given property is $Q_8$.
But I think we can prove this without having to establish the result above.
Suppose $G$ is as given. Note that $y$ is central, since for every $x\in G$, either $x\in\{e,y\}$ and hence $x$ commutes with $y$, or else $x$ commutes with $x^2=y$. Thus, $y\in Z(G)$.
Because $G$ is not abelian, there must exist $a,b\in G$ that do not commute. I claim that $\langle a,b\rangle$ is isomorphic to $Q_8$. Indeed, we have $a^2=b^2$; since $a$ and $b$ do not commute, we cannot have $ab=e$, and we cannot have $ab=y$ (as then we would have $b=a^{-1}y = a^{-1}a^2=a$). So $a^2=b^2=(ab)^2$. Moreover, $ab(ab) = y$, so $\langle a,b\rangle$ is a quotient of
$$\langle i,j,k\mid i^2=j^2=k^2=(ijk)\rangle = Q_8,$$
hence has order at most $8$; but since $\langle a,b\rangle$ is nonabelian, it cannot have order less than $8$, hence $\langle a,b\rangle\cong Q_8$, as claimed.
Now suppose there is some other element $z\notin\langle a,b\rangle$. I claim that $z$ must commute with either $a$, $b$, or $ab$. Indeed, if $z$ does not commute with $a$, then $az\notin\{e,y\}$, so $(az)^2 = y$. Therefore,
$$az = z^{-1}a^{-1}y = z^3a^3y = zz^2aa^2y = zyayy = zay^3 = zay.$$
Similarly, if $z$ does not commute with $b$, then $bz=zby$.
But now we have
$$abz = azby = zayby = zabyy = zab.$$
Thus, if $z$ does not commute with $a$ nor with $b$, then it commutes with $ab$.
But now we have a problem: because if $z$ commutes with $x$, where $x\in\{a,b,ab\}$, then $zx\notin\{e,y\}$, but
$$(zx)^2 = z^2x^2 = yy = e,$$
which contradicts our assumption that any element other than $e$ and $y$ has square equal to $y$.
This a very big problem for $z$, which decides to solve this problem by ceasing to exist.
Thus, we conclude that there is no element of $G$ outside of $\langle a,b\rangle$, so $G=\langle a,b\rangle \cong Q_8$. Thus, $|G|=8$.
