Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
10 views

10 Functions I

Uploaded by

takalee119
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

10 Functions I

Uploaded by

takalee119
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

1 Functions

Introduction

Functions are one of the critical data types that occurs everywhere in mathe-
matics, statistics, and computer science. They provide the means to transport
information from one set to another.

Learning Objectives
• Define a function using both the set-theoretic and traditional f :
A → B notation, and in particular be able to talk about the data of
a function and what functions represent.
• Define the image and preimage of a set under a function. Be able to
compute and prove (pre-)images for relatively simple functions.
• Define the (left, right, two-sided) inverse of a function and compute
such inverses for simple functions.

The Real Definition of a Function

Recall the following from our discussion of relations on sets.


Definition 1
If A and B are sets, a binary relation R between A and B is a subset
S ⊆ A × B. If a ∈ A and b ∈ B, we say that a is related to b (written aRb)
if (a, b) ∈ S. Moreover, we say that R is
• left-total if for every a ∈ A there exists b ∈ B such that aRb.
• functional if for every a ∈ A, b, c ∈ B, if aRb and aRc then b = c.

We didn’t do much with these definitions at the time, but we will now. The
following is the definition of a function. While it may look different than that
with which you are familiar, it is nonetheless the same!
Definition 2
If A and B are two sets, a function f from A to B is a left-total, functional
binary relation on A and B. In this case, A is said to be the domain of f ,
and B is the codomain of f .

Let’s unravel what this means. If A = {2, 4, 6} and B = {♡, ♢}, then S =
{(2, ♡), (4, ♡), (6, ♢)} defines a left-total and functional relation which we’ll call
f . But instead of writing 2f ♡, the notation with which you’re more familiar is
to write f (2) = ♡. Similarly, f (4) = ♡ and f (6) = ♢. This allows us to interpret
what left-total and functional actually mean:
• left-totality says that a function must be defined for every element of its
domain,
• functionality says that an element of the domain can only map to one
element in the codomain (the “vertical line test”).
Functions 2

Functions are often written as f : A → B, explicitly indicating the domain, the


codomain, the name of the function, and the direction in which the function
travels. However, the codomain is not the range of f : The codomain only
indicates where the output of f lives. You’ve probably heard of the graph of a
function, whose proper definition is

Γ(f ) = {(a, f (a)) : a ∈ A} ⊆ A × B.

Notice that this is exactly the set which defines the relation f !

Exercise 3 Let A and B be sets with A ⊆ B. Define a relation g on A × B


by Sg = A × A ⊆ A × B. Does g define a function?

Even though this is the correct formal definition of a function, in practice


mathematicians do not think about functions like this. Instead, we think of
functions as machines that eat elements in A and produce elements in B. You
may generally ignore the relational definition of a function, except when explicitly
instructed otherwise.

Exercise 4 Suppose that X is an arbitrary set and ∅ is the empty set. Is


there a function f : ∅ → X? Is there a function g : X → ∅? Explain why
or why not.

Exercise 5 Which, if any, of the following functions are equal to one an-
other?
1. f : {0, 1} → R, x 7→ x
2. g : {0, 1} → R, x 7→ x2
3. h : {0, 1} → {0, 1} , x 7→ x.

Images and Preimages

Definition 6
Let f : A → B be a function.
1. If U ⊆ A, then we define the image of U to be

f (U ) = {y ∈ B : ∃x ∈ U, f (x) = y} = {f (x) : x ∈ U } .

2. If V ⊆ B, we define the pre-image of V to be

f −1 (V ) = {x ∈ A : f (x) ∈ V } .

Note that despite being written as f −1 (V ), the preimage of a set does not
say anything about the existence of an inverse function.
3 Functions

A B
f :A→B
f (U )
U

Figure 1: A function and its image set.

Example 7

Let f : R → R be specified by f (x) = x2 . Determine f ([−1, 2]).

Solution. By definition, one has f ([−1, 2]) = {f (x) : x ∈ [−1, 2]}, which we claim
is [0, 4]. Indeed, let’s show a double subset inclusion. Suppose that y ∈ [0, 4]

and let x = y. We know that x exists since y ≥ 0 and that x must live in
[0, 2] ⊆ [−1, 2]. Thus f (x) = y, showing that y ∈ f ([−1, 2]).
On the other hand, suppose that x ∈ [−1, 2] so that −1 ≤ x ≤ 2. It follows
that 0 ≤ x2 ≤ 4 (why?), so that f ([−1, 2]) ⊆ [0, 4]. Both inclusions show that
f ([−1, 2]) = [0, 4]. ■

Example 8

Let p : R3 → R2 be given by p(x, y, z) = (x, y). If

D = (x, y) ∈ R2 : x2 + y 2 ≤ 1 ,


determine p−1 (D).

Solution. While it’s not a strictly correct picture, we can think of p as a projection
map, taking a three-dimensional shape and squishing it into the xy-plane. If we
think of p like this, then the pre-image of D is the set of things which get squished
into D; namely, the solid cylinder

C = (x, y, z) : x2 + y 2 ≤ 1 .


Let’s prove that p−1 (D) = C via double subset inclusion.


(⊇) Suppose that c ∈ C and write c = (x0 , y0 , z0 ). By definition, we know
that x20 + y02 ≤ 1 and that z0 can be anything. But then

p(c) = p(x0 , y0 , z0 ) = (x0 , y0 ) and x20 + y02 ≤ 1,

so that p(c) ∈ D by definition. Thus C ⊆ p−1 (D).


(⊆) Let (x0 , y0 , z0 ) ∈ p−1 (D), which means that p(x0 , y0 , z0 ) = (x0 , y0 ) ∈
D. Being an element of D means that (x0 , y0 ) satisfies x20 + y02 ≤ 1, and so
Functions 4

(x0 , y0 , z0 ) ∈ C showing that p−1 (D) ⊆ C. Both inclusions give the desired
equality. ■

Exercise 9 Let f be the function in Example 7. If I = (−1, 1), determine


f −1 (I).

Exercise 10 Let p be the function in Example 8. If

S = (x, y, z) : x2 + y 2 + z 2 = 1 ⊆ R3 ,


determine p(S).

The Inverse of a Function

The word “inverse” has many different meanings depending on the context in
which it is used. For example, what if we were to ask you to find the inverse of
the number 2? What does this mean? To what are we taking the inverse? To
properly understand this, we need to understand the following: Given a binary
operator (an operator which takes in two things and produces a single thing
in return, such as addition and multiplication of real numbers), we say that a
number id is the identity of that operator if operating against it does nothing
to the input. In the case of addition of real numbers, the operator will satisfy
x + id+ = x for all possible x; for example,

2 + id+ = 2, −5 + id+ = −5.

Our experience tells us that id+ = 0. Similarly, for multiplication the identity
id× will satisfy x × id× = x for all x; for example,

3 × id× = 3, π × id× = π.

Again our experience tells us that id× = 1. We say that 0 is the additive identity
and 1 is the multiplicative identity.
Given an operator and an identity, we say that the inverse of x is an element
which, when paired against x, gives the identity. The additive inverse of 2 is the
number y such that 2 + y = id+ = 0. In this case y = −2, and more generally the
additive inverse of n is −n. For multiplication, we can convince ourselves that
the multiplicative inverse of x is 1/x; for example, 2 × (1/2) = 1 = id× .
Notice that every real number has an additive inverse, while there is no mul-
tiplicative inverse for the number 0. In general, one cannot be guaranteed that
an inverse always exists for a generic binary operator.
5 Functions

Definition 11
If A, B, C are sets, and f : B → C and g : A → B are functions, we define
the composition of f and g to be the function

(f ◦ g) : A → C, x 7→ f (g(x)).

If f, g : A → A, then function composition f ◦ g is another example of a


binary operator. What is the identity for this operation? Well, we would like a
function id◦ : A → A such that
f (id◦ (x)) = f (x)
= id◦ (f (x)).
The identity function is therefore the function id◦ (x) = x, the function which
does nothing to the argument! Therefore the inverse of a function f : A → A is
another function f −1 : A → A such that f ◦ f −1 = f −1 ◦ f = id◦ .
This conversation can be generalized for functions whose domain and codomain
are not equal. For example, if f : A → B then f −1 : B → A. However, we now
require two identities functions, idA B
◦ : A → A and id◦ : B → B such that

f −1 (f (x)) = idA
◦ (x) = x, f (f −1 (y)) = idB
◦ (y) = y.

Definition 12
Let f : S → T be a function. We say that g : T → S is a
• left-inverse of f if g(f (s)) = s for all s ∈ S,
• right-inverse of f if f (g(t)) = t for all t ∈ T ,
• inverse of f if it is both a left- and right-inverse. We denote the
inverse of f as f −1 .

Recall the function f : {2, 4, 6} → {♡, ♢} from earlier, which mapped


2 7→ ♡, 4 7→ ♡, 6 7→ ♢.
This function is right-invertible. Indeed, define g : {♡, ♢} → {2, 4, 6} by g(♡) = 2
and g(♢) = 6. Thus
f (g(♡)) = f (2) = ♡ and f (g(♢)) = f (6) = ♢,
showing that f ◦ g is the identity on {♡, ♢}. By the same token, note that f is
a left-inverse of g. It is generally true that if g is a right-inverse to f then f is a
left-inverse to g. However, neither f nor g is invertible (why?).

Exercise 13 Come up with sets A and B and a function f : A → B which


fails to be any type of invertible; that is, f is neither left-, right-, nor
two-sided invertible.

Exercise 14 Consider the function f : R → R, x 7→ x2 . Is f left-, right-,


two-sided invertible, or not invertible at all?

You might also like