I'm learning the basics of Hopf Algebras, and I've found an example that I'm not able to follow, Sweedler's Hopf Algebra.
In this Hopf Algebra, we have $g^2 = 1$, $x^2 = 0$, $xg = -gx$, so that in particular $g^{-1} = g$. Then the antipode $\sigma$ is defined by $g \mapsto g, x \mapsto -gx$. This is fine, except I have read (in Fundamentals of Hopf Algebras, by Robert G. Underwood) that in this example $\sigma$ has order $4$, which I'm struggling to follow, as it seems to me $\sigma$ has order $2$.
If we try: $$(\sigma \circ \sigma)(x) = \sigma(\sigma(x)) = \sigma(-gx) = \sigma(xg)$$
Then (this is possibly where I'm going wrong) I assume we have that $\sigma(xg) = \sigma(x\cdot g) = \sigma(x) \cdot \sigma(g)$. In which case:
$$\sigma(x) \cdot \sigma(g) = -gx \cdot g = xg \cdot g = xg^2 = x$$
So $\sigma$ has order $2$. So my question is, why does my book claim that it has order $4$ (or: what have I done wrong)?
Unlike the coproduct or the counit, the antipode is generally not a morphism of algebras. Often it's actually an antihomomorphism, i.e. $\sigma(ab) = \sigma(b) \sigma(a)$, but here we don't know that (yet).
The Wikipedia article doesn't say what $\sigma(xg)$ is, but we can find it. (Apparently you have a different convention from the Wikipedia article, since you wrote $\sigma(x) = -gx$ but Wikipedia has $\sigma(x) = -xg$. I use Wikipedia's convention but you can reverse everything if you want, you also need to change the coproduct if you want to keep your antipode.) First compute: $$\Delta(xg) = \Delta(x) \cdot \Delta(g) = (1 \otimes x + x \otimes g) \cdot (g \otimes g) = g \otimes xg + xg \otimes g.$$ Then apply $\sigma \otimes 1$ to this, and multiply to get $$\mu((\sigma \otimes 1))(\Delta(xg)) = \mu(g \otimes xg + \sigma(xg) \otimes 1) = gxg + \sigma(xg) = -g^2x + \sigma(xg) = -x + \sigma(xg).$$
But by definition of the antipode, this has to be equal to $\varepsilon(xg) \cdot 1 = 0$, hence $\sigma(xg) = x$. Now we get: $$\sigma(\sigma(x)) = \sigma(-xg) = - x.$$