# Definition:Mapping

## Definition

Let $S$ and $T$ be sets.

Let $S\times T$ be their cartesian product.

### Definition 1

A mapping from $S$ to $T$ is a binary relation on $S \times T$ which associates each element of $S$ with exactly one element of $T$.

### Definition 2

A mapping $f$ from $S$ to $T$, denoted $f: S \to T$, is a relation $f = \struct {S, T, G}$, where $G \subseteq S \times T$, such that:

$\forall x \in S: \forall y_1, y_2 \in T: \tuple {x, y_1} \in G \land \tuple {x, y_2} \in G \implies y_1 = y_2$

and

$\forall x \in S: \exists y \in T: \tuple {x, y} \in G$

### Definition 3

A mapping $f$ from $S$ to $T$, denoted $f: S \to T$, is a relation $f = \struct {S, T, R}$, where $R \subseteq S \times T$, such that:

$\forall \tuple {x_1, y_1}, \tuple {x_2, y_2} \in f: y_1 \ne y_2 \implies x_1 \ne x_2$

and

$\forall x \in S: \exists y \in T: \tuple {x, y} \in f$

### Definition 4

A mapping from $S$ to $T$ is a relation on $S \times T$ which is:

$(1): \quad$ Many-to-one
$(2): \quad$ Left-total, that is, defined for all elements in $S$.

## General Definition

Let $\ds \prod_{i \mathop = 1}^n S_i$ be the cartesian product of sets $S_1$ to $S_n$.

Let $\ds \RR \subseteq \prod_{i \mathop = 1}^n S_i$ be an $n$-ary relation on $\ds \prod_{i \mathop = 1}^n S_i$.

Then $\RR$ is a mapping if and only if:

$\ds \forall x := \tuple {x_1, x_2, \ldots, x_{n - 1} } \in \prod_{i \mathop = 1}^{n - 1} S_i: \forall y_1, y_2 \in S_n: \tuple {x, y_1} \in \RR \land \tuple {x, y_2} \in \RR \implies y_1 = y_2$

and

$\ds \forall x := \tuple {x_1, x_2, \ldots, x_{n - 1} } \in \prod_{i \mathop = 1}^{n - 1} S_i: \exists y \in S_n: \tuple {x, y} \in \RR$

Thus, a mapping is an $n$-ary relation which is:

Many-to-one
Left-total, that is, defined for all elements in the domain.

### Self-Map

A self-map is a mapping whose domain is equal to its codomain:

$\Dom f = \Cdm f$

## Class-Theoretical Definition

Let $V$ be a basic universe.

Let $A \subseteq V$ and $B \subseteq V$ be classes.

In the context of class theory, a mapping from $A$ into $B$ is a relation $f \subseteq A \times B$ such that:

$\forall x \in A: \exists! y \in B: \tuple {x, y} \in f$

That is:

$\forall x \in A: \forall y_1, y_2 \in B: \tuple {x, y_1} \in f \land \tuple {x, y_2} \in f \implies y_1 = y_2$

and

$\forall x \in A: \exists y \in B: \tuple {x, y} \in f$

## Domain, Codomain, Image, Preimage

As a mapping is also a relation, all the results and definitions concerning relations also apply to mappings.

In particular, the concepts of domain and codomain carry over completely, as do the concepts of image and preimage.

### Domain

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

The domain of $f$ is $S$, and can be denoted $\Dom f$.

### Codomain

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

The codomain of $f$ is $T$.

It is denoted on $\mathsf{Pr} \infty \mathsf{fWiki}$ by $\Cdm f$.

### Image

#### Definition 1

The image of a mapping $f: S \to T$ is the set:

$\Img f = \set {t \in T: \exists s \in S: \map f s = t}$

That is, it is the set of values taken by $f$.

#### Definition 2

The image of a mapping $f: S \to T$ is the set:

$\Img f = f \sqbrk S$

where $f \sqbrk S$ is the image of $S$ under $f$.

### Preimage

The preimage of $f$ is defined as:

$\Preimg f := \set {s \in S: \exists t \in T: f \paren s = t}$

That is:

$\Preimg f := f^{-1} \sqbrk T$

where $f^{-1} \sqbrk T$ is the image of $T$ under $f^{-1}$.

In this context, $f^{-1} \subseteq T \times S$ is the the inverse of $f$.

It is a relation but not necessarily itself a mapping.

## Diagrammatic Presentations

### Mapping on Finite Set

The following diagram illustrates the mapping:

$f: S \to T$

where $S$ and $T$ are the finite sets:

 $\ds S$ $=$ $\ds \set {a, b, c, i, j, k}$ $\ds T$ $=$ $\ds \set {p, q, r, s}$

and $f$ is defined as:

$f = \set {\tuple {a, p}, \tuple {b, p}, \tuple {c, p}, \tuple {i, r}, \tuple {j, s}, \tuple {k, s} }$

Thus the images of each of the elements of $S$ under $f$ are:

 $\ds \map f a$ $=$ $\ds \map f b = \map f c = p$ $\ds \map f i$ $=$ $\ds r$ $\ds \map f j$ $=$ $\ds \map f k = s$
$S$ is the domain of $f$.
$T$ is the codomain of $f$.
$\set {p, r, s}$ is the image of $f$.

The preimages of each of the elements of $T$ under $f$ are:

 $\ds \map {f^{-1} } p$ $=$ $\ds \set {a, b, c}$ $\ds \map {f^{-1} } q$ $=$ $\ds \O$ $\ds \map {f^{-1} } r$ $=$ $\ds \set i$ $\ds \map {f^{-1} } s$ $=$ $\ds \set {j, k}$

### Mapping on Infinite Set

The following diagram illustrates the mapping:

$f: S \to T$

where $S$ and $T$ are areas of the the plane, each containing an infinite number of points.

$\Dom f$ is the domain of $f$.
$\Cdm f$ is the codomain of $f$.
$\Img f$ is the image of $f$.

Note that by Image is Subset of Codomain:

$\Img f \subseteq \Cdm f$

There are no other such constraints upon the domain, image and codomain.

## Mapping as Unary Operation

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

## Notation

Let $f$ be a mapping.

This is usually denoted $f: S \to T$, which is interpreted to mean:

$f$ is a mapping 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 $x \in S, y \in T$, the usual notation is:

$f: S \to T: \map f s = y$

where $\map f s = y$ is interpreted to mean $\tuple {x, y} \in f$.

It is read $f$ of $x$ equals $y$.

This is the preferred notation on $\mathsf{Pr} \infty \mathsf{fWiki}$.

## Also known as

Words which are often used to mean the same thing as mapping include:

transformation (particularly in the context of self-maps)
operator or operation
function (usually in the context of numbers)
map (but this term is discouraged, as the term is also used by some writers for planar graph).

Some sources introduce the concept with informal words such as rule or idea or mathematical notion.

Sources which define a mapping (function) to be only a many-to-one relation refer to a mapping (function) as a total mapping (total function).

Some use the term single-valued relation.

Sources which go into analysis of multifunctions often refer to a conventional mapping as:

a single-valued mapping or single-valued function
a many-to-one mapping, many-to-one transformation, or many-to-one correspondence, and so on.

The wording can vary, for example: many-one can be seen for many-to-one.

A mapping $f$ from $S$ to $T$ is also described as a mapping on $S$ into $T$.

In the context of class theory, a mapping is often seen referred to as a class mapping.

## Also defined as

Some approaches, for example 1999: András Hajnal and Peter Hamburger: Set Theory, define a mapping as a many-to-one relation from $S$ to $T$, and then separately specify its requisite left-total nature by restricting $S$ to the domain.

However, this approach is sufficiently different from the mainstream approach that it will not be used on $\mathsf{Pr} \infty \mathsf{fWiki}$ and limited to this mention.

## Examples

### Rotation of Cartesian Plane Anticlockwise through $30 \degrees$

Let $\Gamma$ be the Cartesian plane.

The rotation $R_{30 \degrees}$ of $\Gamma$ anticlockwise through an angle of $30 \degrees$ about the origin $O$ is a mapping from $\Gamma$ to $\Gamma$.

### $\paren {x - 2}^2 + 1$ Mapping on $\N$

Let $f: \N \to \N$ be the mapping defined on the set of natural numbers as:

$\forall x \in \N: \map f x = \paren {x - 2}^2 + 1$

Then $f$ has an infinite image set, but is neither a surjection nor an injection.

### $x^3 - x$ Mapping on $\R$

Let $f: \R \to \R$ be the mapping defined on the set of real numbers as:

$\forall x \in \R: \map f x = x^3 - x$

Then $f$ is a surjection but not an injection.

### Area and Circumference of Circle

Let $A$ denote the set of circles.

Let $f_1: A \to \R$ be the mapping defined on $A$ as:

$\forall a \in A: \map {f_1} a = \map {\Area} a$

Let $f_2: A \to \R$ be the mapping defined on $A$ as:

$\forall a \in A: \map {f_2} a = \map {\operatorname {Circ} } a$

where $\map {\operatorname {Circ} } a$ denotes the circumference of $a$.

### Definite Integral

Let $\mathscr C$ be the set of continuous real functions defined on a closed interval $\closedint a b$.

The definite integral is a mapping which associates an element $f \in \mathscr C$ with a real number $\ds \int_a^b \map f x \rd x$.

### Age of a Person

Let $P$ be the set of all people.

Let $\theta: P \to \Z$ be the mapping defined as:

$\forall x \in P: \map \theta x = \text { the age of$x$last birthday}$

### Height of a Person

Let $P$ be the set of all people.

Let $\theta: P \to \Z$ be the mapping defined as:

$\forall x \in P: \map \phi x = \text { the height of$x$in mm}$

## Mistakes

Here are some supposed definitions of mappings which contain mistakes.

### Image Elements not in Codomain

$f: \N \to \N$ defined as: $\forall x \in \N: x \mapsto x - 7$

### Image Element Undefined

$g: \R \to \R$ defined as: $\forall x \in \R: x \mapsto \dfrac 1 x$

### Image Element Multiply Defined

$h: \R \to \R$ defined as: $\forall x \in \R: x \mapsto \begin{cases} x + 1 & : x \ge 0 \\ 0 & : x \le 0 \end{cases}$

### Mapping not Well-Defined

$\theta: \Q \to \Z$ defined as: $\forall m, n \in \Z, n \ne 0: \dfrac m n \mapsto m + n$

## Also see

• Results about mappings can be found here.