Show that the following set of matrices are a group under matrix multiplication. Apologies in advance for the poor formatting.
Let G be the following set of matrices
\begin{bmatrix}\cos(x)&\sin(x)\\-\sin(x)&\cos(x)\end{bmatrix}
union
\begin{bmatrix}\cos(x)&\sin(x)\\\sin(x)&-\cos(x)\end{bmatrix}
where x is an element of the real numbers.
Show that G is a group under matrix multiplication.

Now I know I need to check the group axioms and, barring the closure one, the rest are pretty easy. There was just a bit of confusion with the closure axiom though. Since I have a union here, it won't suffice to just check whether the product of the two matrices are in G right? I'd also have to check the product of the first one by itself, the second one by itself and the second one multiplied by the first one? Or am I barking up the wrong tree here?
Any help here would be much appreciated.
 A: You're exactly right. To check closure properly you have to check all permutations of multiplying the two together, and ensure that out pops something in the form of one of the two.
A: $\begin{bmatrix} \hphantom{-}\cos(x) & \sin(x) \\ -\sin(x) & \cos(x) \end{bmatrix}$ is the set of $2 \times 2$ orthogonal matrices of determinant $1$
Or the set of rotations.
This is a group in itself.
$\begin{bmatrix} \cos(x) & \hphantom{-}\sin(x) \\ \sin(x) & -\cos(x) \end{bmatrix}$ is the set of $2\times 2$ orthogonal matrices of determinant $-1$
or the set of reflections.
Together they form the orthogonal group.
You still need to show that these exhaust the set of orthogonal matrices that with determinant $\pm 1.$   However, once you have done so, note that  $\det(A B) = \det(A) \det(B)$, and so the product of any of the matrices will have determinant $\pm 1$. All matrices with non-zero determinant have inverses and $\det(A^{-1}) = \det(A)^{-1}$.  So the inverse of any matrix in the set will be in the set.
and matrix multiplication is associative.
A: You want to show that the union is a subgroup of the group of invertible 2x2 real matrices. So you need closure under inversion and product. The group axioms follow automatically (says the subgroup criterion).


*

*As you suggested, a way to do is to check all combos. This is safe, and easy to understand.

*As an alternative requiring a bit more thinking but less calculations I suggest the following: 


*

*Check that the first set is a (sub)group by itself. Call it $R$

*Consider the diagonal matrix $A=diag(1,-1)$. 

*Show that the second consists of matrices of the type $AB, B\in R$. This motivates denoting the second set by $AR$.

*Show that $ARA=R$ and $RA=AR$ as sets (multiplying by $A$ from both sides amounts to replacing $x$ by $-x$, but we get another matrix in the same set).

*From these it follows (do think it through to see why!) that $R\cup AR$ is also a subgroup (you may need that $A^{-1}=A$).


