<<

Math 101 B-Packet

Scott Rome

Winter 2012-13

1 Redefining functions

This quarter we have defined a as a rule which assigns exactly one output to each input, and so far we have been happy with this definition. Unfortunately, this way of thinking of a function is insufficient as things become more complicated in . For a better understanding of a function, we will first need to define it better.

Definition 1.1. Let X,Y be any sets. A function f : X → Y is a rule which assigns every of X to an element of Y . The sets X and Y are called the domain and of f respectively.

x f(x)

y

Figure 1: This function f : X → Y maps x 7→ f(x). The green circle indicates the range of the function. Notice y is in the codomain, but f does not to it.

Remark 1.2. It is necessary to define the rule, the domain, and the codomain to define a function. Thus far in the , we have been “sloppy” when working with functions.

Remark 1.3. Notice how in the definition, the function is defined by three things: the rule, the domain, and the codomain. That means you can define functions that seem to be the same, but are actually different as we will see. The can be thought of as the of all inputs (that is, everything in the domain will be mapped somewhere by the function). On the other hand, the codomain of a function is the set of all possible outputs, and a function may not necessarily map to every element of the codomain. Notice how the codomain is not the same as what we defined as the . In class, we defined the range of a function to be every point the function maps to. We will explore this in the examples below.

1 Example 1.4. Consider two functions: f : R → R and g : [0, 1] → R defined by f(x) = x and g(x) = x. These two functions are different, because their domains are different, even if f(x) = g(x) when x ∈ [0, 1]. The way to see that is at x = 2, f(2) = 2 but g(2) is undefined.

2 Example 1.5. Let f : R → R by f(x) = x (here X = Y = R.) The codomain of f is R, but the range of f is [0, ∞). The domain is of course, also R. Example 1.6. Let colors be the set of all possible colors. If g : {1, 2, 3} → colors is defined g g g by 1 7→ blue, 2 7→ yellow, and 3 7→ red, the range of g is {red, blue, yellow}. The domain of g is {1, 2, 3} and the codomain is colors.

Now that we have clarified the new definitions, we will introduce more.

Definition 1.7. A function f : X → Y is one-to-one provided each element of the range has exactly one element mapping to it. That is for a, b ∈ X, f(a) = f(b) implies a = b. (Recall a, b ∈ X means a and b are arbitrary elements of X. That means they could be ANY element in the domain.)

Remark 1.8. It may not be immediately obvious why the second part of the definition is a restatement of the first. However it is true that the second statement fully characterizes what it means for exactly one element to map to each element in the range. If this is not clear, sit down and think about it in a quiet place.

Example 1.9. The function defined by Figure 1 is one-to-one.

Example 1.10. The function pictured in Figure 2 is not one to one.

a f(a) = f(b)

b

Figure 2: f(a) = f(b) but a 6= b

Sometimes, one must prove a function is not one-to-one. For that we need to talk about a strategy to prove this.

2 1.11. The function f : R → R defined by f(x) = x is not one-to-one. Proof Strategy 1.12. To prove something is not one-to-one. You have to find two elements of the domain that map to the same thing.

Proof. Consider x = ±1. Then f(1) = f(−1) = 1 but 1 6= −1. Thus two elements map to 1 and so f is not one-to-one.

However, if we change the domain and create a new (similar function), it will be one-to-one:

2 2 Proposition 1.13. The function f : [0, ∞) → R defined by f(x) = x is one-to-one. Proof Strategy 1.14. To prove something is one-to-one. You first assume you have two arbitrary elements in the domain (say x and y). You then look at the equation f(x) = f(y) and try to algebraically manipulate it until you show x = y. Sometimes this can be very tricky.

Proof. This time will be a little trickier. Assume x, y ∈ [0, ∞) (we do not necessarily mean they are the same point!). Then if f(x) = f(y) this implies x2 = y2. Therefore by subtracting y2 from both sides we see

0 = x2 − y2 = (x − y)(x + y).

Now there are two cases: if (x + y) = 0, then

x = −y. (1.1)

However, x and y were both assumed to be in [0, ∞) and therefore both must be positive. But (1.1) says that if y is positive, then x is negative. This is impossible, and so this case can not happen. Therefore, we know the other case is true. In particular, it must be the case that x − y = 0. In other words: x = y. Thus f(x) = f(y) implies x = y. However this was only for our choice of x and y, but since x and y were arbitrary (i.e. they could be ANYTHING) in the domain, this proof holds for every element of the domain, and so f satisfies the definition of one-to-one and is therefore one-to-one.

Remark 1.15. What you have just finished reading is (most likely) your first abstract proof. Congratulations! Notice to prove the proposition, we had to show the definition of one-to-one applies to f. To do that, we assumed we had two points (that not necessarily the same) mapping to the same thing, and showed by some trickery that in fact the two points must be the same point! This may seem a little mystical at first, but the more you do it, the less weird it feels.

Now that we are experts on this, we can move to another definition. Definition 1.16. A function is onto if it maps an element of the domain to every element of the codomain. Remark 1.17. Remember that the range is every element the function maps to. If the function maps to every element of the codomain, that means that the codomain = range! For most of the class, we always implied the codomain WAS the range for the functions we worked with (and we can choose that, as we choose the codomain when we define a function).

Example 1.18. The function in Figure 1 is not onto.

Example 1.19. The function g : R → R given by g(x) = x is onto. For any you pick, that number maps to itself! For example, if you say 17, then g(17) = 17. Thus you can see how g can map to every element of the codomain.

3 Figure 3: An example of an onto function.

x Example 1.20. Let f : R → R be f(x) = e . Then f is not onto because it can not map to any negative number (or 0!). 2 Example 1.21. The function f : [0, ∞) → R defined by f(x) = x is not onto as the root cannot map to negative numbers (as a function).

However if we restrict the codomain of the previous function, it will be onto: Proposition 1.22. However, g : [0, ∞) → [0, ∞) defined by g(x) = x2 is onto. Proof Strategy 1.23. To prove something is onto, you must pick an arbitrary element y in the codomain, and then construct an x that maps to it. Normally, we assume there is such an x, and then set f(x) = y. Then we solve for x. If we run into a contradiction (for example 0 = 1), then we know there is no x that maps to that specific y.

Proof. We must show that for any element y in the codomain, we can find an x so that √ g(x) = y. Let y ∈ [0, ∞) (the codomain). Then observe that the positive y is in the domain and maps to y, since √ √ f( y) = ( y)2 = y. Therefore since y was an arbitrary element in the codomain, f can map to anything in the codomain and so f is onto.

We conclude this section with a discussion of the inverse of a function. If you recall we had the definition of inverse functions when we defined ex and ln x. We will now give a more formal definition. Definition 1.24. Let f : X → Y be a function. The inverse is the unique function f −1 : Y → X is defined such that for any x ∈ X and y ∈ Y , f(f −1(y)) = y and f −1(f(x)) = x. Remark 1.25. Notice how this definition is where the interplay between the domain and codomain becomes apparent! The domain of a function is the codomain of its inverse (and vice versa). We conclude this section with the following fact (whose proof we omit) which explains why we spent the time to define one-to-one and onto at all: 1.26. A function has an inverse if and only if it is one-to-one and onto. Proof Strategy 1.27. A consequence of this theorem is that if you can prove a function is one-to-one and onto, then it has an inverse. However, we will mostly use it in this way: if you can find an inverse to a function then you know it is both one-to-one and onto! For matrices, we know how to find inverses easily. Therefore, we can readily check if any is one-to-one and onto.

4 2 Matrices as mappings

We discussed in class that we can view matrices as functions which eat vectors and spit out vectors (a vector is a matrix of size n x 1 for any natural number n). We will now look at how our new knowledge on functions relates to functions defined using matrices. In order to define matrices as functions, we need a set that is appropriate for their domain and codomain.

2 2 Definition 2.1. Let R = {all vectors of size 2 x 1}. That is, R is the set of all vectors of 2 size two by one. Think of R as the Cartesian .  2  Example 2.2. ~x = ∈ 2. 3 R

 x  Recall that every vector can be envisioned as the line segment connecting the origin y to the point (x, y). The following figure demonstrates this: Now we have everything we

y ~x

x

2 Figure 4: The vector from Example 2.2 sitting in R . need to treat matrices as functions.  0 1  Example 2.3. Consider the matrix A = . We may define a function T by A in 1 0 2 2 the following way. Let T : R → R be such that T (~x) = A~x. Sometimes we will just say A is a function, and when we do, we mean the function defined by A, specifically T . Notice  2  that if ~x = ∈ 2 then 3 R

 0 1   2   3  T (~x) = = . 1 0 3 2

We visualize this matrix transformation in the following figure.

Now I will reiterate a fact I mentioned in the previous section which only applies to matrices thought of as functions.

5 y ~x A~x

x

Figure 5: The matrix from Example 2.3 applied to ~x.

2 2 Theorem 2.4. Let T : R → R be a function defined by a matrix A. Then T is one-to-one if and only if T is onto.

I now would advise the reader to go and re-read Proof Strategy 1.27 to connect all these ideas together. This leads to a helpful definition for two by two matrices.  a b  Definition 2.5. The determinant of a matrix A = is defined to be det(A) = c d ad − bc.

This leads us ta a condition to check which determines if a two by two matrix has an inverse.

Theorem 2.6. A matrix A is invertible (that is, has an inverse) if and only if det(A) 6= 0.

3 Exercises √ Exercise 3.1. Let f : [0, ∞) → [0, ∞) be defined by f(x) = x. Show f is one-to-one by following Proof Strategy 1.14.

3 Exercise 3.2. Let g : R → R be defined by g(x) = x . Show g is onto by following Proof Strategy 1.23.

Exercise 3.3. Let f : (0, ∞) → [0, ∞) be defined by f(x) = x. Show f is not onto. (Hint: pay careful attention to the domain and codomain.)  2 1  Exercise 3.4. Let A : 2 → 2 be defined by . Show A is one-to-one by following R R 1 3 Proof Strategy 1.27.  1 1  Exercise 3.5. Let A : 2 → 2 be defined by . Prove A is not onto by showing R R 1 1  1  that is not in the range of A (see the end of Proof Strategy 1.23). 0

6