Lesson 32 Solutions

Exercise 1) Prove that if f:A\rightarrow B and g:C\rightarrow D are both functions, then f\times g, as defined in this lesson, is also a function.

Solution: This is a very important problem, as it illustrates how one deals with the mathematical structures that we define.  Namely, when we say things like “we’re going to take two functions and make a third one,” we actually need to check that the thing we’ve defined actually satisfies the requirements of being a function—we can’t just willy nilly refer to things as being certain mathematical objects without checking that this is the case.

We begin by recalling what a function is.  A general function needs to go from one set and to another set.  As is hopefully familiar by now, we call the former the domain of the function and the latter the codomain of the function.  Additionally, a function must assign to each element in the domain precisely one element in the codomain.  Remember, these are very particular requirements: we can’t leave out any elements from the domain and we also can’t map any elements in the domain to more than one element in the codomain.  These are the requirements that we need to check here.

In this problem we’re assuming that we already have two functions f: A\rightarrow B and g:C\rightarrow D.  This means that f and g both satisfy the above requirements. In other words, even though we know nothing about f and g in detail, i.e. we know nothing about their domains or codomains or really anything at all about them, we are assuming that they exist and that they satisfy the function requirements.  In this way we prove our statement in complete generality, so that if we’re ever handed two genuine explicit functions between sets that we do know the details of, then we can immediately know that we can form a new function from them in the way described in this lesson and that this construction is well-defined.

Okay let’s actually do this.  Suppose f:A\rightarrow B and g:C\rightarrow D are functions.  We now define the function f\times g:A\times C\rightarrow B\times D by sending each element (a,c)\in A\times C to the element (f(a),g(c))\in B\times D.  We first note that our new function has a domain and a codomain, as it must.  The domain is A\times C and the codomain is B\times D.  We also note that our new function does indeed send elements from its domain to its codomain in a well-defined way, since we know that f(a)\in B and g(c)\in D, and therefore (f(a),g(c))\in B\times D.  Now we must show that this rule for sending elements from the domain to the codomain satisfy the requirements of a function.

Let us first show that every element in A\times C gets sent somewhere (i.e., we don’t leave out any elements from the domain).  To see this, let us pick any element from A\times C arbitrarily, and let us call this element (a',c').  Then, since f is a function, we have that f(a') is a well-defined element in B.  Similarly, since g is a function, we know that g(c') is a well-defined element in D.  Therefore (f(a'),g(c')) is an element in B\times D.  Note that had f or g (or both) not been genuine functions, then it would be possible that, for example, one of them sent “forgot” to send a particular element in its domain to its codomain and therefore we would not have known for sure that (f(a'),g(c')) is an element in B\times D.  We therefore really are relying on the fact that our original functions are indeed functions.

Now that we’ve shown that each element in A\times C goes somewhere in B\times D, we need to show that each element (a,c)\in A\times C gets sent to only one element in B\times D.  But this is just as straightforward.  Namely, if some element (a',c')\in A\times C goes to more than one element in B\times D, then either f(a') is more than one element in B or g(c') is more than one element in D (or both), and both of these possibilities are in fact impossible because we know (by assumption) that both f and g are genuine functions.

That completes the proof.  I very strongly encourage the reader to understand not only the various statements of the proof, but also the reason for why we even needed to prove this statement in the first place.  It’s a trivial proof in the sense that the result that we prove may seem “obvious”, but often these are the statements that are most important to rigorously prove.  Moreover, deeply understanding the method and motivation for this proof is great practice for later methods and motivations.

Exercise 2) Explicitly write where the remaining five elements (i.e., those that are not (1, Kobe)) in A\times C go under the action of f\times g in the example discussed at the end of this lesson.

Solution: For this problem we simply must look back at the lesson and run through all of the definitions.  Namely, we have that f(1)=a, f(2)=a, f(3)=b, g(Kobe)=basketball, g(LeBron)=dinosaur.  We therefore see that the element (1, LeBron) in A\times C gets sent to (a, dinosaur) in B\times D.  Similarly we have that f\times g((2,Kobe))=(a, basketball), f\times g((2, LeBron))=(a, dinosaur), f\times g((3,Kobe))=(b, basketball), and f\times g((3, LeBron))=(b, dinosaur).

Exercise 3)  Define four sets A, B, C, and D of your choosing, and define two functions f:A\rightarrow B and g:C\rightarrow D, also of your choosing (but make sure they’re well-defined!).  As explicitly as possible*, write out the action of f\times g, i.e., write out where each element in the domain of f\times g goes in the codomain.

Solution: There are obviously infinitely many ways to complete this problem, and I’ll only do one of them here.  Let me define the set A to be the set of all integers \{..., -3, -2, -1, 0, 1, 2, 3, ...\}, let me define the set B to be the set \{dog, cat\}, let me define the set C to also be the set of integers (so it’s equal to the set A), and let me define the set D to be the set \{Lakers, Clippers\}.  Let me define the function f:A\rightarrow B to be the function that sends the integer a to dog if a is an even integer (i.e., if a=2n for some integer n, meaning that “a is two times some number”, which is clearly the same as being even), and to cat if a is an odd integer (i.e., if a=2n+1 for some integer n (i.e., if a is exactly “one away” from an even number, which is clearly the same as being odd).  I encourage the reader to convince him/herself that this indeed defines a genuine function.  Let me then also define the function g:C\rightarrow D to send the integer a to Lakers if a is even and to Clippers if a is odd.

To see what the function f\times g:A\times C\rightarrow B\times D does, we first note that A\times C is just the set of integers “times itself”, so that it is the set of “pairs of integers”.  Namely, each element in A\times C can be written (a,c) where both a and c are arbitrary integers.  There are then four cases: either both a and c are even, in which case f\times g((a,c))=(dog, Lakers), or a is even but c is odd, in which case f\times g((a,c))=(dog, Clippers), or a is odd and c is even, in which case f\times g((a,c))=(cat, Lakers), and finally there is the possibility that a and c are both odd, in which case f\times g((a,c))=(cat, Clippers).  Thus, for example, f\times g((37,-48))=(cat, Lakers), while (-1375,567238421)=(cat, Clippers).

Awesome! One more solution set down, let’s keep on truckin’!

Back to Lesson 32

On to Lesson 33


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s