Properties of Functions

In the last section, we talked about certain kinds of functions that have properties not had by other functions. Surjective functions have properties not shared with injective functions, and vice-versa. In this section, we swing back to talking about properties that all functions have, though the last property we talk about is a bit more refined when the underlying function is injective.

Empty Inputs Produce Empty Outputs

One classic analogy mathematicians use to talk about functions is that of a machine. Simply put, a machine is a device that takes in some input, operates on that input, and produces an output. Like machines, a function takes in an input, and based on how the function is defined, produces an output.

The machine analogy provides some useful insight into how functions work. For example, what happens if nothing is put into a machine? We’d expect that with no input, the machine can’t produce anything because if there is no input, then there is nothing for the machine to operate on.

The next theorem formalizes this idea to work with our more rigorous definition of function.

Theorem 6.3.1

Let f:A→B be an arbitrary function.

Then we have that

f(βˆ…)=βˆ…

General Strategy: We’ll use a proof by contradiction to show that if there is an image in f(βˆ…), then the empty set would be non-empty!

Presume - for the purpose of showing a contradiction - that y∈B such that y∈f(βˆ…).

y∈f(βˆ…)ReasonβŸΊβˆƒx [xβˆˆβˆ… βˆ§ y=f(x)]Definition of ImageβŸΉβˆƒx [xβˆˆβˆ…]Rule of Conjunctive Simplification⇒⇐|βˆ…|=0Definition of Empty Set

Because the presupposition that βˆƒy∈f(βˆ…) yields a contradiction, we must then have that

βˆƒy∈f(βˆ…)

which is the same thing as saying

f(βˆ…)=βˆ…

as desired.


We’ll use this theorem in some of the upcoming examples.

A Union of Subsets

Consider an arbitrary function f:Aβ†’B, along with two subsets of the domain A1,A2βŠ†A. Since A1 and A2 are subsets of the domain of f, we can consider their respective image sets f(A1) and f(A2).

Suppose that we first take the union A1βˆͺA2, and then form the image set f(A1βˆͺA2). Is that the same thing as taking the union of the two image sets f(A1)βˆͺf(A2)?

Theorem 6.3.2

Let f:Aβ†’B be an arbitrary function, with A1βŠ†A and A2βŠ†A.

Then we have that

f(A1βˆͺA2)=f(A1) βˆͺ f(A2)

General Strategy: Here, we really just need to appeal to the definitions for image, and union. We’ll use those definitions, as well as some logical equivalencies involving the Existential Quantifier, inside an element argument.

Suppose we pick an arbitrary element y from the image set f(A1βˆͺA2):

y∈f(A1βˆͺA2)ReasonβŸΊβˆƒx∈(A1βˆͺA2) [y=f(x)]Definition of ImageβŸΊβˆƒx [(x∈A1βˆͺA2)∧(y=f(x))]βˆƒx∈U [p(x)]β‡”βˆƒx [x∈U∧p(x)]βŸΊβˆƒx [(x∈A1∨x∈A2)∧(y=f(x))]Definition of UnionβŸΊβˆƒx [(x∈A1∧y=f(x))∨(x∈A2∧y=f(x))]Distribution of βˆ§ over βˆ¨βŸΊ(βˆƒx [x∈A1∧y=f(x)])∨(βˆƒx [x∈A2∧y=f(x)])Distribution of βˆƒ over βˆ¨βŸΊ(βˆƒx∈A1 [y=f(x)])∨(βˆƒx∈A2 [y=f(x)])βˆƒx∈U [p(x)]β‡”βˆƒx [x∈U∧p(x)]⟺(y∈f(A1))∨(y∈f(A2))Definition of Image⟺y∈f(A1)βˆͺf(A2)Definition of Union

Since we’ve just shown that

y∈f(A1βˆͺA2)⟺y∈f(A1) βˆͺ f(A2)

we also have that

f(A1βˆͺA2)=f(A1) βˆͺ f(A2)

as desired.


Let’s look at a couple of examples of this theorem in action.

Example 6.3.1

For the sets A={1,2,3,4,5} and B={a,b,c,d,e}, consider the function f1:A→B where f(1)=bf(2)=bf(3)=bf(4)=ef(5)=e depicted below as an arrow diagram:

An arrow diagram for $f_1: A \rightarrow B$

Figure 6.3.1

Suppose we let A1={1,2,3}A2={3,4,5} We have that A1,A2βŠ†A. Let's verify that f(A1βˆͺA2)=f(A1)βˆͺf(A2).   First, we calculate f(A1βˆͺA2). We start by calculating A1βˆͺA2: A1βˆͺA2={1,2,3}βˆͺ{3,4,5}={1,2,3,4,5} Now, we can calculate f(A1βˆͺA2): f(A1βˆͺA2)=f({1,2,3,4,5})={b,e} Second, we calculate f(A1) βˆͺ f(A2): f(A1) βˆͺ f(A2)=f({1,2,3})βˆͺf({3,4,5})={b}βˆͺ{b,e}={b,e} Thus, we have that f(A1βˆͺA2)=f(A1)βˆͺf(A2)={b,e} as asserted by Theorem 6.3.1.
Example 6.3.2

Consider the function f2:{1,2,3,4,5}β†’{a,b,c,d,e} where

f2(1)=af2(2)=bf2(3)=df2(4)=cf2(5)=b

Suppose we wanted to calculate f2({1,3}) βˆͺ f2({4}). We know that {1,3}βŠ†Dom(f2) and {4}βŠ†Dom(f2). Thus, we can use Theorem 6.3.1 to simplify our work a little bit:

f2({1,3}) βˆͺ f2({4})=f2({1,3}βˆͺ{4})=f2({1,3,4})={a,c,d}

An Intersection of Subsets

We may expect we have a similar result when considering the intersection A1∩A2, but there is a slight hiccup.

Theorem 6.3.3

Let f:Aβ†’B be an arbitrary function with A1,A2βŠ†A.

Then we have that

f(A1∩A2)βŠ†f(A1) βˆ© f(A2)

General Strategy: Here, we’ll use another element argument similar to the one used in Proof 6.3.1. Of course, we’ll appeal to the definition of intersection instead of union.

Let y be an arbitrarily picked element in f(A1∩A2).

y∈f(A1∩A2)ReasonβŸΊβˆƒx∈(A1∩A2) [y=f(x)]Definition of ImageβŸΊβˆƒx [(x∈(A1∩A2))∧(y=f(x))]βˆƒx∈U [p(x)]β‡”βˆƒx [x∈U∧p(x)]βŸΊβˆƒx [(x∈A1)∧(x∈A2)∧(y=f(x))]Definition of IntersectionβŸΊβˆƒx [(x∈A1)∧(x∈A2)∧(y=f(x))∧(y=f(x))]Idempotent Law of βˆ§βŸΊβˆƒx [(x∈A1)∧(y=f(x))∧(x∈A2)∧(y=f(x))]Commutative Law of βˆ§βŸΉβˆƒx [(x∈A1)∧(y=f(x))]βˆ§βˆƒx [(x∈A2)∧(y=f(x))]One-sided Distribution of βˆƒ over βˆ§βŸΊβˆƒx∈A1 [y=f(x)]βˆ§βˆƒx∈A2 [y=f(x)]βˆƒx∈U [p(x)]β‡”βˆƒx [x∈U∧p(x)]⟺[y∈f(A1)]∧[y∈f(A2)]Definition of Image⟺y∈A1∩A2Definition of Intersection

Note the use of the single-sided logical implication ⟹ instead of the double-sided logical equivalence ⟺ in the seventh row of the above sequence of steps. Because that single step required a logical implication, and not a logical equivalency, what we’ve shown is that

y∈f(A1∩A2)⟹y∈A1∩A2

which means we’ve shown that

f(A1∩A2)βŠ†f(A1)∩f(A2)

as desired.


Proof 6.3.2 required a logical implication because of the way the Existential Quantifier distributes over the conjunction operator ∧. This is why Theorem 6.3.2 uses subset βŠ† instead of equality =.

The logic used was abstract, but we can look at some concrete examples to drive the point home.

Example 6.3.3

Consider the function g1:{1,2,3,4,5}β†’{a,b,c,d,e} depicted below:

A case where the intersection results in a proper subset.

Figure 6.3.2

Let's consider the subsets A1={1,2} and A2={3,4,5}. We see that A1∩A2=βˆ…; as such, g1(A1∩A2)=g1(βˆ…)=βˆ… Now we compute g1(A1)∩g1(A2): g1(A1)∩g1(A2)={b,c}∩{c,d,e}={c} In this case, since g1(A1∩A2)=βˆ… and g1(A1)∩g1(A2)={c}, we have a proper subset relationship: g1(A1∩A2)βŠ‚g1(A1) βˆ© g1(A2)
Example 6.3.4

Consider the function g2:{1,2,3,4,5}β†’{a,b,c,d,e} shown below:

A case where the intersection yields set equality.

Figure 6.3.3

Letting A1={1,2} and A2={4,5}, we get the following: g2(A1∩A2)=g2(βˆ…)=βˆ… ={a}∩{d,e}=g2(A1) βˆ© g2(A2) Here, we have set equality: g2(A1∩A2)=g2(A1) βˆ© g2(A2).

The previous examples relied on splitting up a function’s domain into disjoint subsets. This is an easy way to demonstrate the validity of Theorem 6.3.2 because the mpty set is a subset of every set. Because the empty set was present in both of the previous examples, we were also able to use Theorem 6.3.1 in our calculations as well.

The next few examples will not split up the function’s domain into disjoint subsets.

Example 6.3.5

Consider the function g3:{1,2,3,4,5}β†’{a,b,c,d,e} pictured below:

Another demonstration of Theorem 6.3.2.

Figure 6.3.4

Using this function, we see that g3({1,2,3}∩{3,4,5})=g3({3})={e}βŠ‚{c,e}={a,c,e}∩{c,d,e}=g3({1,2,3}) βˆ© g3({3,4,5}) So here, we have a proper subset: g3({1,2,3}∩{3,4,5})βŠ‚g3({1,2,3}) βˆ© g3({3,4,5}).
Example 6.3.6

Consider the function g4:{1,2,3,4,5}β†’{a,b,c,d,e,f} depicted below:

This function is injective.

Figure 6.3.5

We consider the subsets {1,2,3} and {3,4,5} of the domain again, and proceed as usual: g4({1,2,3}∩{3,4,5})=g4({3})={b}={a,b,c}∩{b,d,e}=g4({1,2,3})∩g4(3,4,5) This time, we have set equality: g4({1,2,3}∩{3,4,5})=g4({1,2,3})∩g4(3,4,5).

Examples 6.3.3 and 6.3.4 showed functions that were neither injective nor surjective. Even though both domains were split up into disjoint sets, Example 6.3.3 yielded a proper subset while Example 6.3.4 yielded two equal sets. This means that splitting up the domain of a function f into disjoint subsets is not enough to guarantee that f(A1∩A2)=f(A1)∩f(A2).

The function in Example 6.3.5 was also neither injective nor surjective, and its domain was split up into two subsets that shared an element. Still, we got that g3(A1∩A2)βŠ‚g3(A1) βˆ© g3(A2).

Now consider the function in Example 6.3.6. That function was injective, but not surjective, and when we split up the domain, we did get equal subsets g4(A1∩A2)=g4(A1) βˆ© g4(A2).

Subsets of an Injective Function’s Domain

For two sets A,B, the set A∩B depends on what elements are shared between A and B. As such, it stands to reason that in order to guarantee that f(A1∩A2)=f(A1)∩f(A2), we need to focus on what elements are shared between image sets. This is addressed by determining if a function is injective.

As was shown in Example 6.3.6, f:Aβ†’B being injective may be enough to guarantee that f(A1∩A2)=f(A1)∩f(A2).

However, Example 6.3.4 shows that just because f(A1∩A2)=f(A1)∩f(A2), that does not tell us if f:Aβ†’B is injective.

This pair of observations yields the following theorem:

Theorem 6.3.4

Let f:Aβ†’B be an injective, but otherwise arbitrary, function with A1,A2βŠ†A.

Then we have that

f(A1∩A2)=f(A1)∩f(A2)

General Strategy: We’ll proceed in the same way as we did in Proof 6.3.2. This time, we’ll use the fact that f is injective instead of the one-sided distribution of the Existential Quantifier. This will let us use logical equivalence instead of logical implication.

Let y be an arbitrarily picked element in f(A1) βˆ© f(A2).

y∈f(A1) βˆ© f(A2)Reason⟺[y∈f(A1)] βˆ§ [y∈f(A2)]Definition of IntersectionβŸΊβˆƒx1,x2 [x1∈A1 βˆ§ y=f(x1) βˆ§ x2∈A2 βˆ§ y=f(x2)]Definition of ImageβŸΊβˆƒx1 [x1∈A1 βˆ§ y=f(x1) βˆ§ x1∈A2 βˆ§ y=f(x1)]x1=x2 since f(x1)=f(x2) and f is InjectiveβŸΊβˆƒx1 [x1∈A1 βˆ§ x1∈A2 βˆ§ y=f(x1) βˆ§ y=f(x1)]Commutative Law of βˆ§βŸΊβˆƒx1 [x1∈A1 βˆ§ x1∈A2 βˆ§ y=f(x1) ]Idempotent Law of βˆ§βŸΊβˆƒx1 [x1∈A1∩A2 βˆ§ y=f(x1) ]Definition of Intersection⟺y∈f(A1∩A2)Definition of Image

We’ve just shown that

y∈f(A1∩A2)⟺y∈A1∩A2

which means we’ve shown that

f(A1∩A2)=f(A1)∩f(A2)

as desired.


Theorem 6.3.4 is useful for calculating certain sets that come from intersections of image sets because we have equality. With Theorem 6.3.3, we don’t have equality, but a sort of β€œupper bound” on what the result could be because without an injective function, all we have is a subset relationship.

Example 6.3.7

Consider the function h:{1,2,3,4,5}β†’{a,b,c,d,e,f} depicted below:

Another injective, but not surjective, function.

Figure 6.3.6

Suppose we wanted to calculate h({1,4,5}) βˆ© h({2,3,5}). We see that {1,4,5}βŠ†Dom(h) and {2,3,5}βŠ†Dom(h), and that h is injective. This means we can apply Theorem 6.3.3 to simplify our calculation: h({1,4,5}) βˆ© h({2,3,5})=h({1,4,5}∩{2,3,5})=h({5})={c}