Example of a group where $o(a)$ and $o(b)$ are finite but $o(ab)$ is infinite [duplicate]

Solution 1:

Probably you have seen this effect: mirrors on two opposite walls of a room.

enter image description here

Take two parallel hyperplanes in $\mathbb R^n$. Reflection in each of them is an isometry of order 2. But their composition is a translation of infinite order.

Solution 2:

The standard example is the infinite dihedral group.

Consider the group of maps on $\mathbf{Z}$ $$ D_{\infty} = \{ x \mapsto \pm x + b : b \in \mathbf{Z} \}. $$ Consider the maps $$ \sigma: x \mapsto -x, \qquad \tau: x \mapsto -x + 1, $$ both of order $2$. Their composition $$ \tau \circ \sigma (x) = \tau(\sigma(x)) : x \mapsto x + 1 $$ has infinite order.