Functions: image and inverse image

Logic
Functions: Image, inverse image
November 2014
Let f be a function, dom f ⊂ X, rng f ⊂ Y . For A ⊂ X we define the image of A under f to be
f (A) : = {y ∈ Y : ∃(x ∈ A ∩ dom f ) f (x) = y} =
= {f (x) : x ∈ A ∩ dom f } =
[
=
{f (x)}.
x∈A∩dom f
For B ⊂ Y we define the inverse image (preimage, counterimage) of B under f to be
f ← (B) := {x ∈ dom f : f (x) ∈ B} .
Note that we always have f (A) ⊂ rng f and f ← (B) ⊂ dom f .
Let D ⊂ dom f . The restriction of f to D is
f|D := {(x, f (x)) : x ∈ D}
or equivalently
f|D := f ◦ idD .
Note that dom f|D = D ∩ dom f and rng f|D = f (D).
If dom f ⊂ dom g and g|dom f = f , we say that g is an extension of f .
Example. If f = id[0,∞) , then both x 7→ |x| and idR are extensions of f .
Let A ⊂ X. The characteristic function of A is
χA : x 7→

1,
0,
when x ∈ A,
otherwise, i.e. when x ∈
/ A.
Exercise 0.
1. What are f (dom f ) and f ← (rng f ), f|dom f , f|∅ ?
2. Rewrite χA∩B , χA∪B , χX\A , χA\B and χA M B using χA and χB .
3. Extend x 7→
1
x
to R.
4. Sketch the characteristic functions of R, ∅, {0, 1}, (0, ∞), [−1, 1],
S
h
n∈N
1
2n+1
,
1
2n
i
S
n∈Z [2n, 2n+1],
.
5. Rewrite using characteristic functions:



1,
when x > 0,
sgn x := 0,
when x = 0,


−1, when x < 0.

sin x,
f (x) = 
0,
when sin x > 0,
otherwise.
6. Rewrite using the “piecewise” notation with curly brackets and then sketch
(a) χ(0,1) + 1,
(c) χ(0,2π) · cos,
(b) 2χ(1,2) − 1,
(d) f (x) = χZ (x) · x2 .
7. How are f ← (f (A)) and A related in genral? How about f (f ← (B)) and B?
1
S
n∈N
1
,1
n+1 n
,
Exercise 1. For each of the following, establish the images of sets A–E and inverse images
of K–N under the given functions.
1.
• sin,
cos,
• A = [2π, 3π], B = [0, π/2], C = [−π/2, π/2], D = [0, π/4) ∪ [π, 3π/2] ∪ [9π/4, 5π/2],
E = {0}
• K = [0, 1], L = {1}, M = {−1, 0, 1, 2}, N = [1, ∞).
2.
• f (x) = x2 ,
g(x) = x3 ,
h(x) = |x|,
• A = [0, 1], B = (0, 1], C = [−1, 0), D = (−2, 1), E = {1},
• K = (0, ∞), L = [0, 2], M = {−2}, N = [−1, 0].
3.
• f (x) ≡ 1,
sgn,
χ[1,3] ,
• A = [1, 2], B = (0, ∞), C = [0, ∞), D = (−2, 2), E = {0},
• K = {1}, L = {0}, M = (0, 1), N = [0, 1/2].
4.
• f (x) = x1 ,
g(x) = 1 +
1
,
x−1
• A = {0}, B = [0, 1], C = [1, ∞), D = [−2, 1], E = [−1, 1],
• K = {0}, L = [0, 1], M = [1, ∞), N = [−2, 2].
5.
• ln,
|ln|,
f (x) = ln |x|,
• A = (−∞, 0], B = (0, 1), C = (e−1 , e), D = (e−2 , e), E = (1, ∞),
• K = (−∞, 0], L = (0, 1), M = (−∞, 0), N = {2}.
6.
• g(x) = ex ,
• A = (0, 1), B = (−∞, 0), C = {2}, D = (ln 2, ln 3), E =
5
S
n∈N {ln n},
5
• K = [−2, −1], L = [−1, 1], M = {5, e }, N = (5, e ).
Exercise 2. In each case determine f|A
f|B (A).
←
(C), f|B
←
(C), f|A
←
1. f (x) = x2 ,
A = [0, 1], B = [1, 2], C = [1, 2], D = [−1, 0].
2. f (x) = x1 ,
A = (0, 2), B = (1, 2), C = (−1, 0), D = (0, 2).
3. f (x) = sin x,
(D), f|B
h
←
(D), f|A (B),
i
A = (0, ∞), B = − π2 , π2 , C = [0, 1], D = − 21 , 21 .
Exercise 3. For each of the following determine the image of A and the inverse image of B
under f ◦ g.
1. f (y) = y1 , g(x) = x + 2, A = B = (0, 1).
2. f (y) = ln y, g(x) = sin x, x ∈ (0, π), A = 0, π2 , B = {0}.
3. f (y) = sgn y, g(x) = sin(πx), A = B =
1 3
,
2 2
2
.
Examples of solutions
Ex. 1.1.A, sin.
sin(A) = [0, 1].
y
1
sin(A)
− π2
−π
Ex. 1.1.B, sin.
π
2
π
3π
2
2π
3π
x
π
2
π
3π
2
2π
3π
x
3π
2
2π sin−1 (K) 3π
x
3π
2
2π
x
A
sin(B) = [0, 1].
y
1
sin(B)
− π2
−π
Ex. 1.1.K, sin.
B
sin−1 (K) =
S
k∈Z [2kπ, (2k
+ 1)π].
y
1
−π
K
sin−1 (K) π
sin−1 (K)
Ex. 1.1.N, cos.
cos−1 (N ) =
S
k∈Z {2kπ}.
y
N
1
−π
π
3
3π
Ex. 1.2.C, x 7→ f (x) := x2 .
f (C) = [0, 1].
y
f (C)
x
C
Ex. 1.2.D, x 7→ f (x) := x2 .
We have f (−2) = 4, f (1) = 1 and f (D) = [0, 4), since f (0) = 0.
y
(−2, 4)
4
f (D)
−2
Ex. 1.2.L, x 7→ f (x) := x2 .
x
1
D
h √ √ i
f −1 (L) = − 2, 2 .
y
√ − 2, 2
2
√
2, 2
L
√
− 2
f −1 (L)
4
√
2
x
Ex. 1.4.D, x 7→ g(x) := 1 +
1
.
x−1
y
−2, 23
2
3
1
−2
x
D
g(D)
Ex. 1.4.N, x 7→ g(x) := 1 +
We have g
2
3
i
We have g(−2) = 23 , so g(D) = −∞, 23 .
1
.
x−1
i
= −2 and g(2) = 2, so g −1 (N ) = −∞, 23 ∪ [2, ∞).
y
(2, 2)
2
N
2
3
g −1 (N )
2
N
−2
5
g −1 (N )
x
Ex. 1.5.D, |ln|.
We have |ln e−2 | = 2, |ln e| = 1, and thus f (D) = [0, 2). This one is
left-closed, since |ln 1| = 0.
y
2
(e−2 , 2)
(e, 1)
f (D)
e−2
e
D
x
Ex. 1.5.L, |ln|.
We have |ln e−1 | = 1, |ln e| = 1, and thus f −1 (L) = (e−1 , 1) ∪ (1, e). Number 1
is out, since |ln x| = 0 ∈
/ L implies that x = 1.
y
1
(e−1 , 1)
(e, 1)
L
e−1
1 f −1 (L)
6
e
x