 So welcome back to another screencast on functions. We're going to continue focusing on functions represented as sets of ordered pairs here, and generate an important new concept using this representation. So last time we saw that we can represent functions f going from a to b as sets of ordered pairs by writing f as the set of all pairs a, b from a cross b such that b is equal to f of a. The first new idea we're going to look at here is that just as a function given as a formula or table could be represented as a list of pairs, the vice versa might also be true. That is, if I'm given a set of ordered pairs that come from a cross b, we might be able to build a function out of those pairs. The keyword here is might. Let's see what we mean about that. So look at the following set of ordered pairs in z3 cross z5. Just the set 0, 1, 1, 2, 2, 4. Now this set was not given to us as a function first. It's just a random set of three ordered pairs. But we could possibly make a function out of it by thinking of it like a table. As a table, this would say that 0 maps to 1, 1 maps to 2, and 2 maps to 4. In other words, I can start with a set of ordered pairs in z3 cross z5, and in this case turn it into a function from z3 to z5 by defining f of 0 equals 1, f of 1 equals 2, and f of 2 equals 4. Notice that this has all the right ingredients for a function. The domain, the co-domain, and the process are clearly defined here in my table. And every point in the domain maps to something, and inputs never split. I can even see that this function is injective because if two points have different x-coordinates or inputs, then the y-coordinates are always different. I can also see that this function is not surjective because, for example, the number 0 never appears in the y-coordinate, which represents the output. So we can start with a set of ordered pairs and possibly come up with a function from those pairs. I say possibly because not all sets of ordered pairs may yield functions like it did above. So I'd like you to think about this idea yourself as part of a concept check. Let's suppose that A is the following subset of z4 cross z4. Then what could you say about A? Pause the video and especially think about why your answer is right and the others are wrong. So the answer is you probably guessed here, by the way I set it up, is D, that A is not a function at all. And there are two reasons why. First of all, not every point in the domain copy of z4 maps to something. The number one, for example, doesn't map to anything here. And you can tell that because you never see a pair that has one in the first coordinate. Secondly, we have an input that splits. Notice that there are two pairs with the same first coordinate but different second coordinates. That means that 0, if you tried to make this into a function, would be mapping to two different things. And that violates one of the basic ingredients of functions. So that's like the Burke and Vending machine model all over again. So this set of ordered pairs does not actually create a function. It's just a set of ordered pairs. So if we start with a set of ordered pairs in A cross B, that set of pairs might be a function but might not. The following theorem, which is theorem 6.22 in the Sunstrom text, gives us the conditions under which a random set of ordered pairs in A cross B will be a function. So let A and B be two non-empty sets and let F be a subset of A cross B that satisfies the following two properties. First of all, for every A and A, there exists a B and B such that A, B belongs to F. And secondly, for every A and A and every B and B, if A, B is in F and A, C is in F, then B equals C. C is another element of B, by the way. Then if those two conditions are met, then F is a function from A to B, namely the one with F of A equals B whenever A, B is in F. Now that's a lot of verbiage. What does this all mean? Well, the first property here is just saying that every point in the domain maps to something. So we definitely want that to happen if this is going to be a function. Every time I encounter an A in the set A, there is some corresponding B in the set B that is related to it. The second property here is just a fancy way of saying that inputs don't split. If you have something that looks like two ordered pairs with the same first coordinate, then actually the second coordinates have to be the same. Said differently, you can never have two different pairs with the same first coordinate. So if those two properties are met, we know that that set of ordered pairs, which is just a random set of ordered pairs, actually defines a function from A to B. So now we have an idea of how to tell whether a random subset of A cross B defines a function from A to B. In the next video, we're going to put this idea to work on a very important concept that's at the core of this section, so stay tuned.