02 Setsandfunctions
02 Setsandfunctions
Note 2
2.1 Sets
The notion of a set is very fundamental in mathematics and therefore we will discuss
some terminology and notation concerning sets in this section.
Basically, a set A is a way to “bundle” elements together in one object. If we for example
want to write down a set consisting of the numbers 0 and 1, we simply write {0, 1}. This
would be an example of a set with two elements. Elements do not have to be numbers,
but could in principle be anything. Repetition of elements does not make a set larger in
the sense that if an element occurs twice or more times in a set, all its duplicates can be
removed. For example, one has {0, 0, 1} = {0, 1} and {1, 1, 1, 1} = {1}. Also the order
in which the elements of a set are written down is not important. Hence for example
{0, 1} = {1, 0}.
Some sets of numbers are used so often, that there is a standard notation for them:
set A. If two elements are in the same set, say a1 ∈ A and a2 ∈ A, it is common to write
a1 , a2 ∈ A.
Example 2.1
A set is determined by its elements, meaning that two sets A and B are equal, A = B,
if and only if they contain the same elements. In other words A = B if and only if for
all elements a, it holds that a ∈ A ⇔ a ∈ B. If A and B are sets, then B is called
a subset of A, if any element of B is also an element of A. A common notation for this
is B ⊆ A. In other words, the statement B ⊆ A is by definition true if and only if the
statement a ∈ B ⇒ a ∈ A is true for all elements a. In particular A ⊆ A, since for all a
the implication a ∈ A ⇒ a ∈ A is true. Instead of writing B ⊆ A, one may also write
A ⊇ B.
The empty set is the set not containing any elements at all. It is commonly denoted by
∅, inspired by the letter Ø from the Danish and Norwegian alphabet. Some authors use
{} for the empty set, but we will always use the notation ∅ for it. The empty set ∅ is a
subset of any other set A.
If one wants to stress that a set B is a subset of A, but not equal to all of A, one writes
B ( A or alternatively A ) B. Finally, if you want to express in a formula that B is not a
subset of A, it is possible to use the logical negation symbol ¬ and write that ¬( B ⊆ A),
but it is more customary to write B 6⊆ A or alternatively A 6⊇ B.
Example 2.2
Since every natural number is an integer, we have N ⊆ Z. Every integer n ∈ Z is also a real
number. Therefore Z ⊆ R. In fact, we even have N ( Z and Z ( R. Indeed to show N ( Z,
we just have to check that N ⊆ Z (which we already observed) and that N 6= Z. However,
since −1 ∈ Z, but −1 6∈ N, we can indeed conclude that N 6= Z. Similarly Z ( R, since
π ∈ R and π 6∈ Z.
A common way to construct subsets of a set A is by selecting elements from it for which
some logical expression is true. For the sake of notation, let us denote this logical ex-
pression by P( a). Then { a ∈ A | P( a)} denotes the subset of A consisting of precisely
those elements a ∈ A for which the logical expression P( a) is true.
eNote 2 2.1 SETS 3
Example 2.3
Let Z as before be the set of integers. Then { a ∈ Z | a ≥ 1} is just the set {1, 2, 3, 4, . . . } and
{ a ∈ Z | a ≤ 3} = {. . . , −1, 0, 1, 2, 3}. Also { a ∈ Z | 1 ≤ a ≤ 3} = {1, 2, 3}.
Example 2.4
Apart from the standard notations N, Z and R that we already introduced, a further example
is the set Q: the set of all rational numbers, that is to say, the set of fractions of integers. More
precisely we have na o
Q= | a, b ∈ Z, b 6= 0 .
b
This simply means that an element of Q is of the form a/b, where both a and b are integers,
where b is not zero. Note that fractions like 1/2 and 2/4 are the same, since 2/4 can be
simplified to 1/2 by dividing both numerator and denominator by 2. More generally, two
fractions a/b and c/d are the same if and only if ad = bc.
Since any integer n ∈ Z can be written as n/1, we see that Z ⊆ Q. In fact, since 1/2 ∈ Q
and 1/2 6∈ Z, we have Z ( Q. Further, any fraction of integers is a real number, so that
Q ⊆ R. It turns out that Q ( R. A way to see this is to find a real number √ that cannot
√ integers. One example of such a real number is 2, but we
be written as a fraction of
will not show here why 2 6∈ Q.
Given two real numbers a and b such that a < b, one can define several standard subsets
of R called intervals. These are:
[ a, b] = { x ∈ R | a ≤ x ≤ b},
R≥ a = { x ∈ R | x ≥ a } ,
eNote 2 2.1 SETS 4
R> a = { x ∈ R | x > a } ,
R≤ a = { x ∈ R | x ≤ a }
and
R< a = { x ∈ R | x < a } .
Example 2.5
The interval ]0, 1] consists of all real numbers x satisfying 0 < x ≤ 1. This interval is not
closed and not open either. The set R≥0 is the set of all nonnegative real numbers, while R>0
is the set of all positive real numbers. The notation R+ is also often used to denote the set of
all positive real numbers.
It is intuitive that two sets are equal if and only if they are subsets of each other. Let us
be more precise as to why this is true and state this as a lemma.
Lemma 2.6
Let A and B be two sets. Then A = B if and only if A ⊆ B and A ⊇ B.
Proof. The statement A = B for two sets A and B, is logically equivalent to the statement
a ∈ A ⇔ a ∈ B for all a. Using Equation (1-22), we can split the bi-implication up in two
implications. Then we obtain the logically equivalent statement ( a ∈ A ⇒ a ∈ B) ∧
( a ∈ A ⇐ a ∈ B) for all a. But this is equivalent to saying that A ⊆ B ∧ A ⊇ B.
Instead of ⊆ and ⊇, some authors prefer the symbols ⊂ and ⊃. However, yet other
authors, use the symbols ⊂ and ⊃ in the meaning of ( and ), inspired by the use of
< and > in the setting of strict inequalities. To avoid confusion, we will not use the
symbols ⊂ or ⊃.
There are several basic definitions and operations involving sets that we will use later
on. We illustrate them in Example 2.7. Fist of all, if A and B are two sets, then we define
the intersection of A and B, denoted by A ∩ B, to be the set consisting of all elements that
are both in A and in B. In other words:
A ∩ B = { a | a ∈ A ∧ a ∈ B }. (2-1)
eNote 2 2.1 SETS 5
A∩B
A B
A and B disjoint
A B
A∪B
A B
A B
eNote 2 2.1 SETS 6
A \ B = { a | a ∈ A ∧ a 6 ∈ B }.
A\B
A B
A × B = {( a, b) | a ∈ A ∧ b ∈ B}.
In other words, the Cartesian product of two sets A and B, is simply the set of all pairs
( a, b), whose first coordinate is from A and whose second coordinate is from B. The
Cartesian product of a set A with itself is sometimes denote as A2 . In other words:
A2 = A × A.
Later on we will mainly use the Cartesian product of two sets, but it is not hard to define
the Cartesian product of more than two sets. One simply uses more coordinates, one
for each set in the Cartesian product. For example A × B × C = {( a, b, c) | a ∈ A, b ∈
B, and c ∈ C }. More generally, if n is a positive integer and A1 , . . . , An are sets, then
A1 × · · · × An = {( a1 , . . . , an ) | a1 ∈ A1 , . . . , an ∈ An }.
If all sets are equal, say A1 = A, . . . , An = A, then one often writes An for their Cartesian
product. In other words
An = {( a1 , . . . , an ) | a1 ∈ A, . . . , an ∈ A}. (2-3)
Example 2.7
9. {2, 3, 4} \ {1, 2, 3, 4} = ∅,
10. {1, 2} × {3, 4} = {(1, 3), (1, 4), (2, 3), (2, 4)},
11. {1, 2}2 = {(1, 1), (1, 2), (2, 1), (2, 2)}.
In Equations (2-1) and (2-2), the logical opeators ∧ and ∨ came in very handy. In Theo-
rem 1.10 we have seen various properties of these two logical operators. These can now
be used to show similar properties of intersections and unions of sets:
Theorem 2.8
Let A, B and C be sets. Then
A∩A = A (2-4)
A∪A = A (2-5)
A∪B = B∪A (2-6)
A∩B = B∩A (2-7)
A ∪ ( B ∪ C ) = ( A ∪ B) ∪ C (2-8)
A ∩ ( B ∩ C ) = ( A ∩ B) ∩ C (2-9)
A ∩ ( B ∪ C ) = ( A ∩ B) ∪ ( A ∩ C ) (2-10)
A ∪ ( B ∩ C ) = ( A ∪ B) ∩ ( A ∪ C ) (2-11)
eNote 2 2.1 SETS 8
Proof. Let us prove the last item, that is to say Equation (2-11). Proving the remaining
items is left to the reader. According to Equation (2-1), we have
B ∩ C = { a | a ∈ B ∧ a ∈ C }.
On the other hand, applying Equation (2-2) to the sets A and B ∩ C, we see that
A ∪ ( B ∩ C ) = { a | a ∈ A ∨ a ∈ B ∩ C }.
Combining these two equations and using Equation 1-8, we then obtain the following:
A ∪ (B ∩ C) = { a | a ∈ A ∨ ( a ∈ B ∧ a ∈ C )}
= { a | ( a ∈ A ∨ a ∈ B) ∧ ( a ∈ A ∨ a ∈ C )}
= { a | ( a ∈ A ∪ B) ∧ ( a ∈ A ∪ C )}
= ( A ∪ B ) ∩ ( A ∪ C ).
Theorem 2.8 shows that propositional logic can be used to rewrite intersections and
unions of sets. We give one example involving the difference of some sets. Here Theo-
rems 1.12 and 1.13 will come in handy.
Example 2.9
A ∩ (B \ C) = {a | a ∈ A ∧ a ∈ B \ C}
= { a | a ∈ A ∧ ( a ∈ B ∧ ¬( a ∈ C ))}.
( A ∩ B) \ ( A ∩ C ) = {a | a ∈ A ∩ B ∧ ¬( a ∈ A ∩ C )}
= {a | ( a ∈ A ∧ a ∈ B) ∧ ¬( a ∈ A ∧ a ∈ C )}
= {a | ( a ∈ A ∧ a ∈ B) ∧ (¬( a ∈ A) ∨ ¬( a ∈ C ))}
= {a | ( a ∈ A ∧ a ∈ B) ∧ ¬( a ∈ A) ∨ ( a ∈ A ∧ a ∈ B) ∧ ¬( a ∈ C )}
= {a | F ∨ ( a ∈ A ∧ a ∈ B) ∧ ¬( a ∈ C )}
= {a | ( a ∈ A ∧ a ∈ B) ∧ ¬( a ∈ C )}
= {a | a ∈ A ∧ ( a ∈ B ∧ ¬( a ∈ C ))}.
2.2 Functions
A very important concept in mathematics is a function. For two given sets A and B, a
function f from A to B assigns to any a ∈ A an element b ∈ B. Instead of the phrase
“assigns to a an element b” one usually just says that “ f maps a to b”. For this reason a
function is sometimes also called a map. Instead of saying that “ f maps a to b” one can
also say that “ f evaluated in a is equal to b”.
The set A is called the domain of the function, while the set B is called the co-domain.
There is a compact notation to capture all this information, namely f : A → B. The
value of a function f in a specific element a will be denoted by f ( a). In words, f ( a) is
often called the image of a under f or sometimes also the evaluation of f in a. Instead
of saying that f maps the value a in A to f ( a), one can also briefly write a 7→ f ( a). All
the notation so far for a function f can compactly be given as follows:
f :A → B
a 7→ f ( a)
For example, the function sending a real number to its square can be given as:
f :R → R
x 7→ x2
Example 2.10
f :R → R
x 7→ x2
This function has domain R and co-domain R. We claim that f (R) = {r ∈ R | r ≥ 0}.
In other words, we claim that f (R) = R≥0 . Using Lemma 2.6, it is enough to show that
f (R) ⊆ R≥0 and R≥0 ⊆ f (R).
First of all, note that f (R) ⊆ R≥0 , since the square of a real number cannot be negative.
√ √ √
Conversely, if r ∈ R≥0 , then r is defined and r = ( r )2 = f ( r ). This shows that any non-
negative real number r is in the image of f . In other words, we have shown that R≥0 ⊆ f (R).
Using Lemma 2.6, we may indeed conclude that f (R) = R≥0 .
This example shows that the image of a function does not have to be equal to its co-domain.
When considering the squaring function as we just did, we could of course right from
the start have defined it as f : R → R≥0 , with x 7→ x2 . Here the only difference is that
we changed the co-domain from R to R≥0 . For this modified function the image is the
same as the co-domain, so why do we make such a distinction between the image and
the co-domain of a function in the general theory? One reason is that it is convenient
not to have to keep track of the image of a function all the time. If we know a function
maps real numbers to real numbers, we simply can set the co-domain equal to R without
worrying further. For complicated functions, it may be even be very difficult to compute
its image.
Two functions f : A → B and g : C → D are equal precisely if they have the same
domain, the same co-domain, and they assign the same values to each of the elements
of their domain A. In formulas:
f = g ⇐⇒ A = C ∧ B=D ∧ f ( a) = g( a) for all a ∈ A.
Example 2.11
f : {0, 1} → {0, 1}
a 7→ a
eNote 2 2.2 FUNCTIONS 11
A B g C
f
x f (x) g( f ( x ))
g◦ f
and
g : {0, 1} → {0, 1}
a 7 → a2
The functions f and g have the same domain and co-domain. Moreover, f (0) = 0, f (1) = 1,
while g(0) = 02 = 0 and g(1) = 12 = 1. Hence f = g.
This example shows that two functions may be the same even if they are described using
different formulas.
h:A → C
a 7→ g( f ( a))
The reason that in this definition the co-domain of the function f needs to be the same
as the domain of the function g, is to guarantee that g( f ( a)) is always defined: for any
a ∈ A, we know that f ( a) ∈ B, so that it indeed makes sense to use the elements f ( a) as
input for the function g, since the domain of g is assumed to be B.
Example 2.12
Let us denote by R>0 the set of all positive real numbers. Suppose that f : R → R>0 is
defined by f ( x ) = x2 + 1 and g : R>0 → R is defined by g( x ) = log10 ( x ), where log10
denotes the logarithm with base 10. Then g ◦ f : R → R is the function sending x ∈ R to
log10 ( x2 + 1). In other words:
g◦ f : R → R
x 7→ log10 ( x2 + 1)
Lemma 2.13
Let A, B, C, and D be sets and suppose that we are given functions h : A → B,
g : B → C, and f : C → D. Then we have ( f ◦ g) ◦ h = f ◦ ( g ◦ h).
Proof. First of all note that both ( f ◦ g) ◦ h and f ◦ ( g ◦ h) are functions from A to D, so
they have the same domain and codomain. To prove the lemma it is therefore enough
to show that for all a ∈ A, we have (( f ◦ g) ◦ h)( a) = ( f ◦ ( g ◦ h))( a). By definition of
the composition ◦, we have
while
(( f ◦ g) ◦ h)( a) = ( f ◦ g)(h( a)) = f ( g(h( a))).
We conclude that for any a ∈ A it holds that ( f ◦ ( g ◦ h))( a) = (( f ◦ g) ◦ h)( a), which is
what we needed to show.
The result from this lemma is usually stated as: composition of functions is an associative
operation. Because of Lemma 2.13, it is common to simplify formulas involving com-
position of several functions, by leaving out the parentheses. For example, one simply
writes f ◦ g ◦ h, when taking the composite of three functions.
Given a function f : A → B, we say that the function f is injective, precisely if any two
distinct elements from A are mapped to distinct elements of B. Writing this in terms of
eNote 2 2.2 FUNCTIONS 13
a1 f b1
a2 b2
a3 b3
a4 b4
A b5
f : A → B is surjective if and only if for all b ∈ B, there exists an a ∈ A such that b = f ( a).
Using as before the notation f ( A) for the image of f , this can compactly be restated as:
a function f : A → B is called surjective precisely if f ( A) = B.
Example 2.14
a1 f b1
a2 b2
a3 b3
B
a4
Example 2.15
There is a very practical connection between bijective functions and inverse functions.
Let us for completeness first define what the inverse of a function is.
Definition 2.16
Let f : A → B be a function. A function g : B → A is called the inverse function of f
if f ◦ g = idB (the identity function on B) and g ◦ f = id A (the identity function on
A). The inverse of f will be denoted by f −1 .
Lemma 2.17
Suppose that A and B are sets and let f : A → B be a function. Then f is bijective if
and only if f has an inverse function.
Conversely, if f has an inverse function, then the equation f ( a) = b implies that f −1 ( f ( a)) =
f −1 (b). Since a = ( f −1 ◦ f )( a) = f −1 ( f ( a)), we see that a = f −1 (b). Hence for any
b ∈ B, there exists a unique element a ∈ A such that f ( a) = b (namely a = f −1 (b)). This
shows that f is bijective.
Example 2.18
Let us again consider the function h : {0, 1, 2} → {3, 4, 5} given by h( x ) = 5 − x from Exam-
ple 2.15. We have seen that the function h is bijective. Hence by Lemma 2.17, it has an inverse
h−1 : {3, 4, 5} → {0, 1, 2}. Recall that h(0) = 5, h(1) = 4 and h(2) = 3. The inverse of h
simply sends the images back to the original values: h−1 (5) = 0, h−1 (4) = 1, and h−1 (3) = 2.
Note that actually the previous calculations show that h−1 ( x ) = 5 − x for all x ∈ {3, 4, 5}.
Hence h−1 : {3, 4, 5} → {0, 1, 2} is given by h−1 ( x ) = 5 − x. A small warning: the inverse of
a function does not have to look similar to the function itself. Later we will see examples of
inverse functions where this indeed is not the case.
mathematical theory of functions, this is not an issue and the “inner workings” of the
function f are then treated as a black box. However, for applications of the theory, it can
be very important to know how to compute function values.
Fortunately, many useful functions can be computed using an algorithm. We will not go
into the precise details on how to define what an algorithm really is, but take an intu-
itive view. Basically, an algorithm is a set of instructions that one could easily transform
into a computer program if one would want to. These simple instructions involve “sim-
ple” operations like multiplication and addition. Moreover, intermediate results can be
stored in memory and used later on in the algorithm if needed. More philosophically,
an algorithm for a function f opens the black box and shows its “inner workings”. Let
us consider the example of the function f : R → R defined by f ( x ) = x3 . A first attempt
to describe an algorithm that given x, computes f ( x ) could be:
Step 3. Return z.
To make the description look even more like a computer algorithm, we will write it in
what is known as pseudo-code. The main difference with the previous description is that
a phrase like “Compute x · x and store the outcome under the name y” is compactly
written as “y ← x · x”. The algorithmic pseudo-code description of the function f :
R → R defined by f ( x ) = x3 then becomes:
Example 2.19
When defining a function by cases like this, it is important to check: 1) that all elements of
the domain of the function appear in one of the cases and 2) that an element of the domain
of the function appears in no more than one of the cases. Here the domain of the function is
R. First of all R is the union of R<0 and R≥0 , so 1) is satisfied. Moreover, R<0 and R≥0 are
disjoint sets, so that 2) is satisfied. In other words: 1) and 2) are satisfied, because the domain
of the function, R, is the disjoint union of R<0 and R≥0 . The given description of the absolute
value function can easily be reformulated as an algorithm in pseudo-code:
To exemplify the theory of functions as developed above, let us now consider some
elementary functions f : A → B, where A and B are subsets of R. To help us to show
injectivity of such functions, we use the following lemma:
eNote 2 2.3 EXAMPLES OF FUNCTIONS 18
Lemma 2.20
Let f : A → B be a function and assume that A and B are subsets of R. Suppose that
either
for all a1 , a2 ∈ A it holds that: a1 < a2 ⇒ f ( a1 ) < f ( a2 ) (2-12)
or
for all a1 , a2 ∈ A it holds that: a1 < a2 ⇒ f ( a1 ) > f ( a2 ). (2-13)
Then f is an injective function.
Proof. Assume that the function f satisfies Equation (2-12). Let a1 and a2 be distinct
elements of A. Since a1 6= a2 , we know that either a1 < a2 or a2 < a1 . If a1 < a2 , Equation
(2-12) implies that f ( a1 ) < f ( a2 ). If a2 < a1 , Equation (2-12) implies f ( a2 ) < f ( a1 ). In
either case, we may conclude that f ( a1 ) 6= f ( a2 ). Hence f is injective. If the function f
satisfies Equation (2-13), a similar reasoning shows that f is injective as well.
Example 2.21
Since the function f is not bijective, it does not have an inverse. Nonetheless, we can modify
the domain and the co-domain of f so that the resulting function is bijective. First of all,
we can create a function g : R → R≥0 defined by g( x ) = x2 . The difference between the
functions f and g is subtle: only their co-domains are different. Therefore, even though for
any real number x, it is true that f ( x ) = g( x ), we still consider the functions f and g to be
two different functions. The reason for introducing the function g is that g is surjective, since
g(R) = R≥0 and R≥0 is the co-domain of g. However, g still does not have an inverse, since
g is not injective. Indeed, the reason is the same as why f was not injective. We still have for
example that g(1) = 1 and g(−1) = 1. What we do next is to introduce yet another function
h : R≥0 → R≥0 defined by h( x ) = x2 . The function h has the same co-domain as the function
eNote 2 2.3 EXAMPLES OF FUNCTIONS 19
g, but note that the domain of the function h is a subset of that of g. Indeed, the domain of
h is R≥0 , which is a strict subset of R, the domain of g. Now one can show that the function
h is strictly monotone and therefore by Lemma 2.20 injective. We already have seen that h is
surjective, so we may conclude that it is bijective. By
√ Lemma 2.17, the function h therefore
√
has an inverse. Since for any x ∈ R≥0 , it holds that x2 = x and ( x )2 = x, we see that the
√
inverse of h is the function h−1 : R≥0 → R≥0 defined by h−1 ( x ) = x.
To illustrate the situation, we have plotted (parts of) the graphs of the functions h and its
inverse h−1 . Note that the graph of h−1 is the mirror image of the graph of h in the line y = x.
From the graph of h we can also see the it is a strictly increasing function.
4
x2
3
2 2 √
x
1 1
x x
1 2 1 2 3 4
Example 2.22
Let e denote the base of the natural logarithm. The constant e is sometimes called Euler’s
number and is approximately equal to 2.71828. The exponential function exp : R → R>0
is defined by x 7→ e x . It is a strictly increasing function and therefore injective. Further, the
image of the exponential function is R>0 , which implies that it is surjective. Combining this
we see that exp is a bijective function. Its inverse is commonly denoted by ln : R>0 → R. In
particular, we have ln(e x ) = x for all x ∈ R and eln(x) = x for all x ∈ R>0 .
We plot the graphs of the functions exp and ln to illustrate the situation.
eNote 2 2.3 EXAMPLES OF FUNCTIONS 20
x
7 e
4 2
ln( x )
3 1
2 x
1 2 3 4 5 6 7
1 −1
x
−2
−2 −1 1 2
The trigonometric functions sine, cosine and tangent are extremely useful examples of
functions and will appear again in various contexts later on. Therefore we briefly revisit
them in this subsection.
First of all, the sine function is usually denoted by sin, but let us in light of our definition
of functions specify which domain and co-domain it has. First of all, we define the sine
function sin : R → [−1, 1] to be the function such that x 7→ sin( x ). The image of sin
is [−1, 1], meaning that sin is a surjective function. It is not an injective function, since
distinct real numbers can have the same value under the sine function. For example,
one has sin(0) = sin(π ) = 0. The graph of the sine function is as follows:
1
sin( x )
x
−2π − 3π
2 −π − π2 π
2 π 3π
2 2π
−1
Similarly, we define cos : R → [−1, 1]. Again, the co-domain is chosen to be the closed
eNote 2 2.3 EXAMPLES OF FUNCTIONS 21
interval [−1, 1], which means that the function cos will be surjective. It is not injective
though, since for example cos(−π/2) = cos(π/2) = 0. The graph of the cosine function
is:
1
cos( x )
x
−2π − 3π
2 −π − π2 π
2 π 3π
2 2π
−1
A third commonly used trigonometric function is the tangent function. Loosely speak-
ing, we have tan( x ) = sin( x )/ cos( x ), but this formula only makes sense for x ∈ R such
that cos( x ) 6= 0. Therefore, we can define tan : { x ∈ R | cos( x ) 6= 0} → R, where
tan( x ) = sin( x )/ cos( x ). Since { x ∈ R | cos( x ) 6= 0} = R \ { x ∈ R | cos( x ) = 0} and
{ x ∈ R | cos( x ) = 0} = {. . . , −3π/2, −π/2, π/2, 3π/2, . . . }, we can also say that the
domain of the tangent function is the set R \ {. . . , −3π/2, −π/2, π/2, 3π/2, . . . }. The
graph of the tangent function is as follows:
eNote 2 2.3 EXAMPLES OF FUNCTIONS 22
6
tan( x )
5
1
x
−2π − 3π
2 −π − π2 π
2 π 3π
2 2π
−1
−2
−3
−4
−5
−6
The small circles on the x-axis indicate the values of x for which the tangent function is
not defined. The tangent function is surjective, since its image is R. Just as the sine and
cosine functions, it is not injective. We have for example tan(0) = 0, but also tan(π ) = 0.
Since none of the trigonometric functions sin, cos and tan discussed in the previous
subsection are bijections, we cannot find inverses for these functions. However, just
as in Example 2.21, we can modify the domain of these functions and obtain functions
that do have an inverse. These inverses are known as the inverse trigonometric functions
(sometimes also as the arcus functions). In this subsection, we give the details of how
these are defined.
eNote 2 2.3 EXAMPLES OF FUNCTIONS 23
First of all, if the domain of the function sin : R → [−1, 1] is restricted to the closed
interval [−π/2, π/2], one obtains a function f : [−π/2, π/2] → [−1, 1] defined by
f ( x ) = sin( x ). The function f is a bijective function, since the graph of the sine function
is strictly increasing on the interval [−π/2, π/2] with values from −1 to 1. The inverse
of this function is called the arcsine and usually in mathematical formulas denoted by
arcsin. Hence arcsin : [−1, 1] → [−π/2, π/2] is the inverse of the sine function whose
domain has been restricted to [−π/2, π/2]. The graphs of these two functions look as
follows:
π
2
arcsin( x )
1
sin( x ) x
1
x
− π2 π
2
−1 − π2
In a very similar way, we can define the arccosine function. First we restrict the domain
of the usual cosine function to the closed interval [0, π ]. The resulting function g :
[0, π ] → [−1, 1], where g( x ) = cos( x ), is strictly decreasing as well as surjective and
thus bijective. The inverse of g is the arccosine function. It is usually denoted by arccos.
Hence arccos : [−1, 1] → [0, π ] is the inverse of the cosine function when its domain
is restricted to [0, π ]. We illustrate the situation by showing the graphs of these two
functions:
eNote 2 2.3 EXAMPLES OF FUNCTIONS 24
π
arccos( x )
1
cos( x ) π
2
x
π
2 π
x
−1 −1 1
Finally, we discuss the tangent function. In this case, we simply consider the function
h :] − π/2, π/2[→ R, where h( x ) = tan( x ). In other words, the function h is simply
the tangent function with its domain restricted to the open interval ] − π/2, π/2[. The
function h is a strictly increasing function with image R, which implies that h is a bijec-
tion. The inverse of h is called the arctangent function, commonly denoted in formulas
as arctan. More precisely, arctan : R →] − π/2, π/2[ is the inverse of the tangent func-
tion with domain restricted to ] − π/2, π/2[. As before, we illustrate the situation by
showing the graphs of these functions:
eNote 2 2.3 EXAMPLES OF FUNCTIONS 25
6
tan( x )
5
1
x
− π2 π
2
−1
−2
−3
−4
−5
−6
π
2
arctan( x )
x
−6 −5 −4 −3 −2 −1 1 2 3 4 5 6
− π2
Example 2.23
Let us determine some values of the inverse trigonometric functions. Since sin(0) = 0, we
have arcsin(0) = 0. However, even though sin(π ) = 0, we do not have arcsin(0) = π. Indeed
a function cannot take two distinct values for the same input! The issue is that arcsin is the
inverse of the sine function with domain restricted to [−π/2, π/2]. Therefore sin( x ) = y only
eNote 2 2.3 EXAMPLES OF FUNCTIONS 26
√
√(y) = x as long as x ∈ [−π/2, π/2]. For example, since sin(π/4) =
implies arcsin 2/2, we
have arcsin( 2/2) = π/4.
√
For the arccos, we√have a similar phenomenon. One has cos(−π/4) = 2/2, but this does
not imply arccos( 2/2) = −π/4. This time the issue is that the domain of the cosine func-
tion was restricted to [0, π√
], when defining the arccos function. On the
√ interval [0, π ] the
cosine does take the value 2/2, namely for x = π/4. Therefore arccos( 2/2) = π/4.
√
As a final example, we have cos(π/3) = 1/2 and sin(π/3) = 3/2. Therefore tan(π/3) =
√
sin(π/3)/ cos(π/3) = 3. The arctan function is the inverse of the tangent function with its
domain restricted to ] − π/2, π/2[. Since π/3 ∈] − π/2, π/2[, we may therefore conclude
√
that arctan( 3) = π/3.