I am taking a course about smooth manifolds following Elon Lages Lima's "Variedades Diferenciáveis" with Lee's "Introduction to smooth manifolds" (loosely following as a supplement) and I've stumbled upon something I don not understand. We were looking at some examples of Lie Groups, where we defined a Lie group as follows (Lee, p. 151):
Definition (Lie Group): A Lie group is a smooth manifold G (without boundary) that is also a group in the algebraic sense, with the property that the multiplication map m: $G \times G \to G$ and inversion map $i: G \to G$, given by
$$ m(g,h)= gh; \quad i(g)=g^{-1}; $$
Are both smooth (i.e., $C^\infty$). As as example we saw that $S^1$ is a Lie group, and the way we did it was by noting that
$$ S^1 = \{(x_1,x_2)\in \mathbb{R}^2 | x_1^2+x_2^2 =1\} \subset \mathbb{R}^2, $$
and then identifying $\mathbb{R}^2$ with $\mathbb{C}$ with the correspondence $(x,y) \leftrightarrow x+iy$ so that we have
$$ S^1= \{z\in\mathbb{C} | \; |z|=1\}. $$
Since we showed earlier that $S^n$ is a topological manifold of dimension $n$, the next thing was the check the conditions given in the above definition, namely of the group multiplication and inverse are smooth (we're using $C^\infty$) We choosed multiplication of complex numbers and the proof was straightforward.
Then our professor said that we would do the same with $S^3$ and $S^7$ by identifying $\mathbb{R}^4$ and $\mathbb{R}^8$ with the quaternions $\mathbb{H}$ and octonions $\mathbb{O}$ respectively. I was able to copy the procedure to show that $S^3$ is a Lie group, and it seems to me that I can do the same with $S^7$, However in Lee's book, p. 179 it says that it turns out that $S^7$ has no Lie Group structure and I looked up the reference and it seems to involve homologies and cohomologies and other stuff I unfortunately don't understand at the moment.
So, In summary. My question is: what is wrong with this approach? is there something I am glossing over with the octonions in the above sketch? Is there "low level of abstraction" explanation for this? (meaning that it involves the language and techniques used in this question).
Any help would be greatly appreciated!
It turns out that the multiplication in $\mathbb O$ is not associative. Therefore, that construction does not induce a group structure in $S^7$.