2.3 Functions - Math Berkeley

2.3
Functions
Definition 1. A function f from a set A to a set B is a relation with domain A and codomain B that
satisfies the following two properties:
1. For every element x in A, there is an element y in B such that (x, y) ∈ f .
2. For all elements x in A and y and z in B,
(x, y) ∈ f ∧ (x, z) ∈ f → y = z.
We write f : A → B. We say that f maps A to B. Other names of functions are mappings or
transformations. If f (a) = b, we say that b is the image of a and a is a pre-image of b. For functions f and
g, we say f = g, if, and only if, f (x) = g(x) for all x in A.
range of f = image of A under f = {y ∈ B | y = f (x), for some x ∈ A}.
A function is called real-valued if its codomain is the set of real numbers, and it is called integer-valued if
its codomain is the set of integers. We may add or multiply functions to obtain new functions; if f and g
are functions, then (f g)(x) = f (x)g(x) and (f + g)(x) = f (x) + g(x). The image of a set S under a function
f is the set
f (S) = {t | ∃s ∈ S(f (s) = t)}.
One-to-One and Onto Functions
Definition 2. A function f is said to be one-to-one, or injective, if and only if
f (a) = f (b) → a = b
for all a and b in the domain of f .
Alternatively, using the contrapositive form of the definition, we may say a function f is one-to-one if
∀a∀b(a 6= b → f (b) 6= f (a)).
Definition 3. When a and b are in the domain, a function f is called strictly decreasing if
a < b → f (a) > f (b).
A function f is called strictly increasing if
a < b → f (a) < f (b).
Fact 1. Every strictly increasing function is one-to-one. Every strictly decreasing function is one-to-one.
Definition 4. A function f : A → B is called onto, or surjective, if and only if
∀y ∈ B∃x ∈ A, (f (x) = y).
Definition 5. The function f is a one-to-one correspondence, or bijective, if it is both one-to-one and onto.
Example 1. The identity function is a bijection: ιA : A → A, with ιA (x) = x for all x ∈ A.
Note: ι is the Greek letter iota.
Suppose that f : A → B.
To show that f is one-to-one, show that if f (x) = f (y) for arbitrary x, y ∈ A, then x = y.
To show that f is not one-to-one, find particular elements x, y ∈ A such that x 6= y and f (x) = f (y).
To show that f is onto, consider an arbitrary element y ∈ B and find an element x ∈ A such that
f (x) = y.
To show that f is not onto, find a particular y ∈ B such that f (x) 6= y for all x ∈ A.
1
Inverse Functions and Compositions of Functions
Definition 6. Suppose f is a one-to-one correspondence and y is in the range of f . Then f −1 (y) is defined
to be the number x such that f (x) = y.
Fact 2. Suppose f is a one-to-one correspondence and x and y are numbers. Then
f (x) = y ⇔ f −1 (y) = x.
Fact 3. If f is a one-to-one correspondence, then
• the domain of f −1 equals the range of f ;
• the range of f −1 equals the domain of f .
Definition 7. The composition of functions f and g, denoted by f ◦ g, is the function
(f ◦ g)(x) = f (g(x)) .
Note: We first evaluate g(x), then we evaluate f (g(x)).
Fact 4. The domain of f ◦ g is the set of numbers x in the domain of g, such that g(x) is in the domain of
f.
√
Example 2. Suppose f (x) = x, g(x) = x+1
x+2 , and h(x) = |x − 1|. Evaluate the following.
a) (g ◦ f )(5).
b) (f ◦ h)(−15).
c) What is the domain of g ◦ f ?
d) What is the domain of f ◦ h?
Order Matters in Composition
Example 3. Suppose that f (x) = x2 + 1 and g(x) = x1 .
a) Find f ◦ g.
b) Find g ◦ f .
As the above example demonstrates, in general, f ◦ g 6= g ◦ f .
Fact 5. Suppose f is a one-to-one correspondence. Then
• f (f −1 (y)) = f (x) = y for every y in the range of f ;
• f −1 (f (x)) = f −1 (y) = x for every x in the domain of f .
The Graphs of Functions
Definition 8. Let f : A → B. The graph of the function f is the set of ordered pairs {(a, b) | a ∈ A ∧ f (a) =
b}.
Imagine a real number sitting on a number line. The floor and ceiling of the number are the integers
to the immediate left and to the immediate right of the number (unless the number is, itself, an integer, in
which case its floor and ceiling both equal the number itself ).
2
Definition 9. Given any real number x, the floor of x, denoted bxc, is defined as follows:
x = that unique integer n such that n ≤ x < n + 1.
Symbolically, if x is a real number and n is an integer, then
bxc = n ⇔ n ≤ x < n + 1.
The floor of x is also called the greatest integer less than or equal to x.
Definition 10. Given any real number x, the ceiling of x, denoted dxe, is defined as follows:
x = that unique integer n such that n − 1 < x ≤ n.
Symbolically, if x is a real number and n is an integer, then
dxe = n ⇔ n − 1 < x ≤ n.
Example 4. The 1,370 students at a college are given the opportunity to take buses to an out-of-town game.
Each bus holds a maximum of 40 passengers.
a) For reasons of economy, the athletic director will send only full buses. What is the maximum number
of buses the athletic director will send?
b) If the athletic director is willing to send one partially filled bus, how many buses will be needed to allow
all the students to take the trip?
Example 5. Is the following statement true or false?
For all real numbers x and y, bx + yc = bxc + byc.
Example 6. Prove that for all real numbers x and for all integers m, bx + mc = bxc + m.
Proof. Suppose a real number x and an integer m are given. Let n = bxc. By definition of floor, n is an
integer and
n ≤ x < n + 1.
Add m to all three parts to obtain
n + m ≤ x + m < n + m + 1.
Now n + m is an integer [since n and m are integers and a sum of integers is an integer], and so, by definition
of floor,
bx + mc = n + m.
But n = bxc. Hence, by substitution,
bx + mc = bxc + m.
3