Functions and their graphs. If you get down to the barest bones of the concepts, a function. Consists, Of three things, two sets, And a rule. So the first set D is called the domain. The second set R is called the range. And the rule, Specifies, How to every element, Of the domain D an element of the range R is associated. The notation, Of all this is usually like, so f which is also often called use for the rule, f D arrow R. So f is the name of the whole function but it's also often the name of the rule, D is the domain, R is the range. Let's look at some examples. First very simple, I take for D a set of the elements 1, 2, 3, and another set, of the elements 4, 5, 6. And my rule associates with the element 1 of D, the element 4 of R, of the element 2 of D also is associated to the element 4, and the element 3 of D is associated to the element 6. So we can represent this by a picture. Here is my set D, with the three elements 1, 2, 3. Here is my set R with the elements 4, 5, and 6. And the rule is then represented by number of arrows and the arrow says, well, here the element 1 is associated to the element 4. The element 2 is also associated to the element 4 and the element 3 is associated to the element 6. Now, we have to note a couple of important things here, for every element of D, I have to specify an associated element. So this is the case here, 1, 2, or 3 are all accounted for. But it's not the case on the other side. There maybe elements in R, which are not reached by any arrow. There can be elements in R, which are reached by more than one arrow, and it can also be elements in R which can be reached by precisely one arrow. This is all permissible. But on the other side, on the D side, from every element one and only one arrow should start. So if we were to add another arrow like this, associating 2 to 4 as well as to 6, this wouldn't be a function. So we're not going to do that. To have another example, one you're probably familiar with. Let's first look at the domain, the real numbers, the range, also the real numbers, and the rule which maps every number to the number squared. This is of course a function because, I tell for every number x what its image is. Now, I've got a different specification. I take as a domain again the real numbers, but for the range I take, All numbers in R, R is functioning as my universal set here. And my condition is that x is larger or equal than 0. And the rule is again the same, f (x) = x squared. And I see, yes, for every element in the domain, I've got the element squared which is a positive number as I know which is an element of R, so this defines also a good function. But it's now important to know a and b are different functions. And this is very important. Now, why are they different? Well, usually we only look at the rule, here. And say, well, the the rules are the same so the functions are the same. But this is not the case because the function is to triple the domain, the range, and the rule. And here, in the domains are equal, the rules are equal, but the ranges are different. And that makes them different functions with different properties. We shall see this when we're discussing injective and surjective functions. Another example. Sometimes in economics, you might encounter set-valued functions, and they look to be something very mysterious. But there's no mystery. So let's have an example of a set-valued function. I take as my domain the set with the elements 1, 2, 3 again. And as my range, as an element the set with element 1, the set with element 2 and 3, and set with elements 1, 2 and 3. Of course, as everything can be an object and a set is a collection of objects, so now we've got a set which having sets as element, there is no mystery involved. And now let's specify the rule. The image of the element 1 will be the set 2,3. The image of the element 2 will be the set, we'll say also 2, 3. Oops, and 3 is going to be mapped on the set 1. So here we've got a function whose arguments, these are the arguments, are the elements of D, so the numbers 1, 2, 3. And whose images are sets. So this is a set-valued function. There's absolutely no mystery involved. Now, we can learn a lot about functions by drawing them. But before we can draw them, we need to have additional notions. The notion of Cartesian product. Cartesian refers back to Rene Descartes, French philosopher who was also a very good mathematician and who maybe not invented the method but used to great account and popularize it. So, what's a Cartesian products? Well, let A and B be sets. The Cartesian product A x B is the set of all ordered pairs. Going to that in a second. (a, b) such that, A is an element of the set A and b is an element of the set B. Now, an ordered pair is a pair where the order is important, obviously. So, For instance, the pair (1, 2) is not equal to the pair (2, 1), because the 1, though the pairs have the same elements, they don't have the same order. All right, so let's have a quick example. If I've got a set with elements 1 and 2. And I take the Cartesian product of this set with element 3, then I should make all ordered pairs. So I take the first element from the first set and the first element from the second set. And then I take the second element from the first set and the first element from the second set, and now I've exhausted all my possibilities. So this product is now a set with two elements. The most famous example is of course, R2, which you all know as notation for the plane. But actually this notation expresses that we're dealing here with Cartesian product. It is R x R. So R2, R times R is a Cartesian product of R with itself, which means it's the set of all ordered pairs (x, y) such that x is in R and y is also in R. So it is the set of all ordered pairs of real numbers, and that we will also call two vectors. Now, what about graphs? Let's assume that f is again a function. So f has a domain D, a range R, and there's a rule which specifies for every element what it's image in R is. So the Graph(f) is the set of ordered pairs in the Cartesian product D times R such that the second element of the ordered pair is f of the first element of the ordered pair. So let's have a quick example. With the very abstract D is 1, 2, 3, R is 4 ,5 ,6. And f is specified by saying f (1) = 4, f (2) = 4, and f (3) = 6. Now think for a moment, what might be the graph of this function? So, let's have a go. First, we have to think about D times R because the graph will be subset of this Cartesian product. Well, D times R is the set of all pairs. (1,4), (2,4), (3,4). (1,5), (2,5), (3,5). (1,6), (2,6), (3,6). And so this is my Cartesian set and now I have to single out all element in this Cartesian set such that the first element x and the second element y is f(x). So for instance, if I start with 1 then I should take f(1), so that's the point (1,4). This is an element of the Graph(f). So, here is my first point in the graph. My second point will be the point 2, f(2) which is (2, 4). So here is my second point in the graph. And my third point in the graph, 3, f(3), is the point (3,6) which is this point up here. So these three points here together form the graph of my function f. Of course, When you think of graphs, you rather think of examples like this one. So a function from R to R, given by f(x) = x squared. Now the graph of x, the Graph(f), sorry, will be all points (x,y) in R x R. So the graph will be a subset of the plane, such that y is f(x), such that y is x squared. Right, so let's try to draw this. Well, we learned this in high school. Here's my graph. And usually we just write the defining equation without bothering writing the full set. So really the graph is a subset of R x R. And this here is a condition on the point (x, y). Which determines whether the point is always not on the graph. So for instance, if we look at the condition on point (1,1) we can ask ourselves whether (1,1) is on the graph. And well, if we work it out, then we see that 1 should be equal to 1 squared, and that is true. So indeed, the point (1,1) it is on the graph. Likewise, we can check whether the point (1,0) is on the graph. Shouldn't be, but well, we'd better check. Well, y is 0 here, x is 1, so 0 should be 1 squared if this point were to be on the graph, and this is not so, so this is false. And yes, I've drawn the graph correctly because that second point is clearly not on the graph. So for every point in the plane, we can check whether or not it is on the graph. And in this way, we've gotten quick and rather convenient visual representation of the function, because in this graph, all the three elements are there. Here, the horizontal side. I've got my domain here on the vertical side. I've got my range. Here, I've got the subset of the Cartesian product D times R, which is the graph. And the graph just tells me exactly about a rule with which elements from the domain are associated to the elements in the range.