# 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

Let $S$ be a set.

A **self-map on $S$** is a mapping from $S$ to itself:

- $f: S \to S$

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

## Class-Theoretical Definition

Let $V$ be a basic universe.

A **mapping** $f$ in the context of Class Theory is a relation such that:

- $f \subseteq V \times V$:

- $\forall x \in \Dom f: \exists! y \in \Img f: \tuple {x, y} \in f$

That is, for every $x$ in the domain of $f$, there exists exactly one $y$ in the image of $f$ such that $\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$.

In the context of mappings, the **domain** and the preimage of a mapping are the same set.

### Codomain

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

The **codomain** of $f$ is the set $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\) |

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.

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

Sometimes the brackets are omitted: $f x = y$, as seen in Allan Clark: *Elements of Abstract Algebra*, for example.

The notation $f: x \mapsto y$ is often seen, read **$f$ maps**, or **sends**, **$x$ to $y$**.

In the context of index families, the conventional notation $x_i$ is used to denote the value of the index $i$ under the indexing function $x$.

Thus $x_i$ means the same thing as $\map x i$.

Some sources use this convention for the general mapping, thus:

- $f_x = y$

as remarked on in P.M. Cohn: *Algebra Volume 1* (2nd ed.), for example.

Less common notational forms of $\map f s = y$ are:

- $x f = y$, as seen in Nathan Jacobson:
*Lectures in Abstract Algebra: Volume $\text { I }$: Basic Concepts*and 1968: Ian D. Macdonald:*The Theory of Groups*, for example - $x^f = y$, as seen in Nathan Jacobson:
*Lectures in Abstract Algebra: Volume $\text { I }$: Basic Concepts*and John D. Dixon:*Problems in Group Theory*, for example- This left-to-right style is referred to by some authors as the
**European convention**.

- This left-to-right style is referred to by some authors as the

John L. Kelley: *General Topology* provides a list of several different styles: $\tuple {f, x}$, $\tuple {x, f}$, $f x$, $x f$ and $\cdot f x$, and discusses the advantages and disadvantages of each.

The notation $\cdot f x$ is attributed to Anthony Perry Morse, and can be used to express complicated expressions without the need of parenthesis to avoid ambiguity. However, it appears not to have caught on.

### Warning

The notation:

is an abuse of notation.

If $f: S \to T$ is a mapping, then $\map f x \in T$ for all $x \in S$.

Thus $\map f x$ is a mapping if and only if $\Img f$ is a set of mappings.

The point is that, as used here, $\map f x$ is not a mapping, but it is the image of $x$ under $f$.

Hence it is preferable not to talk about:

*the function $\cos x$*

but instead should say:

*the function $\cos$*

or:

*the function $x \mapsto \cos x$*

although for the latter it would be better to also specify the domain and codomain.

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

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

## Sources

- 1967: John D. Dixon:
*Problems in Group Theory*... (previous) ... (next): Introduction: Notation - 1970: B. Hartley and T.O. Hawkes:
*Rings, Modules and Linear Algebra*... (previous) ... (next): Chapter $1$: Rings - Definitions and Examples: $1$: The definition of a ring - 1975: W.A. Sutherland:
*Introduction to Metric and Topological Spaces*... (previous) ... (next): Notation and Terminology - 1978: John S. Rose:
*A Course on Group Theory*... (previous) ... (next): $0$: Some Conventions and some Basic Facts - 1989: George S. Boolos and Richard C. Jeffrey:
*Computability and Logic*(3rd ed.) ... (previous) ... (next): $1$ Enumerability - 1993: Keith Devlin:
*The Joy of Sets: Fundamentals of Contemporary Set Theory*(2nd ed.) ... (previous) ... (next): $\S 1$: Naive Set Theory: $\S 1.6$: Functions

- For a video presentation of the contents of this page, visit the Khan Academy.