Show that $\left(\left\{x, -x, \frac{1}{x}, -\frac{1}{x}\right\}, \circ\right)$ is a group. Given the following problem:

Given the functions $g_1, g_2, g_3, g_4$ of $\mathbb{R}^*$ in $\mathbb{R}^*$ defined in the following way: $g_1(x) = -x$, $g_2(x) = -\frac{1}{x}$, $g_3(x) = x$ and $g_4(x) = \frac{1}{x}$. If $G = \{g_1, g_2, g_3, g_4\}$:
  
  
*
  
*Show that $(G, \circ)$ is a group where $\circ$ is the composition of functions. Write the table.
  
*Identify a generator set of $(G, \circ)$ that has the least number of elements possible.
  
*Extract all the normal subgroups of $(G, \circ)$. If $H$ is one of them, describe $G$ \ $H$.

I am having lots of problems figuring out how proceed with such a set.
If I understand correctly, the composition of functions is for example:
$$
(\forall x\in\mathbb{R}^*):\enspace(g_1 \circ g_2)(x) = g_1(g_2(x)) = g_1(-\frac{1}{x}) = -(-\frac{1}{x}) = \frac{1}{x}
$$
Is that so?
Then I know that to prove that $(G, \circ)$ is a group, I have to prove the following:


*

*The internal law: $g_i \circ g_j \in G$.

*Associativity: $g_i \circ (g_j \circ g_k) = (g_i \circ g_j) \circ g_k$.

*Existence of the neutral element $g_e$ such that: $g_i \circ g_e = g_e \circ g_i = g_i$.

*Existence of an inverse element $g_i'$ for each $g_i \in G$, we have that $g_i \circ g_i' = g_i' \circ g_i = g_e$
But how do I proceed with such a set?
 A: Compute the Cayley table, taking into account that $g_3$ is the identity function:
\begin{array}{c|cccc}
    & g_3 & g_1 & g_2 & g_4 \\
\hline
g_3 & g_3 & g_1 & g_2 & g_4 \\ 
g_1 & g_1 & g_3 & g_4 & g_2 \\
g_2 & g_2 & g_4 & g_3 & g_1\\
g_4 & g_4 & g_2 & g_1 & g_3
\end{array}
You can notice that each element is the inverse of itself, so if this is a group it must be the Klein $4$-group $\{1,a,b,c\}$ where $a^2=1$, $b^2=1$, $c^2=1$, $ab=ba=c$, $bc=cb=a$ and $ca=ac=b$: the Cayley table is
\begin{array}{c|cccc}
& 1 & a & b & c \\
\hline
1 & 1 & a & b & c \\
a & a & 1 & c & b \\
b & b & c & 1 & a \\
c & c & b & a & 1
\end{array}
As you see the map $g_3\mapsto 1$, $g_1\mapsto a$, $g_2\mapsto b$, $g_4\mapsto c$ is an isomorphism of “magmas”. Since the latter is a group, also the given set is a group.
A: Let's do this step by step:


*

*This is just a matter of doing every possible composition. It probably can me done more elegantly, but you're being asked to write the multiplication table anyway.

*This is true in general. Since the equality
$$
f \circ ( g \circ h) = (f \circ g) \circ h
$$ 
is an equality of functions, one must see that it holds for every element in the domain. Thus, in this case, if $x \in \mathbb{R}^*$,
$$
(f \circ ( g \circ h))(x) = f((g\circ h)(x)) = f(g(h(x)) = (f \circ g)(h(x)) = ((f \circ g) \circ h)(x)
$$
which proves the former.


*Note that the function $e : x \in \mathbb{R}^*  \mapsto x \in \mathbb{R}^*$ is the identity function on $\mathbb{R}^*$. Thus for any other such function (in particular the ones of this group),


$$
(f \circ e)(x) = f(e(x)) = f(x) = e(f(x)) = (e \circ f)(x)
$$
and therefore $e \circ f = f = f \circ e$.


*Again, when making the multiplication table, this will be a lot clearer. 


As for the second and third questions, one can see that every group of $4$ elements is abelian (i.e. it is commutative), so every subgroup will be normal. Moreover, there are exactly $2$ groups of $4$ elements up to isomorphism: $\mathbb{Z}_4$ and $\mathbb{Z}_2 \oplus \mathbb{Z}_2$. The former is cyclic so it can be generated by a single element, whereas the second needs at least $2$ and that is sufficient. 
Note that in your group, any function $g_i\in G$ verifies that $g_i \circ g_i = e$, so the group can't be generated by a single element (each set $\langle g_i \rangle$ would have at most 2 elements). Therefore, you'll have to look for a set of two generators. This, in particular. tells you that $G \simeq  \mathbb{Z}_2 \oplus \mathbb{Z}_2$ so you will have the trivial subgroups $\{e\}$ and $G$, and three subgroups of order $2$. I'll leave you to identify these.
