An exercise in a book I'm reading is to show that $O(2)$ is not isomorphic to $SO(2)\times \{-1,1\}$.
The problem is, I don't believe the statement. Let me elaborate why:
$O(2)$ consists of orthogonal matrices of either determinant $1$ or $-1$. The subset $SO(2) \subseteq O(2)$ is precisely the set of matrices of determinant $1$. So one should be able to define an isomorphism as follows:
$A \in O(2)$ maps to $(A,1)$ if $\det A = 1$
and
$A \in O(2)$ maps to $(-A, -1)$ if $\det A = -1$.
Why is this not an isomorphism? But even if it was clear to me that this is not an isomorphism, it is not clear to me why it should be impossible to find one.
As Qiaochu points out, your proposed map isn't an isomorphism.
But these two groups are nonisomorphic for the simple reason that $SO(2) \times \{-1, 1\}$ is abelian (it is a product of abelian groups) whereas $O(2)$ is not: For example, the orthogonal matrices $$\begin{pmatrix}0 & -1 \\ 1 & 0\end{pmatrix}, \begin{pmatrix}-1 & 0 \\ 0 & 1\end{pmatrix} \in O(2)$$ do not commute.
You can think of this perhaps usefully as an infinite version of the fact that $\mathbb{Z}_n \times \mathbb{Z}_2$ is not isomorphic to $D_{2n}$ (for large enough $n$). Put another way, all rotations of the plane commute, but in general reflections of the plane do not.