>> Welcome to this screencast, which is the first of several that focus on two special properties of functions. We see many different functions that do all sorts of things. But they all have the following five basic ingredients in common. One of those is the fifth one on this list. That a single valid input must produce only one output. Or said differently, it's not possible for a single input to produce two or more outputs. We might refer to that as the no splitting rule. Under any function, every point in the domain must map to one output like this. This sort of behavior is okay. But we cannot have any splitting. That is, where one point in the domain maps to different points in the co-domain. That is not okay. It's like a vending machine that accepts a single money amount and a code, but puts out two snacks. That's a broken machine because it's split my input into more than one output. However, notice that it is okay for two different inputs to go to the same output. This is not splitting, but what we might call a collision. Now, going back to the vending machine metaphor. Here's a photo that I took of the vending machine that's near my office. And as you can see, collisions are possible. It's possible to put in different inputs and get the same snack out. For example, if I put in $1.25 and the code 30. Or $1.25 and the code 31. Or $1.25 and the code 32. I get the same output, which in this case is a bottle of water. So splitting is not okay. But if I have a function that has collisions, that could be okay. To flush this notion of collisions out more carefully, let's return to two examples from the 6.1 screencast. The first example is a function N that maps the names of GVSU students and staff into the set of all three letter combinations. And the process by which we map is that a person is mapped to his or her initials. For example, N of my name would be RNT. This is a function because there is no splitting. One person is not going to have two different sets of initials. But the function could have collisions and probably does have collisions. Because it's possible, even probable that two different people in the set are going to have the same initials. So on the other hand, there are some functions out there that do not have any collisions. Nor do we want them to have any collisions. Take this other early example that maps the set of names of GVSU students and staff into the set of eight digit integer strings by mapping a person to his or her student ID number. Now, this is a function again because there's no splitting. Any single student or staff member is not going to have two different ID numbers. But with this function we definitely hope that there are no collisions. Because that would be two different students map to the same ID number. And that would be bad on a number of levels. So this function by design would have no collisions. So you can tell at this point that whether or not a function has collisions or doesn't have collisions is an important facet of that function. So we're going to give that property a special name. We're going to call a function that has no collisions an injection. And here's the formal definition. A function F from A to B is called an injection. Or in an adjective form we can say that F is injective. If for every X1 and X2 in the domain, if X1 and X2 are not equal, then F of X1 and F of X2 are not equal. Now, why does this definition encode the notion of an injective function not having any collisions? Well, what it says is that, if F is injective, that whenever we take two different points in the domain, they must map to two different points in the co-domain. In other words, we never have two different points in the domain mapping to the same point. So, therefore, we have no collisions. And sometimes we call the injective function one-to-one. Schematically an injective function will look like this. Since F is a function, there is no splitting. So every point in the domain maps to one point in the co-domain. But since F is an injection, no two points in the domain map to the same point in the co-domain. On the other hand, if G over here is not an injection, we still have no splitting. Every point in the domain will map to just one point in the co-domain. But we will have a collision where two different points in the domain map to the same point in the co-domain. Both functions are functions because there's no splitting of the input. But the one on the left is an injection because there are no collisions. And the one on the right is not an injection because there is a collision. So let's end off with a concept check here. Here are five functions from the real numbers to the real numbers. The fifth one down here is the ceiling function you saw a little earlier. And it rounds input up to the next highest integer. Select all the ones of these that are injections. So pause the video. Make your selections. And come back when you are ready to check. So the answers here are A and C. Let's rule out the other three first and see why those are not injections. To show a function is not an injection, we just need to find one pair of inputs that are different that map to the same output. With the function in B, we are squaring. So, for example, you could look at X equals 2 and X equals negative 2. Now, those are certainly different points in the domain. But notice they both map to the same point in the co-domain. So that is a collision. And, therefore, this function is not an injection. Similar things happen to the functions in D and E. With this cosine function we could choose X equals zero and X equals 2 pi, for example. And those two different points both map to the same point 1 in the co-domain. With the ceiling function we have lots of collisions. We could choose, for example, X equals 1.5, and X equals 1.6. And both of those, although they are different, would map to 2. So although all five of these are functions because there are no splitting of inputs into multiple outputs, none of the functions in B, D and E are injections. Now let's turn to the ones that we say are injections. Now, A is injective, and we need to prove it. So let's suppose that I have two different points. Let's just call those X1 and X2. Then if I multiply both of those by 3, that is not going to make them the same. 3X1 and 3X2 will still be different numbers. And so, therefore, if I subtract 2 from those two different numbers, I will have 3X1 minus 2 not equal to 3X2 minus 2. So I have started with two different inputs and proven that I have two different outputs as a result. The same line of reasoning works for C. If I start with two different inputs and cube them, the results are different. Because I am cubing not raising to say a second power or a fourth power. Subtracting 2 maintains that difference, and so the outputs of the function are different. So notice that to prove a function is not injective requires only a single example of the collision. But to prove a function is injective requires a proof. Because we have to establish the truth of a universally quantified statement that appears in the definition. The above reasoning is one way to do this. But in the next video we're going to explore some other strategies for proving that functions are injective. So thanks for watching and stay tuned.