What is the single most important concept in mathematics? Answering this question is never easy as it can be subjective at times. But if we were to suggest top 5 candidates, “function” will most definitely make it to everyone’s list.
And the reason is simple: its ubiquity. The concept of function not only permeates the realm of mathematics but also manifests itself in everyday life.
So what is a function? Well, even though there are ways to formalize its definition (e.g. through set theoretical language), we will avoid these abstractions for the time being.
Instead, let’s draw inspiration from some real life examples to develop a more concrete idea of functions.
Example 9.1
A vending machine that allows the customer to press specific button to choose the type of beverages.
Example 9.2
A computer programme that assigns to every library club member a 4-digit ID number.
Example 9.3
A test grading scale that classifies scores between 0 and 2 points as fail and scores between 3 and 5 points as pass.
While all the examples above are taken from different scenarios, they do have something in common: a rule that relates one collection of objects (called the domain) to another collection of objects (called the codomain). To put it simply, the domain and codomain are the worlds in which the inputs and outputs live, respectively. Pictorially, domain is where the arrows emanate from and codomain is where the arrows head towards.
By the way, the type of diagrams shown above, called the arrow diagram, is a convenient way to depict this sort of (binary) relations. For our purpose, we will show four relevant ones below along with their names, which are pretty self-evident (they are named by mathematicians, so what else do you expect?).
The question is, can any relation be considered as function?
Not really. To discuss function meaningfully, we have to avoid two potential issues. Let’s use Example 9.1 to see what could go wrong.
Issue 1
Pressing Button C does nothing at all. If it serves no purpose, it should be removed from the vending machine.
Every button of the machine must be assigned to one type of beverages.
Issue 2
On Day 1, pressing Button A gives us a can of Coke. On Day 28, however, pressing Button A gives us a can of Pepsi instead. We say that the vending machine is inconsistent.
Every button of the machine must be assigned to at most one type of beverages.
In view of the above two issues, a relation ought to fulfil both of the following criteria to be a valid function:
[F1] Every element of the domain must be assigned to one element of the codomain.
[F2] Every element of the domain must be assigned to at most one element of the codomain.
Otherwise, I guess you could say that the relation – wait for it – malfunctions.
In particular, both one-to-one and many-to-one relations are functions, and so are all three real life examples above. On the other hand, both one-to-many and many-to-many relations violate criterion [F2] and hence are not functions.
Of course, mathematicians’ interest in functions is never confined to daily life instances. Next time, we will introduce more terminologies and employ some notations to pave the way for a systematic discussion of this topic. Until then, stay acute, stay safe. See you!
Remark 9.1
Let’s investigate further the criteria for a relation to be a function. Perceptive readers will have noticed that there’s an asymmetry between the domain and the codomain. More precisely, we DO NOT require a function to satisfy any of the two criteria below:
[G1] Every element of the codomain must be assigned to one element of the domain.
[G2] Every element of the codomain must be assigned to at most one element of the domain.
Therefore, Example 9.2 and Example 9.3 are still considered as functions even though they do not fulfil [G1] and [G2], respectively.
That said, if a function does satisfy either [G1] or [G2] (or both), interesting consequences will ensue and so it deserves special attention. In fact, we have special names for these types of functions:
- A function that satisfies [G1] is called a surjection (or onto function).
- A function that satisfies [G2] is called an injection (or one-to-one function).
- A function that satisfies both [G1] and [G2] is called a bijection (or one-to-one correspondence).
“What’s so special about them?” you asked me.
(See Part 3 for more discussion on surjection and injection.)
Pingback: The way it functions (Part 2) - Acute Angel
Pingback: The way it functions (Part 3) - Acute Angel