# Invertibility

## Range and surjectivity

The **range** (or **image**) of a function \(f \colon X \to Y\) is the set of elements \(y = f(x) \in Y\) in its codomain for which there is an \(x \in X\) its domain:
\[
\mathrm{ran}(f) \stackrel{\text{def.}}{=} \{ f(x) \colon x \in X\}.
\]

A function is **surjective** (or **onto**) if its range equals its codomain,
\[
f \text{ surjective} \quad\stackrel{\text{def.}}{\Longleftrightarrow}\quad \mathrm{ran}(f) = Y.
\]
This is the same as that, for every \(y \in Y\), there is an \(x \in X\) with \(f(x) = y\).

**Ex.**

- The range of the function \[ f \colon \mathbb{R} \to \mathbb{R}, \qquad x \mapsto x^2 \] is \(\mathrm{ran}(f) = [0,\infty)\), whence it is
*not*surjective.

- Defined differently, \[ f \colon \mathbb R \to [0,\infty), \qquad x \mapsto x^2\]
*is*surjective.

- The differential operator \(\frac{d}{dx}\colon C^1(\mathbb R,\mathbb R) \to C(\mathbb R,\mathbb R)\) is surjective, since \[ \text{ for any } f \in C(\mathbb R,\mathbb R)\quad \text{ there exists } F = \bigg[ x \mapsto \int^x_0 f(t)\,dt\bigg] \in C^1(\mathbb R,\mathbb R) \quad\text{ such that }\quad \frac{d}{dx}F = f.\]

## Injectivity

A function is **injective** (or **one-to-one**) if different elements in its domain are mapped onto different elements in its codomain,
\[
f \text{ injective} \quad\stackrel{\text{def.}}{\Longleftrightarrow}\quad [f(x_1) = f(x_2) \Longrightarrow x_1 = x_2]
\]
Put differently, for any \(y \in Y\) there is at most one \(x \in X\) with \(f(x) = y\).

**Ex.**

- The function \[ f \colon \mathbb R \to \mathbb R, \qquad x \mapsto x^2 \] is not injective, since \(x^2 = (-x)^2\).

- The function \[f\colon \mathbb N \to \mathbb N, \qquad n \mapsto 2n \] that assigns to each natural number twice its value is injective, since \[2m = 2n \quad\Longrightarrow\quad m = n, \qquad m,n \in \mathbb N.\]

- The differential operator \(\frac{d}{dx}\colon C^1(\mathbb R,\mathbb R) \to C(\mathbb R, \mathbb R)\) is not injective, since, for \(f \in C^1(\mathbb R, \mathbb R)\), \[ \frac{d}{dx}(f(x)+c) = \frac{d}{dx} f(x) \quad\text{ for all } \quad c \in \mathbb R. \]

## Invertibility

A function that is both injective and surjective is called **bijective** (or **invertible**). Since its graph covers the entire codomain (surjectivity), and since for each \(y \in Y\) there is exactly one \(x \in X\) with \(f(x) = y\) (injectivity), there exists a function
\[
f^{-1} \colon Y \to X, \qquad y \mapsto x,
\]
called the **inverse of** \(f\). An invertible function satisfies
\[
f^{-1}(f(x)) = x \quad\text{ for all }\quad x \in X \qquad\text{ and }\qquad f(f^{-1}(y)) = y \quad\text{ for all }\quad y \in Y,
\]
or, shorter,
\[
f^{-1} \circ f = \mathrm{id}_X \quad\text{ and }\quad f \circ f^{-1} = \mathrm{id}_Y.
\]

**N.b.** An injection is always invertible on its range, but not necessarily on the entire codomain.

**Ex.**

- The function \(x \mapsto x^2\) is invertible on \([0,\infty)\) (which is easily seen from its graph).
- The map \(n \mapsto 2n\), \(\mathbb N \to 2\mathbb N\), is a bijection between the set of positive natural numbers and the set of even numbers. In this sense the cardinality of the set of natural numbers and the cardinality of the set of even numbers are the same.
- The function defined by \[ f(a,b) = a + b\mathrm{i} \] is a bijection \(\mathbb R^2 \to \mathbb C\), from the real onto the complex plane.
- One can prove that there is no invertible function from \(\mathbb N\) to \(\mathbb R\). In this sense, the cardinality of the real numbers is greater than that of the natural numbers (the natural numbers are said to be
**countable**, whereas the real numbers are**uncountable**).

- The differential operator \[1- \partial_x^2 \colon C^\infty_{2\pi\text{-per}}(\mathbb R,\mathbb R) \to C^\infty_{2\pi\text{-per}}(\mathbb R,\mathbb R)\] from the set of \(2\pi\)-
**periodic infinitely differentiable real-valued functions**onto itself is a bijection. The operator \(1 + \partial_x^2\) on the same set of functions is*not*(can you see why?). This means that the differential equation \[ f'' - f = 0 \] has exactly one \(2\pi\)-periodic solution (namely \(f \equiv 0\)), whereas the equation \[ f'' + f = 0 \] has many.

- A major question in linear algebra is: When is the matrix \(A\) in an equation \[ Ax = b\] invertible? Here, \(A\) is seen as an operator \(\mathbb R^n \to \mathbb R^n\), mapping vectors onto vectors.