abstractmath.org

help with abstract math

`Produced by Charles Wells.  Home    Website TOC    Website Index   Blog`
`Back to Functions Head `

EXAMPLES OF FUNCTIONS

# Basic functions

The examples given here:

¨  are basic types of functions that are used everywhere in abstract math

¨  are functions you need to be familiar with

¨  are (sigh) boring.

## Identity function

For any set A, the identity function  is the function that takes an element to itself; in other words, for every element , . Its graph is the diagonal of .

#### Usage

¨ Warning:  The word identity has two other commonly used meanings.  This causes trouble because people may refer to the identity function as simply “the identity”, especially in conversation.

¨ The notation  for the identity function on A is fairly common, but so is .

Properties

The identity function is injective and surjective.

#### Understanding the identity function

¨  The identity function on a set A is the function that does nothing to each element of A.

¨  The identity function on  is the familiar function defined by .  Its graph in the plane is the diagonal  line from lower left to upper right through the origin.  Its derivative is the constant function defined by g(x) = 1.

¨  There is a different identity function for each different set.  See overloaded notation.  These functions all have the “same” formula:   for every a in A.  But they are technically different functions because they have different domains.

## Inclusion function

If  (see inclusion), then there is an inclusion function  that takes every element in A to the same element.  In other words,  inc(a) = a for every element .  This fits the property of codomain that requires (in this case) that  because that is what “  ” means  every element of A is an element of B.

#### Usage

¨  The notation  for the identity function on A show which set A we are using, but the notation “inc” does not show either set.

¨  The notation “inc” is my own and is not common.  Other notations I have seen are:  and

¨  Many mathematicians who use the looser definition of function never talk about the inclusion function.  For them, it is merely the identity function.

Properties

The inclusion function is injective.  It is  surjective if and only if A = B.

#### Understanding the inclusion function

¨  The definition says the inclusion function “takes every element in A to the same element.”  I could have worded it this way:

“The inclusion function  takes each element of A to the same element regarded as an element of B.

This wording incorporates elements of “how you think about X” into the definition of X.   This is loose and unrigorous.  But I’ll bet a lot of readers would understand it more quickly that way!

¨  The graph of inc is the same as the graph of  and they have the same domain, so that the only difference between them is what is considered the codomain (A for , B for the inclusion of A in B).   So inc is different from  if you require that functions with different codomains be different (discussed here).

## Constant function

If A and B are nonempty sets and b is a specific element of B, then the constant function  is the function that takes every element of A to b; that is,  for all .

#### Usage

The notation  is not common.  There is no standard notation for constant functions.

Properties

The constant function is injective only if A has exactly one element.  It is  surjective only if B has exactly one element.

#### How to understand constant functions

¨  A constant function takes everything to the same thing.  It has a one-track mind.

¨  A constant function from  to   has a horizontal line as its graph.

¨  The constant function  is not the same thing as the element b of B.

## Empty function

If A is any set, there is exactly one function . Such a function is an empty function. Its graph is empty, and it has no values. An identity function does nothing. An empty function has nothing to do.

Properties

The empty function is vacuously injective.  It is surjective only if A is empty.

## Coordinate function

If A and B are sets, there are two coordinate functions (or projection functions)  and .  Thus for  and ,  and .  (See cartesian product).

In general for an n-fold cartesian product, the function  takes an n-tuple to its i th coordinate.

Properties

¨   is injective if and only if either A is empty or B has at most one element.

¨  It is surjective if and only if A is empty or B is nonempty.

¨  If A (or B) is empty, then so is .  In that case  is the empty function.

¨  For any set S, there are two different coordinate functions  and .  For example, if S is the set of real numbers, then  and .

#### Usage

The coordinate function  may be denoted by  or sometimes  (for projection).

## Binary operations

A binary operation on a set S is a function .  (See cartesian product).

#### Examples

¨  The operation of adding two real numbers gives a binary operation

¨  Subtraction  is also a binary operation on the real numbers.  Observe that, unlike addition, it cannot be regarded as a binary operation on the positive real numbers.

¨  Multiplication of real numbers is also a binary operation .

¨  Division is not a binary operation on the real numbers because you can’t divide by 0.  However, it is a binary operation  on the nonzero real numbers (  is standard notation for the nonzero reals).  You could also look at the function  since 0 / y is defined even though y / 0 is not.  But it is not a binary operation because by definition a binary operation has to fit the pattern  where all three sets are the same.

¨  For any set S, the two projections  and  are both binary operations on S.

#### Notation and usage

¨  With a binary operation symbol, infix notation is usually used: the name of the binary operation is put between the arguments.  For example we write 3 + 5 = 8, not +(3, 5) = 8.

¨  Binary operations are the basis of most of algebra.   See groups for more examples.

# 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 narrowminded ideas about what a function is

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

## Example  (“Split”)

Let  be defined by

The graph of this function is pictured on the right.

##### Notes

¨  F is given by a split definition.  It is defined by one formula for part of its domain and by another on the rest.  F  is nevertheless one function, defined on the closed interval [0,1].

¨  F is discontinuous at .

¨  F is neither

¨  F does not have a derivative at x = 0.5.

¨  The graph does not and cannot show the precise behavior of the function near .

a.  The point  is on the graph, because the definition of F says that F(x) is  for x between 0 and 0.5 inclusive.

b.  For any point x to the right of 0.5, .  For example,  … correct to eighteen decimal places.  In fact,

c.           but .

d.  Nevertheless, F(0.5) is 1, not 0.75.  That implies that F is not continous at x = 0.5.

¨  It would be wrong to say something like: “  starting at the first point to the right of x = 0.5”.  There is no first point to the right of x = 0.5.  See density.

A function can be given by different rules on different parts of its domain.

It is still one function.

## Example (“Finite”)

Let the function F be defined on the set  as follows:  .

##### Notes:

¨  F is defined only for inputs 1,2,3 and 6.  For example,  is not defined.

¨  F is not injective since F(1) = F(2).

¨  F is not defined by a formula.   F(2) = 3 because the definition says it is.

¨  F could be defined by the formula  for .  (This is given by an interpolation formula (MW, Wik)).  But it is not obligatory that a function be defined by a formula, only that a mathematical definition of the function be given.  See Conceptual and Computational.

¨  You could give the function as a table, as in (a).

¨   You can show the function in an picture, with arrows going from each input to its output, as in (b).

A function does not have to be given by a formula.

Another finite function is studied here.

## Example (“Word Length”)

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.

¨  L takes words as inputs.

¨  L outputs the number of letters in the word.  For example,  and .

¨  L is not injective.  For example, .

¨  L is not surjective onto  since there is a longest word in the set of words in any dictionary.

##### Notes

¨  This function illustrates the fact that a function can have one kind of input and another kind of output.

¨  There is a method of computation for this function (count the number of letters) but most people would not call it a formula.

A function can have one kind of input and another kind of output.

## Example (“nth Prime”)

Let F be defined on the natural numbers by requiring that  is the nth prime in order. Thus  and .

##### Notes

There is a procedure for calculating .  For example to calculate F(100), make a list of primes in order (check each natural number in order to see if it is divisible by some natural number other than itself and 1) and stop when you get to the 100th one.  This procedure is ridiculously slow and difficult  to use but it doesn’t matter.    The definition “F(n) is the nth prime in order” gives a precise definition of F, and that is enough to make it a legitimate function.

The definition of a function must tell you

what the value is at every element of the domain,

but it doesn’t have to tell you how to calculate that value.

For example,  is the  prime in order, but there is no way in the world you will ever find out the decimal representation of that prime. There are faster methods for calculating F(n), in particular the sieve method. but the number is so humongous that no method could calculate  in anyone’s lifetime.  See Conceptual and Computational.

Note that we know F is injective even though we can’t calculate its value for large n.

## Example (“Elliptic integral”)

Let

for real numbers .   Its graph is shown to the right.  It has asymptotes (shown in green)  at .

Now let

Since E(x) is a continuous function on the interval, this integral exists for every t.  So G(t) is a properly defined function of the real variable t.

Notes

¨  G is a function of t, not of x.  The variable x  is a bound variable (dummy variable) used in the integral.  The definition of G(t) therefore depends on the value of E(x) for every value of x from 0 to t (or from t to 0).  After all, the integral is the area under the curve between those values of x, so every little twist in the curve matters.

¨  If you try to use methods you learned in Calc 1 to find the indefinite integral  of

with respect to x, you will fail.   It’s known that this integral cannot be expressed in terms of familiar functions (polynomials, rational functions, log, exp, trig functions.)   Nevertheless, for all real t with , the integral

exists and and has a specific value.

¨  The definition of G(t) makes it very easy to find the derivative (!):  .

¨  This function is an example of an elliptic integral. Elliptic integrals have a long (190 years) and rich history, and are best studied as functions of complex variables.

A definition integral may still be meaningful

even if you don’t know a “formula” for the antiderivative

## Example (“Rat/Not”)

Let   for all real x.

¨  (F(1/3)=1, F(42) = 1, but  because  is not rational.

¨  If all you know about x is that it is 3.14159 correct to five decimal places, then you don’t know what F(x) is.  No matter how many decimal places you are given for x, you cannot tell what F(x) is.  You need to have other information about x (whether it is rational or irrational) to determine its value.

¨  There is no way to draw the graph of this function since both the rationals and the irrationals are dense in the set of real numbers.

¨  This function is not continuous, and therefore does not have a derivative.

¨  This function is not injective.

A function need not have a drawable graph.

## Example (“Sine Blur”)

Let .

The frequency goes up rapidly as you get close to the y-axis from the left, since  grows very rapidly as x moves toward 0.  Drawing the graph near the y-axis is impractical because the curve between x = 0 and x = any bigger number is infinitely long even though it occurs in a finite interval.

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

## Example (Derivative)

Let f be a function that has a derivative, and let D(f) be its derivative.   Then D is a function from a set of functions to a set of functions.

¨  If  then , or, using barred arrow notation, .

¨  If  then , or .

These are pictured below.

D takes a function as input and outputs another function, namely the derivative of the first one.  The whole function is the input, not some value of the function, not the rule that defines the function, not the graph.  You have to think of the function as a thing, in other words as a math object.

¨  Functions whose inputs are complicated structures such as functions may be called operators .  (Usage varies in different specialties.)  This function D is the differentiation operator.

¨  The differentiation operator is not injective.  For example,  and  have the same derivative, namely 2x.

¨  The domain of D must include only differentiable function (duh).

A function can have a set of functions as its domain or codomain.

#### Two functions and their derivatives

In each picture, the differentiation operator takes the blue function thought of as a single math object to the red one.

More pictures here like those above

¨

¨

¨

¨