Can $S^2$ be turned into a topological group?
Solution 1:
We'll show that if $S^n$ is a topological group then $n$ must be odd.
Argument 1: Suppose $m : S^n \times S^n \to S^n$ is a topological group structure on $S^n$. For $g \in S^n$ not equal to the identity, $m(g, -) : S^n \to S^n$ has no fixed points, and so by the Lefschetz fixed point theorem, its Lefschetz trace must be $0$. On the other hand, $S^n$ is path-connected, so $m(g, -)$ is homotopic to $m(e, -) = \text{id}_{S^n}$, and in particular the two have the same action on homology and hence the same Lefschetz trace. But the Lefschetz trace of the identity is the Euler characteristic, which is $1 + (-1)^n$; hence $n$ must be odd. $\Box$
More generally, the same argument shows that if a compact path-connected triangulable space has a topological group structure then its Euler characteristic must be $0$.
Argument 2: I think this is a condensed form of Vladimir Sotirov's argument. Any $H$-space structure on $S^n$ induces a Hopf algebra structure on the cohomology $H^{\bullet}(S^n)$, and in particular a coproduct $\Delta$. If $x$ denotes a generator of $H^n(S^n)$, then for degree reasons and because of the existence of a counit, the coproduct must take the form
$$\Delta(x) = 1 \otimes x + x \otimes 1 \in H^{\bullet}(S^n) \otimes H^{\bullet}(S^n)$$
and hence
$$\Delta(x^2) = (1 \otimes x + x \otimes 1)^2 = 1 \otimes x^2 + (-1)^{n^2} x \otimes x + x \otimes x + x^2 \otimes 1$$
where here we recall that on a tensor product of cohomology rings the cup product takes the form
$$(a \otimes b) \cup (c \otimes d) = (-1)^{\deg(b) \deg(c)} (a \cup c) \otimes (b \cup d)$$
for homogeneous $a, b, c, d$. Since $x^2 = 0$ and $x \otimes x$ is not torsion, the above relation can only hold if $(-1)^{n^2} + 1 = 0$; hence $n$ must be odd. $\Box$
More generally, Hopf proved that over a field, the cohomology of a connected $H$-space with finitely generated cohomology is an exterior algebra on odd generators.
Solution 2:
No, it's not possible.
Theorem (von Neumann): A compact locally Euclidean group is a Lie group. Since $S^2$ is compact, if it had a topological group structure, this group structure would provide a Lie group structure; as you mention in the comments, this is impossible by the hairy ball theorem (because Lie groups are parallelizable).
In fact, a more general fact is true: any locally Euclidean group is necessarily a Lie group. This is a theorem of Gleason, Montgomery, and Zippin, as mentioned in the linked reference; Montgomery summarizes their result in the note "Topological Transformation Groups", which also references their original papers.
Solution 3:
Using algebraic topology, one can in a relatively straightforward matter the following:
Proposition For even $n>0$, there does not exist a map $\mu\colon S^n\times S^n\to S^n$ such that $$\mu\circ i_1=\mathrm{id}_{S^n}=\mu\circ i_2,$$ where $i_1,i_2\colon S^n\to S^n\times S^n$ are (continuous) inclusions of the form $S^n\to S^n\times\{x_1\}$ and $S^n\to\{x_2\}\times S^n$.
Whether algebraic topology is less elementary than using von Neumann's theorem to pass to Lie groups, giving a parallel vector field, and then going through the hairy ball theorem (or its higher dimension analogs) is... debatable. Nevertheless, the algebraic topology result is more general since it shows the impossibility not only of topological group structure (by taking $x_1=x_2=e$), but of the structure of a topological magma (i.e. an H-space).
Proof. The Künneth formula tells us that the (unital) cohomology algebra $H^*(S^n\times S^n)$ is isomorphic to the tensor product $H^*(S^n)\otimes H^*(S^n)$, with the isomorphism given by $$H^*(S^n)\otimes H^*(S^n)\ni a\otimes b\mapsto \pi_1^*(a)\cup\pi_2^*(b)\in H^*(S^n)$$ where $\pi_1,\pi_2\colon S^n\times S^n\to S^n$ are the canonical projection maps. In particular, if $a$ is a generator for $H^*(S^n)$ (as a unital algebra), then $\pi_1^*(a)$,$\pi_2^*(a)$ are (independent) generators of $H^*(S^n\times S^n)$ as a unital algebra, and of $H^n(S^n\times S^n)$ as a $2$-dimensional vector space.
Now, the continuous inclusions $i_1,i_2\colon S^n\to S^n\times S^n$ are maps such that $$\pi_i\circ i_j=\begin{cases}\mathrm{id}_{S^n}&i=j\\\text{constant}&i\neq j\end{cases}.$$ Therefore the induced homomorphisms $i_1^*,i_2^*\colon H^*(S^n\times S^n)\to H^*(S^n)$ and $\pi_1^*,\pi_2^*\colon H^n(S^n)\to H^*(S^n\times S^n)$ of cohomology algebras are such that $$i_j^*\circ\pi_i^*=\begin{cases}\mathrm{id}_{H^*(S^n)}&i=j\\0&i\neq j\end{cases}.$$ In particular, if $$\sigma=x\pi_1^*(a)+y\pi_2^*(a)\in H^n(S^n\times S^n),$$ then $i_1^*(\sigma)=xa$ and $i_2^*(\sigma)=ya$.
Consequently, if $\mu\colon S^n\times S^n\to S^n$ is such that $\mu\circ i_j=\mathrm{id}_{S^n},$ then the induced map $\mu^*\colon H^*(S^n)\to H^*(S^n\times S^n)$ on cohomology algebras must satisfy $$i_j^*\circ\mu^*=\mathrm{id}_{H^*(S^n)}\colon H^*(S^n)\to H^*(S^n).$$ We have that $i_j^*(\mu^*(a))=a$ for $\mu^*(a)\in H^n(S^n)$, so from the preceding observation $\mu^*(a)=\pi_1^*(a)+\pi_2^*(a)$.
On the other hand, $a\cup a\in H^{2n}(S^n)=0$, so we have \begin{align*}0=\mu^*(0) &=\mu^*(a\cup a) \\ &=\mu^*(a)\cup\mu^*(a) \\ &=(\pi_1^*(a)+\pi_2^*(a))^2 \\ &=\pi_1^*(a\cup a)+\pi_2^*(a\cup a)+\pi_1^*(a)\cup\pi_2^*(a)+\pi_2^*(a)\cup\pi_1^*(a) \\ &=\pi_1^*(a)\cup\pi_2^*(a)+(-1)^n\pi_1^*(a)\cup\pi_2^*(a). \end{align*} Since $$\pi_1^*(a)\cup \pi_2^*(a)\cong a\otimes a\neq0\in H^*(S^n\times S^n)\cong H^*(S^n)\otimes H^*(S^n),$$ this equality holds if and only if $n$ is odd.
Remark. I think (but I have not tried this) that if we assume further that $\mu\colon S^n\times S^n\to S^n$ is an associative multiplication, then applying an analogous argument to $$\mu^{(k)}\colon S^n\times S^n\times\dots\times S^n\to S^n$$ might give extra conditions on the dimension. One could maybe show in this way that $H^*(S^n)$ can have an induced structure as a Hopf algebra (i.e. associative multiplication, and an inversion map) only if the dimension is $n=2^m-1$. Or maybe not, I don't know.
Solution 4:
An $H$-space is an even more general structure than a topological group. It must have multiplication and inverse map that behave like a group up to homotopy. In fact, the only spheres which are $H$-spaces are $S^0,S^1,S^3$ and $S^7$. According to Wikipedia, this is Adams' Hopf Invariant One Theorem. It's actually not so hard to prove, using the fact that the cohomology ring of an $H$-space is a Hopf algebra, that only dimensions $2^n-1$ work. The hard part is showing that only these first examples are actually realizable. Note that $S^3$ is the unit quaternions and $S^7$ is the unit octonions.