Linear Function on Real Numbers is Bijection

Theorem
Let $a, b \in \R$ be real numbers.

Let $f: \R \to \R$ be the real function defined as:
 * $\forall x \in \R: \map f x = a x + b$

Then $f$ is a bijection $a \ne 0$.

Proof
Let $a \ne 0$.

Let $y = \map f x$.

and so:
 * $\forall y \in \R: \exists x \in \R; y = \map f x$

demonstrating that $f$ is surjective.

Then:

demonstrating that $f$ is injective.

Thus $f$ is a bijection by definition.

Let $a = 0$.

Then:
 * $\forall x \in \R: \map f x = b$

Thus for example:
 * $\map f 1 = \map f 2$

and $f$ is trivially not injective.

Also:
 * $\forall y \in \R: y \ne b \implies \nexists x \in \R: \map f x = y$

and $f$ is equally trivially not surjective either.

Thus $f$ is not a bijection by definition.