Functions map a set of inputs to a set of outputs.

Each input maps to exactly one output, however an output value may have multiple possible inputs.

Term | Description |
---|---|

domain | The set of inputs |

co-domain | The set of outputs |

range | A subset of the co-domain with mapped values only |

image | A specific value in the co-domain that is the output for value in the domain |

pre-image | The value or values in the domain that map to a specific output |

The expression \[ f: A \to B \] declares a function \(f\) that maps from the domain \(A\) to the domain \(B\).

When applied as \[ f: x \mapsto f(x) = y \] \(x \in X\) is the pre-image and \(y \in Y\) is the image.

In the case of \[ \begin{align} g: \mathbb R &\to \mathbb R \\ x &\mapsto x^2 + 1 \end{align} \] The function \(g\) accepts a real number as input, provides a real number as output and covers the range \([1, +\infty)\).

The following are common structures for \(f : \mathbb R \to \mathbb R\).

Name | Structure | Conditions |
---|---|---|

linear | \(f(x) = ax + b\) | |

quadratic | \(f(x) = ax^2 + bx + c\) | \(a \neq 0\) |

exponential | \(f(x) = b^x\) | \(b > 0, b \neq 1\) |

More on Expontential functions.

A function \(f:X \to Y\) is *injective* if and only if every element of the codomain \(Y\) is the image of at most one element of the domain \(X\).

Symbolicly: \[ f:X \rightarrowtail Y \iff \forall a,b \in X,\; f(a) = f(b) \implies a = b \] And conversely: \[ f:X \rightarrowtail Y \iff \forall a,b \in X,\; a \neq b \implies f(a) \neq f(b) \]

If an output is reachable from more than one input then a function is *not* injective.

For example, given \(g: \mathbb R \to \mathbb R\) then \(g(x) = x^2\) is not injective as \(g(5) = (5)^2 = (-5)^2 = g(-5)\). If however this is contrained as \(g: \mathbb R^+ \to \mathbb R\) then this function becomes injective.

Surjective functions are functions with a range that is equivalent to the co-domain.

\[ f:X \twoheadrightarrow Y \iff \forall y \in Y,\; \exists x \in X,\; y = f(x) \] Alternatively expressed: every element of the co-domain of \(f\), \(Y\), has at least one pre-image in the domain of \(f\), \(X\).

A function is *bijective* if it is both injective and surjective.

Symbolically this is expressed as: \[ f: X \leftrightarrow Y \iff \forall y \in Y,\; \exists! x \in X,\; y = f(x) \] Where \(\exists!\) means “there exists only one”.