Definition:Mapping

Definition
A mapping (or a map) is a special kind of binary relation which relates a given element of one set to one element of another.

A mapping $f$ from $S$ to $T$ (or on $S$ into $T$) is a relation $f: S \times T$ such that:
 * $\forall x \in S: \left({x, y_1}\right) \in f \land \left({x, y_2}\right) \in f \implies y_1 = y_2$

and
 * $\forall x \in S: \exists y \in T: \left({x, y}\right) \in f$

Thus, a mapping is a relation which is:
 * Many-to-one
 * Left-total, that is, defined for all elements in the domain.

In the context of numbers, a mapping is usually referred to as a function. The term operator is also seen.

Transformation
When a mapping is defined from a set to itself, e.g.
 * $f: S \to S$

then it can be called a transformation, or a self-map.

Compare the rather more advanced concept linear transformation.

Defined
A mapping $f \subseteq S \times T$ is defined at $x \in S$ iff:
 * $\exists y \in T: \left({x, y}\right) \in f$

If:
 * $\exists x \in S: \forall y \in T: \left({x, y}\right) \notin f$

then $f$ is not defined or (undefined) at $x$, and indeed, $f$ is not technically a mapping at all.

Domain, Codomain, Image, Preimage
As a mapping is also a relation, all the results and definitions that we have established concerning relations also apply to mappings. For example, the concepts of domain and codomain carry over completely from their definition in the context of relations, as do the concepts of image and preimage.

The terms value and argument are sometimes seen for image and preimage:

If $\left({x, y}\right) \in f$, then $y$ is the value of $f$ for argument $x$, or simply, the value of $f$ at $x$.

In the context of computability theory, the following terms are frequently found:

If $\left({x, y}\right) \in f$, then $y$ is often called the output of $f$ for input $x$, or simply, the output of $f$ at $x$.

The following diagram illustrates the mapping $f: S \to T$.


 * Mapping.png


 * $\operatorname{Dom} \left({f}\right)$ is the domain of $f$.
 * $\operatorname{Cdm} \left({f}\right)$ is the codomain of $f$.
 * $\operatorname{Im} \left({f}\right)$ is the image of $f$.

Mapping as Unary Operation
It can be noted that a mapping can be considered as a unary operation.

Notation
The mapping $f \subseteq S \times T$ is usually denoted $f: S \to T$.

Thus, we write $f: S \to T$ to mean:


 * a mapping $f$ with domain $S$ and codomain $T$;
 * $f$ is a mapping of (or from) $S$ to (or into) $T$
 * $f$ maps $S$ to (or into) $T$.

The notation $S \stackrel f {\longrightarrow} T$ is also seen.

For a mapping $f$ from $S$ into $T$, when $x \in S, y \in T$ a common form of notation is:


 * $f: S \to T: f \left({x}\right) = y$

where $f \left({x}\right) = y$ is interpreted to mean $\left({x, y}\right) \in f$.

Alternative notational forms of $f \left({x}\right) = y$ are:


 * $f x = y$ (as seen in, for example)
 * $f: x \mapsto y$
 * $x f = y$ (as seen in and, for example)
 * $x^f = y$ (as seen in, for example)