Hello. I'm Professor Von Schmohawk and welcome to Why U.
In the last several lectures we looked at some examples of binary relations.
These binary relations can illustrate mathematical relationships
or data measurements from the real world.
In this lecture, we will introduce
a special type of binary relation which we will often encounter in mathematics
called a “function”.
A function is a binary relation
since it relates members of one set A
to members of another set B.
The difference is that
although binary relations can associate any member of A with multiple members of B
functions cannot.
In a function, each member of A can be associated with no more than a single member of B.
A function can be thought of as a machine
which, when given a member of set A as input
produces one specific member of set B as output.
Since there is only one possible output for any particular input
this machine is very predictable.
Given the same input
a function must always produce exactly the same output.
If we let x represent any input element
then the output element which function f produces from x
is written as f followed by an x in parentheses.
We call this “f of x”.
So a function relates elements x from set A
to elements “f of x” of set B.
We say that the function "maps" elements of A to elements of B.
This is sometimes indicated by writing "f colon A arrow B"
indicating a mapping from set A to set B.
Let's represent the elements in A and B as dots.
For a particular function
not every element of A may be a permissible input.
We call the set of elements of A which are valid inputs
the "domain" of the function.
Likewise, the set of elements of B which the function produces from these valid inputs
is called the "range" of the function.
So a function maps each element in its domain to exactly one element in its range.
Every element of a function's domain and range will be involved in the function.
Therefore, the domain and range
are usually the sets of primary interest when discussing a function.
Sometimes we don't know exactly what outputs will be produced by a given function
but we do know the general type of outputs which will be produced.
In other words, we don’t always know the exact range of the function
but we can describe a set which contains this range.
For example, let's say we are studying a function which produces numbers as its output.
We may not know exactly which numbers are produced
so we don't know the function's exact range.
But if we know that they are all real numbers
we can say that the range is contained in R, the set of real numbers.
This set which contains the range is called the "codomain" of the function
and so the range is always some subset of the codomain.
For example, let's say that the domain contains Tarzan, Jane, and Boy
and the codomain contains types of fruit.
We could create a function which relates each person in the domain
to their favorite fruit in the codomain.
For example, if each person had a different favorite fruit
then the range would be a subset of the codomain containing three fruits.
Or if two people had the same favorite fruit
the range would be a subset containing two fruits.
Or perhaps everyone had the same favorite fruit.
Then the range would be a subset of the codomain containing only one fruit.
In all three cases, each person is related to exactly one fruit
so these binary relations are all functions.
On the other hand, if someone had two favorite fruits
then that relation would not be a function.
To be a function, a binary relation must relate each element of its domain
to exactly one element of its codomain.
So a function is a rule that associates each element in its domain
to exactly one element in its codomain.
There can be additional elements in the codomain
which are not associated with any element in the domain
but the subset of elements which are associated is the range of the function.
The range can be as small as a single element
or could include every element of the codomain.
Like any binary relation, functions can be represented as sets of ordered pairs.
The set of ordered pairs which represents a function
is sometimes referred to as the "graph" of the function.
Since a function's domain and range can contain any type of elements
the ordered pairs in its graph can be pairs of any type of elements.
However in Algebra, a function’s domain and range are typically sets of real numbers.
Therefore, its graph will be ordered pairs of real numbers
which can be represented as points on the Cartesian plane.
In the next lecture, we will take a closer look at these numeric functions
and their graphical representations.