Exercise 1) Let be the function defined as and let be the function defined as . Write down (or say out loud, or figure out in your head) the value of for each element in . In other words, calculate for all .
Solution: All we have to do here is “trace through” the various definitions of the functions. Namely, for figuring out what is for some , we simply need to follow the element through the two functions. So here we go. Let’s start with . We have , and so . Simple as that!
Similarly, we have and again we have so we have . Next, we have and so . Finally we have and so . To recap, then, we have that the composition of and is defined by
And we’re done!
Exercise 2) Recall that is the set of integers: . Let denote the set of even integers: . Let denote the set of multiples of 3: . Let be the function that takes each integer to 4 times that integer, so that and for example (note that is most certainly not surjective). Now let be the function that sends each element in to 3 times itself, so that and for example . Let be the composition of and . Calculate
Solution: Again, for each of the three things that we need to calculate, we just need to “follow through” the definitions of the functions. So, for i), we have that since sends each integer to 4 times itself. Then since sends each element in its domain to 3 times itself. Thus . However, we notice that we can do this much faster. For let’s choose some arbitrary integer . Then by definition of . Additionally, by definition of , . So effectively what we’re doing by first applying and then applying is just multiplying the input integer by 12. Thus, calculating the three cases that we’re asked to is easy. Namely,
And we’re done!