 Welcome to the screencast, which is the first of several that focus on two special properties of functions. We've seen 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 that 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 in the code 30, or $1.25 in the code 31, or $1.25 in 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 screencasts. 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 this 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 mean two different students mapped 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 and 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 it an injective function one to one. Schematically, an injective function would 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 is 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 as not an injection, we just need to find one pair of inputs that are different that map to the same output. With a function in b, we're 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 0 and x equals 2 pi, for example, and those two different points both map to the same point 1 in the co-domain. With a 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, and 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've 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 and 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 a 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 are going to explore some other strategies for proving that functions are injective. So thanks for watching and stay tuned.