0% found this document useful (0 votes)
4 views

Functions EXERCISE

The document provides definitions and examples of functions, including their domains, codomains, images, and ranges. It explains one-to-one (injective) and onto (surjective) functions, as well as inverse functions and compositions of functions. Additionally, it includes exercises with solutions to reinforce understanding of these concepts.

Uploaded by

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

Functions EXERCISE

The document provides definitions and examples of functions, including their domains, codomains, images, and ranges. It explains one-to-one (injective) and onto (surjective) functions, as well as inverse functions and compositions of functions. Additionally, it includes exercises with solutions to reinforce understanding of these concepts.

Uploaded by

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

Functions

FUNCTION
DEF1:Let A and B be nonempty sets. A function f from A to B is an
assignment of exactly one
element of B to each element of A. We write f (a) = b if b is the unique element of B
assigned by the function f to the element a of A. If f is a function from A to B, we write
f : A → B.

DEF2If f is a function from A to B, we say that A is the domain of f and B is the


codomain of f.
If f (a) = b, we say that b is the image of a and a is a preimage of b. The range, or
image,
of f is the set of all images of elements of A. Also, if f is a function from A to B, we say
that f maps A to B.

EXAMPLE Let f be the function that assigns the last two bits of a bit string of length 2
or greater to that
string. For example, f (11010) = 10. Then, the domain of f is the set of all bit strings of
length
2 or greater, and both the codomain and range are the set {00, 01, 10, 11}. ▲\
EXAMPLE Let f : Z → Z assign the square of an integer to this integer. Then, f (x) = x2,
where the domain
of f is the set of all integers, the codomain of f is the set of all integers, and the range of
f is
the set of all integers that are perfect squares, namely, {0, 1, 4, 9, . . . }.

One-to-One and Onto Functions


Afunction f is said to be one-to-one, or an injunction, if and only if f (a) = f (b) implies
that
a = b for all a and b in the domain of f.A function is said to be injective if it is one-to-one

EXAMPLE Determine whether the function f from {a, b, c, d} to {1, 2, 3, 4, 5} with f


(a) = 4, f (b) = 5,
f (c) = 1, and f (d) = 3 is one-to-one.
Solution: The function f is one-to-one because f takes on different values at the four
elements
of its domain. This is illustrated in Figure 3
EXAMPLE Determine whether the function f (x) = x + 1 from the set of real numbers
to itself is one-toone.
Solution: The function f (x) = x + 1 is a one-to-one function. To demonstrate this, note
that
x + 1 _= y + 1 when x _= y.

Onto Function.
A function f from A to B is called onto, or a surjection, if and only if for every element
b ∈ B there is an element a ∈ A with f (a) = b.A function f is called surjective if it is
onto.

EXAMPLE 12 Let f be the function from {a, b, c, d} to {1, 2, 3} defined by f (a) = 3, f


(b) = 2, f (c) = 1,
and f (d) = 3. Is f an onto function?
Solution: Because all three elements of the codomain are images of elements in the
domain, we
see that f is onto. This is illustrated in Figure 4. Note that if the codomain were {1, 2, 3,
4},
then f would not be onto.
Suppose that f : A → B.
To show that f is injective Show that if f (x) = f (y) for arbitrary x, y ∈ A with x _= y,
then x = y.
To show that f is not injective Find particular elements x, y ∈ A such that x _= y and
f (x) = f (y).
To show that f is surjective Consider an arbitrary element y ∈ B and find an element x ∈
A
such that f (x) = y.
To show that f is not surjective Find a particular y ∈ B such that f (x) _= y for all x ∈ A.

Inverse Functions
Let f be a one-to-one correspondence from the set A to the set B. The inverse function
of
f is the function that assigns to an element b belonging to B the unique element a in A
such that f (a) = b. The inverse function of f is denoted by f
−1. Hence, f
−1(b) = a when
f (a) = b.

EXAMPLE Let f be the function from {a, b, c} to {1, 2, 3} such that f (a) = 2, f (b) = 3,
and f (c) = 1.
Is f invertible, and if it is, what is its inverse?
Solution: The function f is invertible because it is a one-to-one correspondence. The
inverse
function f
−1 reverses the correspondence given by f , so f
−1(1) = c, f
−1(2) = a, and
f
−1(3) = b.

Compositions of Functions
Let g be a function from the set A to the set B and let f be a function from the set B to
the
set C. The composition of the functions f and g, denoted for all a ∈ A by f ◦ g, is defined
by
(f ◦ g)(a) = f (g(a)).

EXAMPLE Let g be the function from the set {a, b, c} to itself such that g(a) = b, g(b)
= c, and g(c) = a.
Let f be the function from the set {a, b, c} to the set {1, 2, 3} such that f (a) = 3, f (b)
= 2, and
f (c) = 1. What is the composition of f and g, and what is the composition of g and f ?
Solution: The composition f ◦ g is defined by (f ◦ g)(a) = f (g(a)) = f (b) = 2,
(f ◦ g) (b) = f (g(b)) = f (c) = 1, and (f ◦ g)(c) = f (g(c)) = f (a) = 3.
Note that g ◦ f is not defined, because the range of f is not a subset of the domain of
g.▲

EXAMPLE Let f and g be the functions from the set of integers to the set of integers
defined by
f (x) = 2x + 3 and g(x) = 3x + 2. What is the composition of f and g? What is the
composition
of g and f ?
Solution: Both the compositions f ◦ g and g ◦ f are defined. Moreover,
(f ◦ g)(x) = f (g(x)) = f (3x + 2) = 2(3x + 2) + 3 = 6x + 7
and
(g ◦ f )(x) = g(f (x)) = g(2x + 3) = 3(2x + 3) + 2 = 6x + 11.

EXERCISE

QUESTION Let X = {1, 2, 3, 4}. Determine whether each relation on X is a function from X
into X.
(a) f = {(2, 3), (1, 4), (2, 1), (3.2), (4, 4)}
(b) g = {(3, 1), (4, 2), (1, 1)}
(c) h = {(2, 1), (3, 4), (1, 4), (2, 1), (4, 4)}

ANSWER:
Recall that a subset f of X×X is a function f: X → X if and only if each a ∈ X appears as the first
coordinate
in exactly one ordered pair in f.
(a) No. Two different ordered pairs (2, 3) and (2, 1) in f have the same number 2 as their first
coordinate.
(b) No. The element 2 ∈ X does not appear as the first coordinate in any ordered pair in g.
(c) Yes. Although 2 ∈ X appears as the first coordinate in two ordered pairs in h, these two ordered
pairs are equal.

QUESTION Let A = {a, b, c},B = {x, y, z},C = {r, s, t}. Let f: A → B and g: B → C be defined
by:
f = {(a, y)(b, x), (c, y)} and g = {(x, s), (y, t ), (z, r)}.
Find: (a) composition function g◦f: A → C; (b) Im(f ), Im(g), Im(g◦f ).

ANSWER:
(a) Use the definition of the composition function to compute:
(g◦f )(a) = g(f (a)) = g(y) = t
(g◦f )(b) = g(f (b)) = g(x) = s
(g◦f )(c) = g(f (c)) = g(y) = t
That is g◦f = {(a, t ), (b, s), (c, t)}.

(b) Find the image points (or second coordinates):


Im(f ) = {x, y}, Im(g) = {r, s, t}, Im(g◦f ) = {s, t}

QUESTION Let f : R → R and g: R → R be defined by f (x) = 2x + 1 and g(x) = x2 − 2. Find


the formula for the composition function g◦f .

ANSWER:
Compute g◦f as follows:
(g◦f )(x) = g(f (x)) = g(2x + 1) = (2x + 1)2 − 2 = 4x2 + 4x − 1.
Observe that the same answer can be found by writing
y = f (x) = 2x + 1 and z = g(y) = y2 − 2
and then eliminating y from both equations:
z = y2 − 2 = (2x + 1)2 − 2 = 4x2 + 4x – 1

QUESTION. Let the functions f: A → B, g: B → C, h: C → D be defined by Fig. 3-9. Determine


if each function is:
(a) onto, (b) one-to-one, (c) invertible.
Fig. 3

ANSWER:
(a) The function f: A → B is not onto since 3 ∈ B is not the image of any element in A.
The function g: B → C is not onto since z ∈ C is not the image of any element in B.
The function h: C → D is onto since each element in D is the image of some element of C.

(b) The function f: A → B is not one-to-one since a and c have the same image 2.
The function g: B → C is one-to-one since 1, 2 and 3 have distinct images.
The function h: C → D is not one-to-one since x and z have the same image 4.

(c) No function is one-to-one and onto; hence no function is invertible.

QUESTION Consider permutations and in


S6 .Find composition and

ANSWER:
Note that σ sends 1 into 3 and τ sends 3 into 6. So the composition τ◦σ sends 1 into 6. I.e. (τ◦σ)(1) =
6. Moreover,
τ◦σ sends 2 into 6 into 1 that is, (τ◦σ)(2) = 1, Similarly,
(τ◦σ)(3) = 5, (τ ◦σ)(4) = 3, (τ ◦σ) = 2, (τ ◦σ)(6) = 4
Thus

b) Look for 1 in the second row of σ. Note σ sends 5 into 1. Hence σ−1(1) = 5. Look for 2 in the second
row of σ.
Note σ sends 6 into 2. Hence σ−1(2) = 6. Similarly, σ−1(3) = 1, σ−1(4) = 3, σ−1(5) = 4, σ−1(6) = 2.
Thus

QUESTION Consider functions f: A → B and g: B → C. Prove the following:


(a) If f and g are one-to-one, then the composition function g◦f is one-to-one.
(b) If f and g are onto functions, then g◦f is an onto function.

ANSWER:
(a) Suppose (g◦f )(x) = (g◦f )(y); then g(f (x)) = g(f (y)). Hence f (x) = f (y) because g is one-to-one.
Furthermore,
x = y since f is one-to-one. Accordingly g◦f is one-to-one.

(b) Let c be any arbitrary element of C. Since g is onto, there exists a b ∈ B such that g(b) = c. Since f
is onto, there
exists an a ∈ A such that f (a) = b. But then

(g◦f )(a) = g(f (a)) = g(b) = c

Hence each c ∈ C is the image of some element a ∈ A. Accordingly, g◦f is an onto function.

QUESTION Let f: R → R be defined by f (x) = 2x −3. Now f is one-to-one and onto; hence f
has an inverse function
f−1. Find a formula for f−1.

QUESTION
Let y be the image of x under the function f :
y = f (x) = 2x − 3
Consequently, x will be the image of y under the inverse function f−1. Solve for x in terms of y in the
above equation:
x = (y + 3)/2
Then f−1(y) = (y + 3)/2. Replace y by x to obtain
f−1(x) = (x + 3)/2
which is the formula for f−1 using the usual independent variable x.

You might also like