Prove that a function is bijective and show that G is a group 
Let $a\in\mathbb{R}^∗$ and $b\in \mathbb{R}$. Consider the function $f_{a,b} \in \operatorname{Fun}(\mathbb{R},\mathbb{R})$ given by $f_{a,b}(x)= ax + b$.
a) Show that $f_{a,b}$ is a bijection, and find its inverse function.
b) Let $G$ be the set of functions $\{f_{a,b}|a \in \mathbb{R}^∗
, b \in \mathbb{R}\}$. Show that $G$ is a group, where the group operation is composition of functions. (Thus $G$ is a subgroup of $\operatorname{Bij}(\mathbb{R}, \mathbb{R})$.)

My attempt to solve part a:
Let $x_1, x_2 \in \mathbb{R}$ and assume $x_1 \ne x_2$. Then $f_{a,b}(x_1) = ax_1+b$ and $f_{a,b}(x_2) = ax_2+b$. Thus $f_{a,b}(x_1) \ne f_{a,b}(x_2)$ and hence, $f_{a,b}$ is injective.
Since $a\in \mathbb{R}^∗$ and $b\in \mathbb{R}$, then $ax+b\in \mathbb{R}$ and thus $f_{a,b}(x)=ax + b\in \mathbb{R}$ and since it is a mapping from $\mathbb{R}$ to $\mathbb{R}$ then $f_{a,b}(\mathbb{R})=\mathbb{R}$ which means that $f_{a,b}$ is surjective.
Therefore, $f_{a,b}$ is at a time injective and surjective which means it is bijective.
It's inverse function:
$$f_{a,b}^{-1}(x)=\frac{x-b}{a}$$
Could you please check if I made any mistake in the proof and please give some insights on how to solve part b? thank you!
 A: Your proof of injectivity is ok, but for me it is not that obvious why $f_{a, b} (x_1) \neq f_{a,b} (x_2)$. Your surjectivity proof is wrong. Here is my version:
Injectivity: Let $ax_1 + b = a x_2 + b$. Then $ax_1 = a x_2$ and since $a \neq 0$, it follows $x_1 = x_2$.
Surjectivity: Let $z \in \mathbb{R}$. Choose $x_0 = \frac{z - b}{a}$. Then $f(x_0) = z$. This holds for every $z$, so $f$ is surjective.
So $f$ is bijective. The inverse map is 
$$f^{-1} : \mathbb{R} \longrightarrow \mathbb{R},\ x \longmapsto \frac{x - b}{a}.$$
Note that if you show $f \circ f^{-1} = f^{-1} \circ f = \mathrm{id}$ at the beginning, you are already done.
For proving that $G$ is a group, you have to show that 


*

*$G$ is stable under composition.

*Composition is associative, i. e., $f \circ (g \circ h) = (f \circ g) \circ h$.

*In $G$ exists a neutral element $e$ such that $f \circ e = e \circ f = f$.

*Every $f \in G$ has an inverse element $g \in G$, i. e., $f \circ g = g \circ f = e$. Note that you therefore should use what you have shown before.


I show you the first one and let the rest for you. So let $f_1, f_2 \in G$ with $f_1(x) = ax + b, \ f_2(x) = cx + d$ with $a,b, c, d \in \mathbb{R}$ and $a, c \neq 0$. Then 
$$f_1 \circ f_2 (x) = f_1 (f_2(x)) = f_1(cx + d) = a (cx + d) + b = acx + ad + b = \lambda x + \mu \in G, $$
with $\lambda = ac$ and $\mu = ad + b$.
A: The core of your proof for injectivity is correct, but it's missing a detail. It feels like you pull, out of thin air, the result you desire. The result you desire is correct, but it is lacking the justification in other words. We see that $x_1 \ne x_2$ implies the following:
$$\begin{align}
x_1 \ne x_2 & \implies ax_1  \ne ax_2 \\
& \implies ax_1 + b \ne ax_2 + b\\
& \implies f(x_1) \ne f(x_2)
\end{align}$$
It's a small detail but it's worth keeping stuff like this mind: your justification is as important as your results oftentimes.

Your surjectivity proof leaves much to be desired. You seem to assume that, since the output of $f$ is in $\Bbb R$, it inherently means $f$ is surjective. This is not always the case, which we can see by tweaking the codomain, or the definition of the function. Some examples:


*

*Instead of letting $f : \Bbb R \to \Bbb R$ let $f : \Bbb R \to \Bbb C$. The image of $f$ is basically the same, except there are visibly no non-real outputs, so obviously $f$ is not surjective. This is despite the fact that $\text{image}(f) = \Bbb R \subset \Bbb C$.

*Let $f : \Bbb R \to \Bbb R$ be defined by $x \mapsto x^2$. There is no $x \in \Bbb R$ such that $f(x) = -1$, so not surjective. This is again despite the fact that $\text{image}(f) \subset \Bbb R$.

*Consider a third, extreme example. Let $f : \Bbb Z \to \Bbb Z$ be defined by $f(x) = 1$. Thus, while each output of $f$ is an integer, this is clearly not surjective.
You need to show that $f$ (going back to your problem) has an "input" for every "output," i.e. that every element in the codomain has a pre-image. To phrase it a third way, you need to show that, for every $y \in \text{cod}(f)$, there exists some $x$ such that $f(x)=y$.
So let $f$ be defined by $f(x)=ax+b$ as stated. Let $y \in \Bbb R$. Then we can define the $x$ in question to be $x = (y-b)/a$ (let $f(x)=y,$ solve for $x$). You can justify this as being well defined (e.g. since $a \ne 0$ as $a \in \Bbb R^*$), thus giving us surjectivity.

An alternative way to show bijectivity (killing both of the above "birds" with a single proverbial stone) is to find the inverse function $f^{-1}(x)$. You have already found this to be $f^{-1}(x) = (x-b)/a$. 
On finding this inverse, find $f \circ f^{-1}$ and $f^{-1} \circ f$. If both of these compositions yield the respective identity functions, then you have that $f$ is a bijection. Indeed, we see
$$(f \circ f^{-1})(x) = a \cdot \frac{x-b}{a} + b = x$$
and
$$(f^{-1} \circ f)(x) = \frac{(ax+b)-b}{a} = x$$
giving bijectivity.
A: To prove that $f_{a,b}$ is a bijection, it is enough to give its inverse.
There is no need for checking injectivity and surjectivity, if you have to give the inverse anyways.
Your proof of injectivity is correct (maybe you should explicitly fix $a$ and $b$ beforehand), but your proof of surjectivity is not.
If you have a function $f: A\to B$, that does not mean that $f(A)=B$. It could be $f(A)\subset B$.
For example a constant function $f:\mathbb{R}\to\mathbb{R}, f(x)=1$
The fact that $f_{a,b}$ is surjective does not come from $f_{a,b}$ beeing a mapping from $\mathbb{R}\to\mathbb{R}$.
Your inverse function is correct. 
As I said, that shows that your function is bijective. 
At b):
You have to show the group axioms.
The group operation is $\circ$. The composition of functions.
What is the neutral element of $G$?
Why is $G$ associativ?
Why has every element of $G$ an inverse? For that use a).
[Edit: Why is $G$ closed under the operation $\circ$.] 
Try to boil through this. Feel free to ask if you get stuck.
Every point is rather simple. Just make clear to yourself what you have to show.
