2.3 Functions

Ex: 1-23

  • Function f:ABf: A\to B - an assiagnment of exactly one element of BB to each element of AA.
  • Domain and codomain, image and preimage, range
  • One-to-one function

    ab(f(a)=f(b)a=b)\forall a \forall b (f(a)=f(b) \to a=b) or equivalently ab(abf(a)f(b))\forall a \forall b (a\ne b \to f(a) \ne f(b))

  • Image of set f(s)={tsS,f(s)=t}f(s) = \{t \mid \exists s \in S, f(s) = t\}
  • Inverse function

    1. If ff is a function f:ABf: A\to B and is one to one, then f1f^{-1} exists.
    2. f1(b)=af^{-1}(b) = a when f(a)=bf(a) = b

  • Inverse image (hw 42, 44)
  • Composite Function

Homework

p175: 40, 42, 44

40. Let ff be a function from the set AA to the set BB. Let SS and TT be subsets of AA. Show that
a. f(ST)=f(S)f(T)f(S \cup T) = f(S) \cup f(T).

Solution

we need to prove (1) f(ST)f(S)f(T)f(S \cup T) \subseteq f(S) \cup f(T) and (2) f(S)f(T)f(ST)f(S) \cup f(T) \subseteq f(S \cup T).
a1. Prove f(ST)f(S)f(T)f(S \cup T) \subseteq f(S) \cup f(T)
Let bf(ST)b \in f(S \cup T), it follows that (aST)f(a)=b\exists (a \in S \cup T)f(a) = b

aSTaSaT(Or){aSf(a)f(S)aTf(a)f(T)f(a)f(S)f(T)bf(S)f(T)\begin{gathered} a \in S \cup T \To a \in S \lor a \in T\\ \To \text{(Or)} \begin{cases} a \in S \To f(a) \in f(S) \\ a \in T \To f(a) \in f(T) \end{cases} \To f(a) \in f(S) \cup f(T) \To b \in f(S) \cup f(T) \end{gathered}

Therefore a1 is proved.
a2. Prove f(S)f(T)f(ST)f(S) \cup f(T) \subseteq f(S \cup T)
Let bf(S)f(T)b \in f(S) \cup f(T), it follows that bf(S)bf(T)b \in f(S) \lor b \in f(T)

case 1: bf(S)(a1S)f(a1)=ba1Sa1STf(a1)f(ST)bf(ST)case 2: bf(T)(a2T)f(a2)=ba2Ta2STf(a2)f(ST)bf(ST)\begin{aligned} \text{case 1: } & b \in f(S) \To \exists (a_1 \in S)f(a_1) = b \\ & a_1 \in S \To a_1 \in S \cup T \\ &\To f(a_1) \in f(S \cup T) \\ &\To b \in f(S \cup T)\\ \text{case 2: } & b \in f(T) \To \exists (a_2 \in T)f(a_2) = b \\ & a_2 \in T \To a_2 \in S \cup T \\ &\To f(a_2) \in f(S \cup T) \\ &\To b \in f(S \cup T) \end{aligned}

In both cases, bf(ST)b \in f(S \cup T). Therefore a2 is proved.
According to (a1) and (a2), a is true.

b. f(ST)f(S)f(T)f(S \cap T) \subseteq f(S) \cap f(T).

Solution

Let bf(ST)b \in f(S \cap T), it follows that (aST)f(a)=b\exists (a \in S \cap T)f(a) = b

aSTaSaT(And){aSf(a)f(S)aTf(a)f(T)f(a)f(S)f(T)bf(S)f(T)\begin{gathered} a \in S \cap T \To a \in S \land a \in T\\ \To \text{(And)}\begin{cases} a \in S \To f(a) \in f(S)\\ a \in T \To f(a) \in f(T) \end{cases} \To f(a) \in f(S) \cap f(T) \To b \in f(S) \cap f(T) \end{gathered}

Therefore b is true.

Let ff be a function from the set AA to the set BB. Let SS be a subset of BB. We define the inverse image of SS to be the subset of AA whose elements are precisely all pre-images of all elements of SS. We denote the inverse image of S by f1(S)f^{-1}(S), so f1(S)={aAf(a)S}f^{-1}(S) = \{a \in A | f (a) \in S\}. (Beware: The notation f1f^{-1} is used in two different ways. Do not confuse the notation introduced here with the notation f1(y)f^{-1}(y) for the value at yy of the inverse of the invertible function ff. Notice also that f1(S)f^{-1}(S), the inverse image of the set SS, makes sense for all functions ff, not just invertible functions.)

42. Let ff be the function from R\mathbb {R} to R\mathbb {R} defined by f(x)=x2f(x) = x^2. Find
a. f1({1})f^{-1}(\{1\})

Solution

f(x)=x2=1x=±1f1({1})={±1}\begin{gathered} f(x) = x^2 =1 \To x=\pm 1 \\ f^{-1}(\{1\}) = \{\pm 1\} \end{gathered}

b. f1({x0<x<1})f^{-1}(\{x | 0 <x< 1\})

Solution

0<f(x)=x2<10<x<1 or 1<x<0f1({x0<x<1})={a(0,1)a(1,0)}\begin{gathered} 0 < f(x)=x^2 <1 \To 0<x<1 \text{ or } -1<x<0 \\ f^{-1}(\{x | 0 <x< 1\}) = \{a \in (0, 1) \lor a \in (-1, 0)\} \end{gathered}

c. f1({xx>4})f^{-1}(\{x | x > 4\})

Solution

f(x)=x2>4x<2 or x>2f1({xx>4})={a(2,)a(,2)}\begin{gathered} f(x)=x^2 >4 \To x<-2 \text{ or } x>2 \\ f^{-1}(\{x | x > 4\}) = \{a \in (2, \infty) \lor a \in (-\infty, 2)\} \end{gathered}

44. Let ff be a function from AA to BB. Let SS and TT be subsets of BB. Show that
a) f1(ST)=f1(S)f1(T)f^{-1}(S \cup T) = f^{-1}(S) \cup f^{-1}(T).

Solution

We need to prove (a1) f1(ST)f1(S)f1(T)f^{-1}(S \cup T) \subseteq f^{-1}(S) \cup f^{-1}(T) and (a2) f1(S)f1(T)f1(ST)f^{-1}(S) \cup f^{-1}(T) \subseteq f^{-1}(S \cup T).
a1. Prove f1(ST)f1(S)f1(T)f^{-1}(S \cup T) \subseteq f^{-1}(S) \cup f^{-1}(T)
Let af1(ST)a \in f^{-1}(S \cup T), it follows that f(a)STf(a) \in S \cup T

(Or){f(a)Saf1(S)f(a)Taf1(T)af1(T)f1(S)\begin{gathered} \text{(Or)} \begin{cases} f(a) \in S \To a \in f^{-1}(S) \\ f(a) \in T \To a \in f^{-1}(T) \\ \end{cases} \To a \in f^{-1}(T) \cup f^{-1}(S) \end{gathered}

Therefore a1 is proved.
a2. Prove f1(S)f1(T)f1(ST)f^{-1}(S) \cup f^{-1}(T) \subseteq f^{-1}(S \cup T)
Let af1(S)f1(T)a \in f^{-1}(S) \cup f^{-1}(T), then af1(S)af1(T)a \in f^{-1}(S) \lor a \in f^{-1}(T)

(Or){af1(S)f(a)Saf1(T)f(a)Tf(a)STaf1(ST)\begin{gathered} \text{(Or)} \begin{cases} a \in f^{-1}(S) \To f(a) \in S\\ a \in f^{-1}(T) \To f(a) \in T \end{cases}\\ \To f(a) \in S \cup T \To a \in f^{-1}(S \cup T) \end{gathered}

Therefore a2 is proved.
According to (a1) and (a2), a is true.

b) f1(ST)=f1(S)f1(T)f^{-1}(S \cap T) = f^{-1}(S) \cap f^{-1}(T).

Solution

We need to prove (b1) f1(ST)f1(S)f1(T)f^{-1}(S \cap T) \subseteq f^{-1}(S) \cap f^{-1}(T) and (b2) f1(S)f1(T)f1(ST)f^{-1}(S) \cap f^{-1}(T) \subseteq f^{-1}(S \cap T).
b1. Prove f1(ST)f1(S)f1(T)f^{-1}(S \cap T) \subseteq f^{-1}(S) \cap f^{-1}(T)
Let af1(ST)a \in f^{-1}(S \cap T), it follows that f(a)STf(a) \in S \cap T

(And){f(a)Saf1(S)f(a)Taf1(T)af1(S)f1(T)\begin{gathered} \text{(And)} \begin{cases} f(a) \in S \To a \in f^{-1}(S)\\ f(a) \in T \To a \in f^{-1}(T) \end{cases}\\ \To a \in f^{-1}(S) \cap f^{-1}(T) \end{gathered}

Therefore b1 is proved.
b2. Prove f1(S)f1(T)f1(ST)f^{-1}(S) \cap f^{-1}(T) \subseteq f^{-1}(S \cap T)
Let af1(S)f1(T)a \in f^{-1}(S) \cap f^{-1}(T), then af1(S)af1(T)a \in f^{-1}(S) \land a \in f^{-1}(T)

(And){af1(S)f(a)Saf1(T)f(a)Tf(a)STaf1(ST)\begin{gathered} \text{(And)} \begin{cases} a \in f^{-1}(S) \To f(a) \in S\\ a \in f^{-1}(T) \To f(a) \in T \end{cases}\\ \To f(a) \in S \cap T \To a \in f^{-1}(S \cap T) \end{gathered}

Therefore b2 is proved.
According to (b1) and (b2), b is true.