Subgroup of order $4$ in $D_8$ Let me ask you a question on group theory which confuses me.
Consider the group $D_8$ the dihedral group of order $8$ generated by $\sigma$ and $\tau$ with $o(\sigma)=4,o(\tau)=2$ and $\tau\sigma=\sigma^{-1}\tau$.
Consider the following elements, namely $\sigma\tau$ and $\tau$ which have order equal to $2$.
Then $\langle\tau\rangle \cong \mathbb{Z}_2$ and $\langle\sigma\tau\rangle \cong \mathbb{Z}_2$ then $\langle\tau\rangle \times \langle\sigma\tau\rangle \cong \mathbb{Z}_2\times \mathbb{Z}_2$. We know that $\mathbb{Z}_2\times \mathbb{Z}_2$ is Klein group.
But I checked that the set $\langle\tau\rangle \times \langle\sigma\tau\rangle$ is not even group because $\tau\sigma\tau=\sigma^{-1}$ which does not belong to this set.
Where is the problem?
Would be very grateful for explanation!

I think your mistake is to assume that $\tau$ and $\tau \sigma$ commute. This is not the case
$$
\tau \cdot \tau \sigma = \sigma,
$$
while
$$
\tau \sigma \cdot \tau = \sigma^{-1} \tau \tau = \sigma^{-1} \ne \sigma.
$$
