The concept of a function is that of something which gives a unique output for a given input.
Definition 2.1.1 Consider two sets, D and R along with a rule which assigns a unique element of R to every element of D. This rule is called a function and it is denoted by a letter such as f. The symbol, D
Example 2.1.2 Consider the list of numbers,
In this example there was a clearly defined procedure which determined the function. However, sometimes there is no discernible procedure which yields a particular function.
Example 2.1.3 Consider the ordered pairs,

the set of first entries in the given set of ordered pairs, R ≡
Sometimes functions are not given in terms of a formula. For example, consider the following function defined on the positive real numbers having the following definition.
This is a very interesting function called the Dirichlet function. Note that it is not defined in a simple way from a formula.
Example 2.1.5 My phone number has 10 digits. Let f :
This is not a very interesting function. I want to emphasize that functions are defined in terms of what they do rather than in terms of some formula although in calculus, we usually use functions which do come from a formula.
Example 2.1.6 Let D consist of the set of people who have lived on the earth except for Adam and for d ∈ D, let f
This function is not the sort of thing studied in calculus but it is a function just the same. When D
Definition 2.1.7 Let f,g be functions with values in ℝ. Let a,b be points of ℝ. Then af + bg is the name of a function whose domain is D

The function fg is the name of a function which is defined on D

Similarly for k an integer, f^{k} is the name of a function defined as

The function f∕g is the name of a function whose domain is

defined as

If f : D

which is defined as

This is called the composition of the two functions.
You should note that f
Sometimes people get hung up on formulas and think that the only functions of importance are those which are given by some formula. It is a mistake to think this way. Functions involve a domain and a range and a function is determined by what it does. This is an old idea. See Luke 6:44 where Jesus says essentially that you know a tree by its fruit. See also Matt. 7 about how to recognize false prophets. You look at what it does to determine what it is. As it is with people and trees, so it is with functions.
Example 2.1.8 Let f

Example 2.1.9 Let f

for t ≥−1. If t < −1 the inside of the square root sign is negative so makes no sense. Therefore, g ∘ f :
Note that in this last example, it was necessary to fuss about the domain of g ∘ f because g is only defined for certain values of t.
The concept of a one to one function is very important. This is discussed in the following definition.
Definition 2.1.10 For any function f : D

There may be many elements in this set, but when there is always only one element in this set for all y ∈ f
Polynomials and rational functions are particularly easy functions to understand because they do come from a simple formula.
Definition 2.1.11 A function f is a polynomial if

where the a_{i} are real or complex numbers and n is a nonnegative integer. In this case the degree of the polynomial, f

where h and g are polynomials.
For example, f

is a rational function.
Note that in the case of a rational function, the domain of the function might not be all of ℝ. For example, if

the domain of f would be all complex numbers not equal to −1. Also, f

This signifies the function f such that

Closely related to the definition of a function is the concept of the graph of a function.
Definition 2.1.12 Given two sets, X and Y, the Cartesian product of the two sets, written as X × Y, is assumed to be a set described as follows.

ℝ^{2} denotes the Cartesian product of ℝ with ℝ.
The notion of Cartesian product is just an abstraction of the concept of identifying a point in the plane with an ordered pair of numbers.
Definition 2.1.13 Let f : D

Note that knowledge of the graph of a function is equivalent to knowledge of the function. To find f