Return to the current

Understanding the differences between function and application in mathematics

One thing that confused me a lot at the beginning of my studies on set theories was the differences between correspondence, function, and application. This article aims to clarify these concepts in a simple but precise way.

ENFR

Definition:

Let’s start by correctly defining the notions of function and application in mathematics.

Application

Let AA and BB be two sets.

An application ff is an object that associates for each element aAa\in A an element f(a)f(a) of BB.

More formally:

A relation RA×BR\subseteq A \times B is an application if every element aa of AA is associated with exactly one element bb of BB.

In other words: aA, !bB such that (a,b)R\forall a\in A,\ \exists!b\in B\text{ such that }(a,b)\in R.

Let’s visualize this concept!

Animated directed graph with moving paths

Follow the moving current to read the direction of each edge.

Here R={(X,1),(Y,1)}R = \{(X,1), (Y,1)\} is an application from AA to BB.

If the concept is still unclear for you:

We define before that a relation RR is an application if:

  1. RA×BR \subseteq A \times B
  2. aA, !bB such that (a,b)R\forall a\in A,\ \exists!b\in B\text{ such that }(a,b)\in R

Here A×B={(X,1),(X,2),(Y,1),(Y,2)}A \times B = \{(X,1), (X,2), (Y,1), (Y,2)\} and R={(X,1),(Y,1)}R = \{(X,1), (Y,1)\} so the first condition is verified.

The second condition is also verified because A={X,Y}A = \{X,Y\} and each element of AA is associated with exactly one element of BB. You can deduce that in the case of an application R=A|R| = |A|.

Function

Let’s start first by saying that all applications are functions.

Let AA and BB be two sets. Let AA' be a subset of AA. A function ff is a binary relation that associates for each element aAa\in A' an element f(a)f(a) of BB.

More formally:

With AAA' \subseteq A, a relation RA×BR\subseteq A \times B defines a function with domain AA' if every element aa of AA' is associated with exactly one element bb of BB, and no element of AAA\setminus A' is associated.

In other words: aA, !bB such that (a,b)R\forall a\in A',\ \exists!b\in B\text{ such that }(a,b)\in R, while no pair in RR has its first component in AAA\setminus A'.

If A=AA = A', then this function is an application.

A function can’t link an element to multiple images!

If ff associates at least one element with multiple images (i.e., ff points to several distinct elements at the same time), then we will say that ff is not a function, but a multivalued function or simply a correspondence.

A multi-valued function is not a function. To learn more.

Animated directed graph with moving paths

Follow the moving current to read the direction of each edge.

Here R={(X,1)}R = \{(X,1)\} is a function from AA to BB.

The difference:

We just seen the theory and the original definitions of functions and applications. However, this difference can vary a lot depending on the context. Here are 4 answers to this question:

  1. Synonym: it will often be admitted by abuse of language that the two mean the same thing. It is therefore not necessarily rigorous, but depending on your level, the subject you are working on, the difference may not really matter.
  2. According to the field: without thinking, we will often reserve the term “application” in algebra (“linear application” for example) and that of function in analysis.
  3. Historically: some authors reserve the term function in the case where YY is a set of integers like {0,1}\{0,1\} for example. [2]
  4. The real answer: What we just defined here!

In summary. An application is a function which is itself a correspondence. The reverse is not true!

To complete this article, here is an example of correspondance.

Animated directed graph with moving paths

Follow the moving current to read the direction of each edge.

Here R={(X,1),(X,2)}R = \{(X,1), (X,2)\} is a correspondence from AA to BB. This is not a function because XX is associated with two elements of BB. This is therefore not an application either.