 Welcome back to one more screencast example that we're going to do about functions. And this one involves a little bit of statistics and the main idea behind this function is I want to give you a function that takes a Cartesian product as its domain here. So this is eventually going to be a function, although we want to ask some questions about it. So a is a process that goes from r cross r. I remember that's the set of all ordered pairs of numbers x, y with x and y both real. And the outcome of this process is also a real number. Now I haven't told you what the process is yet. Until I do that, there's no function that I'm discussing here. So what does a actually do? Well, a takes x and y, this ordered pair, and I'll write it like this. And returns their average. Just x plus y divided by 2. So a stands for average here. So that's the process, okay? It takes an ordered pair of numbers and returns the average of the two coordinates. So real simple function there. Again, the main point is here I have a Cartesian product that's being used as the input set. So let's ask our basic questions about this. Is the input set specified? Yep, that would be the Cartesian product of r with itself. Is the output set specified? Yes, I told you that should be a real number. Is the process specified? Yes, I gave you a formula for that. Does every valid input have an output? Yes, every ordered pair I take is just two numbers. And there's no rule that says I can't take the average of two numbers no matter what those numbers are. And does every valid input have only one output? And the answer there, that's an important question. The answer there is going to be yes as well. That's a uniquely defined process. Adding gives you a unique output and then dividing by two that also preserves the uniqueness. Okay, so this is really a function. Let's talk about its domain and co-domain. Very simply, the domain here is the Cartesian product of r with itself. The set of all ordered pairs of real numbers. The co-domain is r. That's the receiving end of this function. Alright, simple enough. Now, thinking some images of points in the domain, also pretty simple. If I take, for example, 3, 5. Okay, what is a of 3, 5? What's the image of 3, 5? Well, that would be 3 plus 5 over 2, and that would be 4. What is a of negative pi and square root of 2? Or you don't have to use all integers for this. Well, that would be 2, or square root of 2 minus pi divided by 2, whatever that is. It's a real number and it does exist. This is a well-defined real number. So I think we get how to find images of points in the domain here. What about pre-images of points in the co-domain? Well, let's just pick a number in the co-domain. That would be just any real number whatsoever. Let's take just something simple like 5. Okay, let's find a pre-image for 5. Something which when I put into this a function, I get 5 out. Now, the pre-image of this point would have to be in the domain, which means the pre-image has to be an ordered pair. It's not just a number. It's a pair of numbers. So I need to find two things here that whose average is 5. There are lots of choices. For example, I could pick 4 and 6. That would be perfectly fine. So a pre-image of 5 would be the ordered pair of 4, 6. But certainly not the only ordered pair out there that works. For example, I could just pick say 0 and 10. That also equals 5. So 0 comma 10 is another pre-image of 5. And you could pretty well imagine you can find as many pre-images of 5 as you wish. So this is definitely a situation where lots and lots of different inputs get sent to the same output. Remember, that's okay. What we don't want to have happen is a single input having two averages. That would be kind of wrong. So finally, let's talk about what the range of this function is. Now, the co-domain, so the function itself goes from the Cartesian product into the real numbers. Okay, that's the co-domain, but what's the range? What's the set of all actual outputs of this function? Well, it seems like there's no limitations to what the range might be. It seems like the range ought to be all real numbers. And that's because I'm thinking, is there any real number that I cannot get as the result of averaging? And the answer there would be no. And let's just kind of think about why that is. Let's pick another image, pick another point out of the co-domain, say 7. Well, there are a lot of numbers I could choose. I could always choose, say, 7 and 7. Okay, would be certainly an ordered pair I could put into A and get 7 as an output. So, in fact, it doesn't really seem to matter what your point in the co-domain is. If I just choose a random Y in the co-domain, it seems like if I, I can definitely find, reconstruct a pre-image for it by just choosing Y and Y. So, and this is for all Y in the real numbers here, Y has a pre-image. So that would seem to suggest that the range of this function here, the range of A, is actually the entire set of real numbers. It's a situation where the range and the co-domain are actually equal to each other. We've seen that doesn't always happen. Here it does. And keep your mind on this little proof right here of why the range is equal to the real numbers, because that comes up big in another couple of sections here. Okay, thanks for watching.