The most useful abstractions in mathematics is the concept of function, which can be further abstracted.
Another mathematical object that acts like functions is an operator, an entity that devours functions as functions find numbers more edible. The most famous operator is the “differentiation”, capable of transforming (derivative) a function into another function.
When it comes to using a function, two different people using the same function and similar input most give a matching answer. If they’re different, then at least one of them must wrong. This is a way to ensure that a function is “well-defined”.
A more formal definition is given as follows:
One can think of a function as a special type of binary relation, we have the form
Note, that not all values can serve as an input of a function (e.g. square root of a negative), similarly some outputs are not possible. Thus in dealing with a function as a relation contained in
For a better understanding of the four sets, consider the following visualization:
Only 3 of the sets were baptized. The set A’ is called the domain of the function f. The set B’ is known as the range of the function f. The set B is called the codomain of the function f. The input set A does not have a name. It was natural to rigged the definition of a function to merge A and A’ into one set. Hence, there is only one set on the input side – the domain of our function.
We write the domain of a relation R
We now have an idea that functions are just special classes of relations; it is natural to say that function is just a set of ordered pairs. Basically, the function is tied up to the rules that give the output and the type of input given.
For instance, the function
In specifying a function precisely, one must define its domain as well as a formula for it. Conventionally, this is given by writing a formula then a semicolon then a domain.
Now, we are ready for the real definition of a function.
A function must have its domain equal to the set A (where inputs come from). We say that the function is defined on its domain.
A function’s range and codomain may be different. In the event that they are equal, we say that the function is surjective.
Given an element x and y, of the domain and codomain, and
Example: for a function
In summary, if a function is surjective, every element of the codomain has a preimage.
One commonly used notation to refer to the preimage of some element, y, of the range is
One can define an inverse for any relation; the inverse is formed by simply exchanging the elements in the ordered pairs that make up R.
In the graphical representation, the inverse is just a reflection of the original relation in the line y = x. Note, however, that it is possible that one, both or neither of these to be functions.
Consider the graph of
The inverse function doesn’t pass the vertical line test (uniqueness of the range value), thus its not really a function but merely a relation. The function
The interesting part of this inverse function is that it makes a specific choice. If we start with a negative number (e.g. -3) and square it, we get a positive (e.g. 9), and if we try to get its inverse (square root), we get another positive number (e.g. 3). This is clearly unacceptable because we did not end up with what we ought to get as per function definition.
Let’s consider the case now, where the inverse of a function is a function.
Under what circumstances does the inverse pass the vertical line test?
When the original function passes the so-called horizontal line test (every horizontal line intersects the graph at most once)
An example of a function that passes the horizontal line test is the cube of an input:
Injective functions can be inverted – the domain of the inverse function of f will only be the range, Rng(f), which as we have seen may fall short of the being the entire codomain, since
The best way of thinking injective functions is in terms of preimages – when a function is injective, preimages are unique.
There are instances that a function is both injective and surjective (one-to-one and onto). These functions are known as bijective.
Bijective is important as it allows mathematician to match every elements of two sets. You will probably spend a good bit of time in the future devising maps between sets and then proving that they are bijections.
The way to show that a function is bijective is to prove that it is both a (1) surjection and an (2) injection.
Inverse function is important in this part, so if one finds the inverse function easily then it is easy to find a preimage for an arbitrary element. Here we are talking about a constructive proof of an existential statement.
Given the definition of surjective:
A function f is surjective iff for all y which is an element of the codomain there exist an x which is an element of the domain such that y = f(x).
In mathematical notation, we want to prove this:
Find the x that works for an arbitrary y.
In injection, we consider two distinct elements of
The ideas of “images” and “preimages” can be extended to sets.
If S is a subset of dom(f) then the image of S under f is denoted f(S) and
With the extended f to cover the power set of its domain and range. We can now introduce a new meaning of surjective and injective functions.
Disclaimer: this is a summary of section 6.5 from the book A Gentle Introduction to the Art of Mathematics: by Joe Fields, the content apart from rephrasing is identical, most of the equations are screenshots of the book and the same examples are treated.