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 \and \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 \times S$$

then it can be called a transformation.

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$$.

Image of a Subset
Let $$f: S \to T$$ be a mapping.

Let $$X \subseteq S$$.

Then the image of $$X$$ is defined as:
 * $$\operatorname {Im} \left ({X}\right) = f \left ({X}\right) = \left\{ {t \in T: \exists s \in X: f \left({s}\right) = t}\right\}$$

Some authors prefer not to use the notation $$f \left ({X}\right)$$ and instead use the concept of the mapping induced from the power set of $$S$$ to the power set of $$T$$, and use another notation for $$f$$.

For example:
 * uses $$f^\to \left ({X}\right)$$ for $$f \left({X}\right)$$;
 * glosses over the matter, and quietly drops the notation $$f \left [{X}\right]$$ for $$f \left({X}\right)$$.

Self-Map
A mapping whose domain and codomain are the same set is called a self-map.

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 )
 * $$f: x \mapsto y$$
 * $$x f = y$$ (as seen in and )
 * $$x^f = y$$ (as seen in )