abstractmath.org 2.0
help with abstract math



Produced by Charles Wells     Revised 2016-08-19

Introduction to this website    website TOC    website index   blog     Back to head of functions chapter

EXAMPLES OF FUNCTIONS

Basic functions

The examples given here:

Identity function

For any set $A$, the identity function ${{\operatorname{id}}_{A}}:A\to A$ is the function that takes each element of $A$ to itself.

Inclusion function

If $A\subseteq B$ (see inclusion), then the inclusion function $\operatorname{inc}:A\to B$ that takes every element in $A$ to the same element regarded as an element in $B$. In other words, $\operatorname{inc}(a)=a$ for every element $a\in A$.

Constant function

If $A$ and $B$ are nonempty sets and $b$ is a specific element of $B$, then then constant function ${{C}_{b}}:A\to B$ is the function that takes every element of $A$ to $b$; that is, ${{C}_{b}}(a)=b$ for all $a\in A$.

Empty function

If $A$ is any set, there is exactly one function $E:\varnothing \to A$. This function is called the empty function.

Coordinate function

If $A$ and $B$ are sets, there are two coordinate functions ${{p}_{1}}:A\times B\to A$ and ${{p}_{2}}:A\times B\to B$, defined for $a\in A$ and $b\in B$ by ${{p}_{1}}(a,b)=a$ and ${{p}_{2}}(a,b)=b$.

Sequences

A sequence is a list of math objects.

Example: A finite sequence

Example: An infinite sequence

A basic fact about sequences

A sequence is a function on its index set.

This statement causes a major ratchet effect for some students. It looks like random nonsense until you suddenly understand it, after which it is totally obvious.

A sequence is a function. Its domain is the index set and the value at $i$ is the entry indexed as $i$ in the sequence.

Examples

There is much more information on tuples and sequences in the Wikipedia articles Tuple and Sequence.

Binary operations

A binary operation on a set $S$ is a function $F:S\times S\to S$.  (See cartesian product).

Consciousness-expanding examples of functions

In this section I give you examples of really weird functions that you may never have thought of as functions before, because if you are a beginner in abstract math, you probably need to:

Loosen up narrow-minded ideas about what a function is

Other consciousness-expanding examples of functions are listed in an appendix.

Example: "Split"

A function can be given by different rules on different parts of its domain. It is still one function.

Let $F:[0,1]\to\mathbb{R}$ be defined by \[F(x):=\left\{ \begin{align} 2x\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,(0\le x\le 0.5) \\ 3(x-1)^2\,\,\,\,(0.5\lt x\le 1) \\ \end{align}\right.\] This is the graph of $F$:


Example "Finite"

(1) A function may not be defined by a formula, and (2) it need not involves numbers at all.

Let the function $F$ be defined on the set $\left\{\textsf{a},\textsf{b},\textsf{c},\textsf{d }\right\}$ like this:  \[F(\textsf{a})=\textsf{a},\,F(\textsf{b})=\textsf{c},\,F(\textsf{c})=\textsf{c},\,F(\textsf{d})=\textsf{b}\] In this definition, $\textsf{a}$, $\textsf{b}$, $\textsf{c}$ and $\textsf{d}$ are letters of the alphabet, not variables.

The article Representations of functions describes how to represent finite functions in much more detail.

Example: "Word Length"

The domain and codomain of a function can be completely different sets.

Let $S$ be some set of English words, for example the set of words in a given dictionary. Then the length of a word is a function; call it $L$.

Example: "$n$th pair of primes"

You can correctly define a function you know you can't calculate.

A prime pair consists of a pair of primes that differ by $2$. The first six prime pairs are $(3,5)$, $(5,7)$, $(9,11)$, $(11,13)$, $(17,19)$ and $(29,31)$.

Let $PP:\mathbb{N}\to\mathbb{N}\times\mathbb{N}$ be defined like this: (1) If there are fewer than $n$ prime pairs, then $PP(n)=0$. (2) Otherwise, $PP(n)$ is the $n$th prime pair in order.

Example: "Dirichlet”

A real-valued function may not have a graph you can draw.

This example uses the concepts of rational and irrational.

Let $F:\mathbb{R}\to\mathbb{R}$ be defined by \[F(x):= \begin{cases} 1 & \text{if }x\text{ is rational}\\ \frac{1}{2} & \text{if }x\text{ is irrational}\\ \end{cases}\]  for all real $x$.

Example: Sine Blur

The graph of a real valued function on a finite interval can be an infinitely long curve.

Let $F(x):=.5 \sin \left( \frac{50}{x} \right),\,\,\,\,\,\,\left( x \gt0 \right)$.

Example: Derivative

A function can have a function as input and a function as output.

Let $\mathcal{D}$ be the set of all differentiable functions from $\mathbb{R}$ to $\mathbb{R}$, and $\mathcal{A}$ the set of all functions from $\mathbb{R}$ to $\mathbb{R}$. Define $D:\mathcal{D}\to\mathcal{A}$ be the function that takes a function $f$ in $\mathcal{D}$ (in other words a function that has a derivative) to its derivative.

The chapter Derivatives contains many graphs, each showing a function and several of its derivatives.

Appendix

Other consciousness-expanding examples of functions



Creative Commons License

This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.