WEBVTT mathematics/pre-calculus/selhorst-jones 00:00:00.000 --> 00:00:02.200 Hi--welcome back to Educator.com. 00:00:02.200 --> 00:00:05.700 Today, we are going to talk about the idea of a function. 00:00:05.700 --> 00:00:10.900 Functions are extremely important to mathematics: you have certainly encountered them before. 00:00:10.900 --> 00:00:14.700 But you might not have fully understood how they work and what they are doing. 00:00:14.700 --> 00:00:21.200 This lesson is here to give us a clear understanding of what it means for something to be a function, and how functions work. 00:00:21.200 --> 00:00:25.800 Since functions are so important, they are going to come up in every single lesson you learn about in this course. 00:00:25.800 --> 00:00:28.400 And they are going to come up in every single concept you talk about in calculus. 00:00:28.400 --> 00:00:31.100 And they are going to keep coming up, as long as you are studying math. 00:00:31.100 --> 00:00:38.500 Make sure you watch this entire lesson; it is so important to have a good, grounded, fundamental concept of what a function is, 00:00:38.500 --> 00:00:41.700 because it is going to keep getting used in everything that we talk about. 00:00:41.700 --> 00:00:45.400 This is probably the single most important lesson of this entire course, 00:00:45.400 --> 00:00:49.100 because so many later ideas are going to talk about functions. 00:00:49.100 --> 00:00:53.900 Also, it would help to have watched the previous lesson on sets, elements, and numbers, 00:00:53.900 --> 00:00:57.000 because we are going to be talking about how sets are connected to functions. 00:00:57.000 --> 00:01:00.100 So if you haven't done that, I would recommend that you go and watch that one first, 00:01:00.100 --> 00:01:05.100 because it will help explain a lot of what we are talking about here, because functions are relying on the idea of sets. 00:01:05.100 --> 00:01:09.100 All right, let's jump into it: what is a function? 00:01:09.100 --> 00:01:14.600 A function is a relation between two sets: a first set and a second set. 00:01:14.600 --> 00:01:19.700 For each element from the first set, the function assigns precisely one element in the second set. 00:01:19.700 --> 00:01:25.000 So, we will point at some element in the first set, and it will say, "Here is an element from the second set." 00:01:25.000 --> 00:01:28.900 Point at another element from the first set, and it will tell us, "Here is some element from the second set." 00:01:28.900 --> 00:01:32.200 That is the idea of a function; here is a visual example for it. 00:01:32.200 --> 00:01:40.700 We could have something where all of the squares are the first kind--it is our first set--and all of the round things on this side are our second set. 00:01:40.700 --> 00:01:46.000 So, second would be the second column, and first set would be the first column. 00:01:46.000 --> 00:01:52.200 We could have news get put onto paper; we say that news, the function, gives us paper. 00:01:52.200 --> 00:01:58.100 We say that cheese, the function, gives us burger; we say that good, the function, gives us bye. 00:01:58.100 --> 00:02:03.300 We say that sand, the function, gives us paper; we say that bubble, the function, gives us gum. 00:02:03.300 --> 00:02:07.200 So, there are only five elements in our first set, and only four elements in our second set. 00:02:07.200 --> 00:02:13.900 But this is a perfectly reasonable function: newspaper, cheeseburger, goodbye, sandpaper, bubblegum. 00:02:13.900 --> 00:02:18.500 The only one you might be wondering about is..."Wait, news goes to paper and sand goes to paper." 00:02:18.500 --> 00:02:24.400 There is no problem with that: we only said that the function has to give us something when we point at something in the first one. 00:02:24.400 --> 00:02:30.300 We never said that it has to be a different thing, every single thing that we point to; it just has to give us something for it. 00:02:30.300 --> 00:02:34.400 That is what we have here: we have something where everything that we call out on the first side... 00:02:34.400 --> 00:02:39.200 we call out news, and in turn, it responds by telling us paper. 00:02:39.200 --> 00:02:46.900 We call out good, and in return, it says bye; that is how it is working here with this function. 00:02:46.900 --> 00:02:54.600 Here is a non-example: in this one, we say tree, but the function gives us four different possibilities. 00:02:54.600 --> 00:03:02.500 Sometimes it gives out maple; but other times it gives out oak; but other times it gives out apple; but other times it gives out pine. 00:03:02.500 --> 00:03:08.400 And then fruit--if we go to fruit, it sometimes gives out apple, and sometimes it gives out grape. 00:03:08.400 --> 00:03:15.100 This isn't allowed, because it is only allowed to give one response to a given input. 00:03:15.100 --> 00:03:20.600 We tell it one element from our first set; it can only tell us one element from the second set. 00:03:20.600 --> 00:03:24.000 It is not allowed to give us a whole bunch of different choices to pick and choose from. 00:03:24.000 --> 00:03:27.200 Sometimes it is going to be maple; sometimes it is going to be oak; sometimes it is going to be pine. 00:03:27.200 --> 00:03:29.900 No; it has to be one thing, and one thing only. 00:03:29.900 --> 00:03:38.700 That is what it requires to be a function; so this is not an example--this is not allowed, because we can't have it be multiple things coming out of this. 00:03:38.700 --> 00:03:42.800 It has to only be that one input will only give us one output. 00:03:42.800 --> 00:03:48.200 And as long as we keep putting in that same input, it can only give us the same output. 00:03:48.200 --> 00:03:53.300 Just like variables, it is useful to name functions with a symbol; so let's talk about how notation works here. 00:03:53.300 --> 00:03:57.100 Most often, the symbol we will use to talk about a function is f; but sometimes 00:03:57.100 --> 00:04:02.400 we are also going to use g, h, or whatever else will make sense, depending on the context. 00:04:02.400 --> 00:04:05.600 But often, we are going to end up seeing f. 00:04:05.600 --> 00:04:10.600 If we want to talk about what f assigns to some input x, if x is the element in our first set, 00:04:10.600 --> 00:04:17.200 if that is what we call the element in our first set that we use f on, then it will be assigned to "f of x," 00:04:17.200 --> 00:04:26.800 f acting on x--what f gives out when given x; so the first symbol is the name of the function that we are using; 00:04:26.800 --> 00:04:36.100 then, the second symbol, in parentheses, is what the function is acting on. 00:04:36.100 --> 00:04:46.500 So, f--the name of our function--is acting on x; and then, that whole thing together is f(x); f(x) is the name of what comes out of it. 00:04:46.500 --> 00:04:52.600 So, f is the name of what is doing the acting; x (or whatever is in the parentheses)...the first symbol was the name 00:04:52.600 --> 00:04:58.400 of whatever is doing the acting; the thing inside of the parentheses is the name of what is being acted on; 00:04:58.400 --> 00:05:04.500 and then, the whole thing taken together is where we are when we use the function on that element-- 00:05:04.500 --> 00:05:07.600 what we get output to where we come to. 00:05:07.600 --> 00:05:12.600 Now, there could be a little bit of confusion about f(x), because it is f, parenthesis, x. 00:05:12.600 --> 00:05:19.100 And we know that parentheses...if I wrote 2(3), that would mean 2 times 3, right? 00:05:19.100 --> 00:05:25.300 So, we might think f times x; but we are going to know from context that f is a function, and not something that we multiply. 00:05:25.300 --> 00:05:30.400 So, when f is a function, we don't have to worry about using multiplication, if it is f on some element. 00:05:30.400 --> 00:05:36.100 It is always going to be f of that element, never f times, unless we are talking about that explicitly. 00:05:36.100 --> 00:05:39.500 But if it is just in parentheses, it is not going to be multiplication. 00:05:39.500 --> 00:05:46.000 So, when you see parentheses, and it is a function, it isn't implying multiplication, like when we are dealing with numbers. 00:05:46.000 --> 00:05:52.900 If we want to express what sets the function acts on, we can write f:a→b. 00:05:52.900 --> 00:06:02.800 What this is: it is "f goes from a to b"; it takes elements from a, our first set; and then it assigns them elements from b. 00:06:02.800 --> 00:06:06.600 Normally, it won't be necessary for us in this course (and probably for the next couple of years)-- 00:06:06.600 --> 00:06:11.000 it won't be necessary to name the sets that our function is working on. 00:06:11.000 --> 00:06:17.200 But why that is, we will discuss later: it is going to be pretty simple, but we will discuss it later when we get to it. 00:06:17.200 --> 00:06:21.900 There are a lot of metaphors that we can use to help us understand what is going on in a function. 00:06:21.900 --> 00:06:28.200 Here are three metaphors to help us understand what happens when f takes things from a and goes to b. 00:06:28.200 --> 00:06:33.900 Our first idea is transformation: the function transforms elements from one set into another. 00:06:33.900 --> 00:06:45.800 It takes an element x, contained in a, and then it transforms it into an element in b, which we call f(x), or f acting on x. 00:06:45.800 --> 00:06:50.700 f(x) is what it has been transformed into; that is what it is after the transformation. 00:06:50.700 --> 00:06:55.900 Now, from problem to problem, the rules for transformation will usually change as we use different functions. 00:06:55.900 --> 00:07:00.800 One function is generally going to have a different set of rules for how its function works than another function. 00:07:00.800 --> 00:07:05.200 But if we are using the same function--if we are in the same problem, using the same function-- 00:07:05.200 --> 00:07:11.200 the rules never change: if we put in the same x, we will always get the same f(x) as our result. 00:07:11.200 --> 00:07:14.000 The rules for how the transformation works are always the same. 00:07:14.000 --> 00:07:17.700 So, if the same thing goes in, the same thing always comes out. 00:07:17.700 --> 00:07:23.200 Another way we can look at it is a map: it tells us how to get from one set to another set. 00:07:23.200 --> 00:07:29.400 It is sort of a guide, directions for how to get from one place to another place. 00:07:29.400 --> 00:07:33.200 Of course, if we start at a different starting location, a different starting place, 00:07:33.200 --> 00:07:37.800 different elements in a, we might end up at a different destination--different elements in b. 00:07:37.800 --> 00:07:41.900 If I say, "Go 100 kilometers north," you are going to end up in totally different places 00:07:41.900 --> 00:07:49.500 if you start in Mexico, if you start in California, if you start in England, if you start in South Africa, or if you start in Japan. 00:07:49.500 --> 00:07:56.600 Each one of these places...if you start in Egypt...is going to end up going to a totally different place, even though they are all still the same direction. 00:07:56.600 --> 00:08:01.600 You are still doing the same thing; you are still going 100 kilometers north in all of these cases. 00:08:01.600 --> 00:08:04.600 But because you started in a different place, you end up in a different place. 00:08:04.600 --> 00:08:09.500 So, a different starting place, a different element that we are acting on, a different element that we are mapping, 00:08:09.500 --> 00:08:14.800 will normally cause us to have a different destination--a different place that we land on. 00:08:14.800 --> 00:08:21.600 The math itself, though, never changes: if we start at the same place, we always arrive at the same destination. 00:08:21.600 --> 00:08:28.200 So, if we start in San Jose, California, and then we go 100 kilometers to the north...I actually have no idea where that is. 00:08:28.200 --> 00:08:30.600 But we will be 100 kilometers north of San Jose. 00:08:30.600 --> 00:08:36.100 And then, if we start in San Jose again on another day, and we go 100 kilometers north, we are going to end up being in the exact same place. 00:08:36.100 --> 00:08:41.100 And if we go to San Jose, and then we go 100 kilometers north again, we are going to end up being in the exact same place. 00:08:41.100 --> 00:08:44.900 And people are probably going to wonder, "Why does this person keep showing up here?" 00:08:44.900 --> 00:08:47.100 And that is because we are following the same map. 00:08:47.100 --> 00:08:53.200 The directions, the transformation that the map gives us, the way we go, isn't going to change each time. 00:08:53.200 --> 00:08:57.200 It only changes when we start from a new place. 00:08:57.200 --> 00:09:00.700 Finally, one last way to visualize it is the idea of a machine. 00:09:00.700 --> 00:09:07.200 We can visualize a function as a machine that eats elements from a, and it produces elements from b. 00:09:07.200 --> 00:09:12.800 What it produces depends on what it eats, but the machine is reliable: if it eats the same thing, it always produces the same output. 00:09:12.800 --> 00:09:19.600 For example, if we have x right here, and we push it into our machine, f, it goes into the machine; 00:09:19.600 --> 00:09:24.500 then the machine works on it and crunches it, crunches it, crunches it; and it gives out f(x). 00:09:24.500 --> 00:09:32.100 So, we are going from the set a to the set b. 00:09:32.100 --> 00:09:37.600 Now, one thing about the machine is that it is perfectly reliable; the machine is reliable. 00:09:37.600 --> 00:09:41.200 If it eats the same thing, it produces the same output. 00:09:41.200 --> 00:09:49.800 If we put in x, it will always give out f(x); so the first time we put in x, it gives out f(x); the second time, f(x); the third time, f(x); the fiftieth time, f(x). 00:09:49.800 --> 00:09:55.300 Just like when we started in San Jose, and we went 100 kilometers north, each time we always ended up coming to the same place; 00:09:55.300 --> 00:09:59.100 you put the same thing into the machine; the same thing comes out. 00:09:59.100 --> 00:10:02.100 This idea is so important; we are going to talk about it really explicitly. 00:10:02.100 --> 00:10:06.000 We have said this one way or another for all of our different ways of thinking about functions. 00:10:06.000 --> 00:10:10.800 But it is so important--it is such an important characteristic of functions--we want to make sure that we know it. 00:10:10.800 --> 00:10:16.600 If we put the same input into a function, it will always produce the same output. 00:10:16.600 --> 00:10:21.700 Now, the input and the output could be totally different; the input is not necessarily going to be where we show up in the output. 00:10:21.700 --> 00:10:26.500 You start in San Jose, and then you show up in some farmer's field 100 kilometers to the north. 00:10:26.500 --> 00:10:33.200 But you are going to come out to that same farmer's field each time, because you are showing up at the same location. 00:10:33.200 --> 00:10:39.100 So, for a function to make sense and be well-defined, for it to work, its rules must never change. 00:10:39.100 --> 00:10:49.700 For example, if f(2), f acting on 2, gives out 7; if f(2) equals 7 the first time, then f(2) = 7 the second time; and f(2) = 7 every time. 00:10:49.700 --> 00:10:54.400 No matter how many times f operates on 2, no matter what, it is always going to give out the same thing. 00:10:54.400 --> 00:10:59.800 That is what it means to be a function: your rules don't change when you are going on the same thing. 00:10:59.800 --> 00:11:10.800 You work on one element the same way each time; you always map it; you always transform it; you always assign it to the same place. 00:11:10.800 --> 00:11:18.500 Here is something that is not a function: g(cat) = fur, g(cat) = whiskers, g(cat) = quiet. 00:11:18.500 --> 00:11:23.600 This can't be a function, because we have three totally different destinations when we plug in cat. 00:11:23.600 --> 00:11:26.100 And what determines whether we go to fur, whiskers, or quiet? 00:11:26.100 --> 00:11:30.400 There is no reason why we should use one set of rules or another set of rules, so it is not a function. 00:11:30.400 --> 00:11:35.000 There is no reliability here; we don't know, when we plug in cat, if we are going to go to fur, whiskers, or quiet. 00:11:35.000 --> 00:11:43.200 So, it is not a function; but we could have a function that was h(fur) goes to cat, h(whiskers) goes to cat, h(quiet) goes to cat. 00:11:43.200 --> 00:11:47.500 It is not that there is a problem with having us land on the same place. 00:11:47.500 --> 00:11:52.500 No matter what we put in, the function could give out cat: it doesn't matter, 00:11:52.500 --> 00:11:59.400 as long as the first thing, the first set we are coming from, can't split as it comes out. 00:11:59.400 --> 00:12:04.900 We can land on the same place, but we can't be coming from the same place and go to two different locations. 00:12:04.900 --> 00:12:11.200 We always have to follow one rule; because we are following one rule, we can't land on two different things. 00:12:11.200 --> 00:12:14.800 Let's look at a non-numerical example: before we start telling you about how functions work on numbers, 00:12:14.800 --> 00:12:19.800 let's consider an example of one that works on something totally not about numbers. 00:12:19.800 --> 00:12:27.400 Let's think about a function that gives initials: we will define...f is going from names spelled with the Roman alphabet 00:12:27.400 --> 00:12:35.100 (names like Vincent or John, not things that are spelled with characters that we can't express in the Roman alphabet), 00:12:35.100 --> 00:12:38.700 and it is going to go to letters from the Roman alphabet. 00:12:38.700 --> 00:12:47.700 So, f(x) equals the first letter of x; now, if we say, "Wait, we know that the first letter of x is x!"-- 00:12:47.700 --> 00:12:53.500 yes, but what we are talking about is names: x is a placeholder, remember? 00:12:53.500 --> 00:12:57.600 We talked about variables: the idea of a variable is that it is a placeholder. 00:12:57.600 --> 00:13:02.200 So, x is just sort of keeping the spot warm, until later, when we put in the name. 00:13:02.200 --> 00:13:11.300 So, if we decide to put Vincent into the function, then this x on the left side tells us where to put Vincent on the right side. 00:13:11.300 --> 00:13:15.000 So, Vincent will come in here on the right side, as well. 00:13:15.000 --> 00:13:18.700 We will have Vincent go on the left, and Vincent will go on the right. 00:13:18.700 --> 00:13:23.700 f(Vincent) would be V: we cut it off just to the first letter. 00:13:23.700 --> 00:13:31.200 f(Nicole) would put out N; f(Padma) would give out P; f(Victor) would give out V; f(Takashi) would give out T. 00:13:31.200 --> 00:13:35.200 Whatever we put in, it will give out just that single letter. 00:13:35.200 --> 00:13:52.600 So, if we were to turn this into a diagram, we could have Vincent here, Nicole next to Vincent, Padma, Victor, and then finally Takashi. 00:13:52.600 --> 00:14:02.000 And so, this is where we are coming from; and then, we are going to letters. 00:14:02.000 --> 00:14:13.000 So, we have V and N and P and T...and let's put in another letter, like...say S and Q. 00:14:13.000 --> 00:14:22.700 Vincent gets mapped to V; Nicole, by this function, gets mapped; Padma gets mapped to P; Victor also gets mapped to V. 00:14:22.700 --> 00:14:28.500 Takashi gets mapped to T; but do S and Q get used? Not for this set of names. 00:14:28.500 --> 00:14:36.200 Maybe if we put in Susan, or we put in...there has to be a name with Q that I don't know... 00:14:36.200 --> 00:14:43.100 let's pretend that the name is simply Queen...I am sure that there is a name...a really weird spelling of the name Cory?... 00:14:43.100 --> 00:14:46.400 there is a name out there that is spelled with a Q; I just don't know it immediately. 00:14:46.400 --> 00:14:53.300 So, there is something out there that can fill up that S, and that can fill up that Q; we just don't have it in what we are looking at so far. 00:14:53.300 --> 00:14:56.300 So, there might be other things that we are not hitting on the right; 00:14:56.300 --> 00:15:01.300 but everything that we have on the left is what is getting mapped to things on the right. 00:15:01.300 --> 00:15:06.900 So, the functions we use...of course, it is no surprise; this is math--we are probably going to be talking about numbers. 00:15:06.900 --> 00:15:11.300 So, it shouldn't come as a surprise; we are going to concentrate on using these functions with numbers. 00:15:11.300 --> 00:15:16.800 Functions, as we just saw, can be used for lots of things; but we will focus on functions and the real numbers. 00:15:16.800 --> 00:15:21.700 Unless we are told otherwise, we will assume that every function takes in real numbers and outputs real numbers. 00:15:21.700 --> 00:15:26.900 That is to say, f is taking in reals and then giving out reals. 00:15:26.900 --> 00:15:34.200 OK, so when we are given a function, we will usually be told what its rule is--how it maps inputs to outputs. 00:15:34.200 --> 00:15:40.800 So, for example, if f(x) = x² + 3, its rule is "Square the input," since x is our input; 00:15:40.800 --> 00:15:46.500 then, what we do is...we first square the input, and then we add 3; square the input and then add 3. 00:15:46.500 --> 00:15:48.300 That is its rule; that is how it works. 00:15:48.300 --> 00:15:53.000 Notice that x acts as a placeholder; just like it did with the names, it acts as a placeholder. 00:15:53.000 --> 00:15:55.800 It is not that x is really the thing we are worried about being acted on. 00:15:55.800 --> 00:15:59.800 It is just telling us what is going to happen to whatever we plug into this function. 00:15:59.800 --> 00:16:01.700 If we plug in 3, what will happen to 3? 00:16:01.700 --> 00:16:03.800 If we plug in 50, what will happen to 50? 00:16:03.800 --> 00:16:07.100 If we plug in smiley-face, what will happen to smiley-face? 00:16:07.100 --> 00:16:14.000 x is just there to sort of keep a spot warm: it is telling us, "Here is the place; things will go into this place." 00:16:14.000 --> 00:16:19.300 And things will go into this place, wherever I show up on the right side, as well. 00:16:19.300 --> 00:16:25.700 If we want to use a function, if we want to evaluate a function at a specific value, we just apply this rule to whatever our input value is. 00:16:25.700 --> 00:16:27.800 In practice, this turns out to actually be really simple. 00:16:27.800 --> 00:16:32.100 Usually, we are given a formula for each function; so we just follow the method of substitution. 00:16:32.100 --> 00:16:37.300 Remember, we take whatever we are substituting in; we wrap it in parentheses; and then we see what we get. 00:16:37.300 --> 00:16:43.900 For example, our function is f(x) = x² + 3; then, to find f(7), we just plug in. 00:16:43.900 --> 00:16:49.100 7 is what we are plugging in; so we have 7 in this spot, and a 7 will go in here. 00:16:49.100 --> 00:16:56.500 We wrap that in parentheses, just in case; in this case, we don't have to, but we will see why it is useful to always remember to wrap it in parentheses. 00:16:56.500 --> 00:17:01.600 7² + 3...7² is 49; 49 + 3...we get 52. 00:17:01.600 --> 00:17:08.900 If we want to look at a slightly more complex example, though, we see why it is so important to wrap your substitutions in parentheses. 00:17:08.900 --> 00:17:14.600 If we consider a slightly more complex input, like a + 7, then we have to have it in parentheses, 00:17:14.600 --> 00:17:21.200 because it is not just the a that gets squared; it is not just the 7 that gets squared; it is all of that thing that went in. 00:17:21.200 --> 00:17:26.800 All of that thing is both the a and the + 7; it is (a + 7); it is that whole number combined. 00:17:26.800 --> 00:17:37.200 It is not a² + 7; it is not a + 7²; it is (a + 7), the whole thing squared; and then, plus 3. 00:17:37.200 --> 00:17:44.700 A good way to see the behavior of a function is by creating a table of values; sometimes we call it a T-table, because it has the shape of a T. 00:17:44.700 --> 00:17:50.700 On one side, we have input values, while the other side shows us what the function outputs when given that input. 00:17:50.700 --> 00:17:56.100 So normally, the left side will be our input value, and the right side will be our output value. 00:17:56.100 --> 00:18:00.500 So, for example, if f(x) = x² + 3, then we can give out a bunch of values for it. 00:18:00.500 --> 00:18:06.100 So, if we want to figure out what happens to f(-2), we just follow the normal thing. 00:18:06.100 --> 00:18:15.500 f(-2), so we plug it in...(-2)² + 3...we get 4 + 3; we get 7, and that 7 shows up here. 00:18:15.500 --> 00:18:22.900 If we want to figure out what f(-1) is, we do the exact same thing: (-1)² + 3, 1 + 3, and 4. 00:18:22.900 --> 00:18:26.500 And that 4 shows up here; and so on, and so forth. 00:18:26.500 --> 00:18:32.400 We just plug in, based on this rule...whatever the rule we have been given...we plug in whatever our input is, 00:18:32.400 --> 00:18:35.700 whatever the thing on the left is, any of these numbers. 00:18:35.700 --> 00:18:42.400 And then, once we figure out what this number is here, we figure out, we evaluate, and we get what its corresponding value is on the right side. 00:18:42.400 --> 00:18:45.800 And we write that in, and that is how we make a table of values. 00:18:45.800 --> 00:18:55.600 Having this table is often a very useful way to quickly analyze and see what is happening in a function over a large range of possible inputs. 00:18:55.600 --> 00:19:01.200 Domain: the domain is the set of all inputs that the function can accept. 00:19:01.200 --> 00:19:06.100 The domain is what can go into the function: it is the inputs that we are allowed to use. 00:19:06.100 --> 00:19:09.700 It is what our machine can eat without breaking down. 00:19:09.700 --> 00:19:14.600 Well, we generally assume that all of ℝ can be used as inputs--all of the real numbers can be used as inputs. 00:19:14.600 --> 00:19:19.800 Sometimes, certain values will break our function; the output won't be able to be defined. 00:19:19.800 --> 00:19:25.600 Thus, our domain is normally going to be all of the real numbers, except those numbers that break our function. 00:19:25.600 --> 00:19:29.400 Occasionally, we might actually get things where we are going to be given an explicit domain-- 00:19:29.400 --> 00:19:34.700 like just evaluate it from -3 to 3--and forget everything beyond those -3 and 3 values. 00:19:34.700 --> 00:19:39.600 But normally, we are going to assume all of ℝ, except those things that break our function. 00:19:39.600 --> 00:19:47.700 Let's see an example: if we had f(x) = 1/x, the function would be defined, as long as we don't divide by 0. 00:19:47.700 --> 00:19:56.000 If we have x = 0, though, then f(0) gets us 1/0. 00:19:56.000 --> 00:20:02.200 Are we allowed to do that? No--that is very bad; we cannot divide by 0. 00:20:02.200 --> 00:20:05.700 So, we are not defined there; everything else works, though. 00:20:05.700 --> 00:20:08.600 If we plug in anything that isn't a 0, it works out fine. 00:20:08.600 --> 00:20:14.300 So, everything is defined, as long as x is not 0; so our domain is all numbers, except 0. 00:20:14.300 --> 00:20:20.700 The domain of f, to show all numbers except 0, is everything from -∞ up to 0, not including the 0, 00:20:20.700 --> 00:20:25.000 and then union with everything from 0, not including the 0, to ∞. 00:20:25.000 --> 00:20:29.700 That is just another way of expressing all of the real numbers, with the exception of 0. 00:20:29.700 --> 00:20:34.700 Now, for now, we mostly only have to watch out for dividing by 0 and taking square roots of negative numbers. 00:20:34.700 --> 00:20:37.200 Those are the only two things we have to worry about breaking functions. 00:20:37.200 --> 00:20:43.300 However, you can't take the square root of a negative number, because what could you square that would still have a negative with it? 00:20:43.300 --> 00:20:47.500 Any number, squared, becomes positive; so we can't have the square root of a negative number, 00:20:47.500 --> 00:20:50.000 because it would be impossible to give me a number that you could square 00:20:50.000 --> 00:20:53.300 into making it negative--at least as far as the real numbers are concerned. 00:20:53.300 --> 00:20:57.400 Later on we will talk about the complex; but that is for later. 00:20:57.400 --> 00:21:01.300 Right now, we only really have to worry about dividing by 0 and taking square roots of negative numbers. 00:21:01.300 --> 00:21:04.300 Those are the things to watch for; that is where our domain will break down. 00:21:04.300 --> 00:21:09.100 Later in the course, we will have a little bit more to worry about; we will also have to worry about inverse trigonometric functions. 00:21:09.100 --> 00:21:14.100 Those are only defined over certain things; and also logarithms have some parts that they are not allowed to take, either. 00:21:14.100 --> 00:21:17.200 But right now, it is just dividing by 0 and taking square roots of negative numbers. 00:21:17.200 --> 00:21:21.100 And later on, much later in the course, after we see these ideas, we will have to think about them, as well, 00:21:21.100 --> 00:21:24.600 when we are thinking about the idea of what can go into a function. 00:21:24.600 --> 00:21:29.300 Domain is what goes in; range is what comes out. 00:21:29.300 --> 00:21:34.400 Range is the set of all possible outputs a function can assign, given some domain. 00:21:34.400 --> 00:21:42.200 With some domain to start with, these values are what is able to come out: the range is what can come out, given some domain. 00:21:42.200 --> 00:21:46.900 These values will always be in the real numbers, unless we are dealing with a set that isn't working in the reals. 00:21:46.900 --> 00:21:49.300 But they don't necessarily cover all of the reals. 00:21:49.300 --> 00:21:53.600 For example, that function we were working with before, f(x) = x² + 3: 00:21:53.600 --> 00:21:58.900 the lowest value that f can output is 3, because the smallest number we can make with x²... 00:21:58.900 --> 00:22:03.600 well, x² always has to be greater than or equal to 0, because there is no number 00:22:03.600 --> 00:22:07.400 that we can plug into x and square that will cause it to become negative. 00:22:07.400 --> 00:22:15.500 The lowest we can get that down to is a 0, so the lowest we can make this whole thing is when this is a 0, plus 3; so the lowest possible output is 3. 00:22:15.500 --> 00:22:19.900 We can produce any value above 3 with x², though, so we can just keep going up and up. 00:22:19.900 --> 00:22:24.000 So, our range would be everything from 3, including 3, up until infinity. 00:22:24.000 --> 00:22:28.900 So, it is all of the reals from 3, including 3, and higher; great. 00:22:28.900 --> 00:22:32.800 If we want to look at an example that doesn't use numbers, we could talk about that initial function, 00:22:32.800 --> 00:22:37.000 that function that ate names and gave out first initials, from earlier in this lesson. 00:22:37.000 --> 00:22:42.600 In that case, if the domain is all names, then the range is all 26 letters of the Roman alphabet, 00:22:42.600 --> 00:22:51.700 even though I still can't think of any names that start with a Q...Queen...let's say Queen counts. 00:22:51.700 --> 00:22:59.500 OK, Queen Latifah, right?--it has to count; then, we can have that be the range--26 letters for the Roman alphabet. 00:22:59.500 --> 00:23:02.900 So, because if we are looking at all the names that could possibly exist... 00:23:02.900 --> 00:23:11.600 well, there is Albert; there is Bill; there is Charles; there is Doug; there is Elizabeth...and so on, and so on, and so forth. 00:23:11.600 --> 00:23:13.700 So, there is always something that will put that out. 00:23:13.700 --> 00:23:19.700 But if we restricted the domain to the five names that we saw earlier, Vincent, Nicole, Padma, Victor, and Takashi, 00:23:19.700 --> 00:23:24.800 then we only had four letters show up--we just had N, P, T, and V show up. 00:23:24.800 --> 00:23:29.900 So, in that case, if we restricted our domain to a smaller thing, our range would also shrink. 00:23:29.900 --> 00:23:32.400 So, the range depends on what our domain is. 00:23:32.400 --> 00:23:37.700 If we are looking at...normally we look at everything that can go into the function, and that is normally how we think of the domain. 00:23:37.700 --> 00:23:39.700 So, the range is everything that could come out. 00:23:39.700 --> 00:23:45.100 But sometimes, we will be given a more restricted domain, and we have to think in terms of that more restricted domain. 00:23:45.100 --> 00:23:47.000 All right, we are ready for some examples. 00:23:47.000 --> 00:23:50.600 First, there are nice, easy ones to get us warmed up to this idea of plugging in. 00:23:50.600 --> 00:23:53.800 If f(x) = 3x - 7, what is f(2)? 00:23:53.800 --> 00:24:06.800 We just plug in...if we use red for this...f(2)...we plug in 3; plug in that 2; minus 7...3 times 2 equals 6; 6 minus 7...so we get -1. 00:24:06.800 --> 00:24:15.200 Let's use blue for this one: if we have f(-4), then 3...we plug in that -4, minus 7. 00:24:15.200 --> 00:24:20.500 3 times -4 is -12; minus 7...we get -19. 00:24:20.500 --> 00:24:25.300 Oh, no! What if we have to use something that is variable? No problem. 00:24:25.300 --> 00:24:30.300 We still just follow the exact same rules: f(a)...well, what happened to x? 00:24:30.300 --> 00:24:39.000 It became 3x - 7, so now it is going to become 3a - 7, so we get 3a - 7. 00:24:39.000 --> 00:24:50.500 And what if we want to do b + 8? The same thing--f(b + 8) = 3(b + 8) - 7. 00:24:50.500 --> 00:24:55.500 So, we have to distribute; and notice how important it was that we put it in parentheses. 00:24:55.500 --> 00:25:00.900 If we had just plugged in this 3b + 8, that would be totally different than 3(b + 8). 00:25:00.900 --> 00:25:06.000 And that is what it really has to be, because it is everything in here that got plugged in, not just the b. 00:25:06.000 --> 00:25:09.400 The b and the 8 don't get to be separated now; they have to go in together. 00:25:09.400 --> 00:25:22.100 So, 3(b + 8) - 7...we would get 3b + 24 - 7, which is equal to 3b + 17. 00:25:22.100 --> 00:25:27.100 The next one: what if we wanted to fill in a table, g(z) = z² - 2z + 3? 00:25:27.100 --> 00:25:39.400 If we had to fill in this table, then we could do g(-1), (-1)² - 2(-1) + 3, 00:25:39.400 --> 00:25:50.700 equals 1 (-1 times -1 is 1), minus 2(-1), so plus 2, plus 3, equals 6; so we get 6 here. 00:25:50.700 --> 00:26:03.700 Next, g(0): 0² - 2(0) + 3...that simplifies to just 3, because of the 0's; they disappear. 00:26:03.700 --> 00:26:21.300 If we want to plug in g(1), then we get 1² - 2(1) + 3, so 1 - 2 + 3 comes out to 2. 00:26:21.300 --> 00:26:39.800 We plug in g(2); we get 2² - 2(2) + 3 = 4 - 4 + 3, which is 3. 00:26:39.800 --> 00:27:01.200 We plug in 10; we get 10² - 2(10) + 3; 10² is 100, minus 2 times 10 (is 20), plus 3 equals 83. 00:27:01.200 --> 00:27:05.200 There we go: so you just plug into the function exactly as you would to set up this table. 00:27:05.200 --> 00:27:14.400 You are told what your input is; and then, over on the right is your output, based on the rules of the function. 00:27:14.400 --> 00:27:24.800 The function gives us some rules, and so we plug in inputs like -1, and -1 goes through: (-1)² - 2(-1) + 3; we get 6. 00:27:24.800 --> 00:27:28.700 And that is what is going on when we are making a table of values. 00:27:28.700 --> 00:27:35.600 If h(x) = 2x² + bx + 3, and we know that h(3) = 15, what is b? 00:27:35.600 --> 00:27:40.200 So in this case, we are looking to figure out what b is. 00:27:40.200 --> 00:27:46.800 Now, we know that h(3) = 15; so we need to somehow use this to figure out b. 00:27:46.800 --> 00:27:52.600 So, we think, "I could plug in 3, and I would get something different than just 15." 00:27:52.600 --> 00:28:01.600 So, h(3), based on the rule, is 2(3²)...we are switching for where all of the x's show up; 00:28:01.600 --> 00:28:26.800 x here; x here; that is it; so 2(3²) + b(3) + 3...so we get 2(9) + 3b + 3, which is 18 + 3b + 3, or 3b + 21. 00:28:26.800 --> 00:28:35.400 Now, at this point, we say, "Right; I also know that h(3) is 15; well, this is still h(3), right?" 00:28:35.400 --> 00:28:44.800 So now, we put h(3) = 15, and we swap it out, and we get 15 must equal what we know h(3) is. 00:28:44.800 --> 00:28:50.500 We know that h(3) is equal to 3b + 21; and we also know that h(3) is equal to 15. 00:28:50.500 --> 00:28:58.800 So, since h(3) is two different things, but it is still just h(3), we know that they must be the same thing; otherwise there is no logic there, right? 00:28:58.800 --> 00:29:23.600 So, 15 = 3b + 21; we subtract 21 from both sides; we get -6 = 3b; we divide by 3 on both sides, and we get -2 = b. 00:29:23.600 --> 00:29:31.000 The next one: What is the domain and range of f(x) = 12 - √(x + 3)? 00:29:31.000 --> 00:29:54.000 Now, remember: domain is what can go in; range is what can come out. 00:29:54.000 --> 00:30:01.500 What we first one to do is figure out the domain first: what can go in without breaking this function? 00:30:01.500 --> 00:30:03.400 So, is there anything that can break in this function? 00:30:03.400 --> 00:30:11.800 We say, "Oh, right, the square root breaks when there is a negative inside." 00:30:11.800 --> 00:30:16.300 We can't take the square root of -1, because there is no number that you can give me-- 00:30:16.300 --> 00:30:21.800 at least no real number that you can give me--that would square to give us -1. 00:30:21.800 --> 00:30:25.400 You give me any positive number; it comes up positive; you give me any negative number; it comes out positive. 00:30:25.400 --> 00:30:31.300 You give me 0; it comes out 0; so there is no number you can give me that will give out a negative number when squared. 00:30:31.300 --> 00:30:34.800 So, square root breaks when we are trying to put a negative inside of it. 00:30:34.800 --> 00:30:42.500 So, when will this break? √(x + 3) breaks when we have a negative inside. 00:30:42.500 --> 00:30:50.400 So, when is (x + 3) going to be negative? when x is less than -3. 00:30:50.400 --> 00:31:00.200 So, if x is less than -3, if x is more negative than -3, then this will be a negative value inside. 00:31:00.200 --> 00:31:03.500 If, for example, we use -4, then we will get the square root of -1. 00:31:03.500 --> 00:31:08.700 If we put in negative fifty billion, then we will get the square root of negative fifty billion plus 3, which would definitely still be negative. 00:31:08.700 --> 00:31:13.300 So, it only stops being a negative inside when we actually get to -3. 00:31:13.300 --> 00:31:19.700 -3 is an allowed value, because √(-3 + 3) would be √0; we do know the square root of 0--it is 0. 00:31:19.700 --> 00:31:28.400 So, the domain works for -3 and higher; everything is still reasonable higher than that. 00:31:28.400 --> 00:31:34.800 Our domain is going to include -3, and it is going to go for anything higher than that. 00:31:34.800 --> 00:31:47.500 So, that is our domain; if we want to figure out what the range is, then the question is, "What can f(x) put out?" 00:31:47.500 --> 00:32:00.600 So, notice: we have 12 - something; that something, √(x + 3)...square root can give out any number. 00:32:00.600 --> 00:32:08.100 If you put in √0, √1, √4, √9...you are going 0, 1, 2, 3, and you can make any number in between that. 00:32:08.100 --> 00:32:12.600 12 - something...what is the smallest that something could be? 00:32:12.600 --> 00:32:25.700 The smallest number that that something could be is 0; so that is smallest when √0 = 0. 00:32:25.700 --> 00:32:36.500 The biggest number we can get is 12; 12 is the highest number we can get, the largest number we can get out of this function. 00:32:36.500 --> 00:32:41.000 What is the smallest number we can get? Well, you can just keep giving me larger and larger x 00:32:41.000 --> 00:32:45.400 to make our square root a bigger and bigger negative number, on the whole. 00:32:45.400 --> 00:32:51.100 It would be minus larger and larger numbers; so 12 minus larger and larger numbers...we can keep going down. 00:32:51.100 --> 00:33:02.100 So, any number below 12 can be achieved, because we can just keep having the square root give out slightly larger and slightly larger numbers, which... 00:33:02.100 --> 00:33:05.800 Since we are subtracting by these larger and larger numbers, we will keep going down. 00:33:05.800 --> 00:33:17.300 So, any number below 12 can be achieved; so we have our range--it is going to be everything from the lowest possible, 00:33:17.300 --> 00:33:21.800 all the way, anywhere up from negative infinity, up until 12. 00:33:21.800 --> 00:33:25.800 Now, we ask ourselves, "Can we actually achieve 12?" Yes, we can. 00:33:25.800 --> 00:33:33.200 We can actually get to 12, so we include 12; so our range is from negative infinity to 12--there is our answer. 00:33:33.200 --> 00:33:40.500 The final one: we have a word problem: Give the area of a square, A, as a function of the square's perimeter, p. 00:33:40.500 --> 00:33:45.600 And then, also say what is the domain of the area as a function of the perimeter. 00:33:45.600 --> 00:33:49.900 First, as we talked about in the word problems, let's set up what our variables are. 00:33:49.900 --> 00:34:10.800 Nicely, this problem already gave us our variables; but we will just remind ourselves: A is the area of the square, and p is the perimeter of the square. 00:34:10.800 --> 00:34:15.900 So, it also probably wouldn't hurt to draw a picture, so we could see what is going on a little more easily. 00:34:15.900 --> 00:34:25.000 We have a square here; here is our square, and we are talking about the area of it and the perimeter of it. 00:34:25.000 --> 00:34:29.500 So, that is everything that we don't immediately know: we don't know the area; we don't know the perimeter. 00:34:29.500 --> 00:34:33.500 They are going to be somehow connected, because we somehow want to be able to make a function out of area, 00:34:33.500 --> 00:34:36.600 where we plug in the perimeter, and it gives out an area. 00:34:36.600 --> 00:34:41.300 We basically want an equation that has area on the left, and then things involving perimeter. 00:34:41.300 --> 00:34:46.600 We are solving for area in terms of perimeter; that is another way of looking at what this function is going to be. 00:34:46.600 --> 00:34:52.600 We need some way to be able to connect these two ideas: how can we connect the area of a square to its perimeter? 00:34:52.600 --> 00:34:58.900 Well, maybe we don't see a way right away; but let's just think, "Well, how do you find the area of a square?" 00:34:58.900 --> 00:35:05.400 Well, it is its side times its side, its side squared; so the area of a square... 00:35:05.400 --> 00:35:14.000 Now, we might as well go back, and we will set up a new variable--we didn't have that before--side of square. 00:35:14.000 --> 00:35:20.000 A side of the square is a way to get our area; so area equals side squared. 00:35:20.000 --> 00:35:23.000 Now, we still want some way to connect the area to the perimeter. 00:35:23.000 --> 00:35:28.900 So, what we want is...well, we might not be able to correct them directly, but we have area connected to sides. 00:35:28.900 --> 00:35:35.100 Maybe we can connect perimeter to side...oh, right, yes...if you have forgotten what a perimeter is, what do you do? 00:35:35.100 --> 00:35:40.000 You just go and look it up: you have access to all sorts of information at your fingertips--it is so easy. 00:35:40.000 --> 00:35:43.900 If you look up perimeter, thinking, "Oh, I have heard this before; I can't remember what it is," 00:35:43.900 --> 00:35:48.100 type it into an Internet search; the next thing you know, you will have a definition for what perimeter is. 00:35:48.100 --> 00:36:00.000 So, perimeter is all of the sides added together; we have four sides, so perimeter is equal to side + side + side + side-- 00:36:00.000 --> 00:36:04.400 all of the sides of our square, or 4s. 00:36:04.400 --> 00:36:08.300 So now, we have a way of being able to have area talk to perimeter. 00:36:08.300 --> 00:36:18.200 Area equals side squared; perimeter equals 4 times side; so perimeter/4 equals side. 00:36:18.200 --> 00:36:22.700 Now, we can take this, and we can plug it in here. 00:36:22.700 --> 00:36:30.000 Area equals...since we are plugging and we are substituting, we do it with parentheses...squared. 00:36:30.000 --> 00:36:36.600 Area equals perimeter squared, over 16 (we have to square the top and the bottom). 00:36:36.600 --> 00:36:41.300 And there we are--we can think of area equals perimeter squared over 16 as a function, 00:36:41.300 --> 00:36:45.000 because it only depends on what we plug in for perimeter. 00:36:45.000 --> 00:36:50.200 Area will vary as we put in different things; so we can think of it as a function acting on perimeter. 00:36:50.200 --> 00:36:54.100 We plug in the number from perimeter, and it gives out what the area has to be. 00:36:54.100 --> 00:37:03.200 So, we can just rewrite this as: area is a function of perimeter, or it is equal to the perimeter squared, over 16. 00:37:03.200 --> 00:37:08.900 It is just a different way of thinking about it: we can think of it as an equation, or we can think of it as a function 00:37:08.900 --> 00:37:12.700 where it just works the exact same way that the equation worked. 00:37:12.700 --> 00:37:18.000 There is no functional difference between area of perimeter equals perimeter squared over 16-- 00:37:18.000 --> 00:37:25.000 the area based on a function using our perimeter equals p²/16--compared to area equals p²/16. 00:37:25.000 --> 00:37:29.300 They have the same effect; it is just two slightly different ways of talking about it. 00:37:29.300 --> 00:37:34.900 But in either case, it is plugging in a number for perimeter, then figuring out what the area has to be. 00:37:34.900 --> 00:37:39.900 That is a function for area as a function of a square's perimeter. 00:37:39.900 --> 00:37:49.100 Now, how can we get its domain? We talked about, before: the domain is everything that we can plug in without breaking it. 00:37:49.100 --> 00:37:52.400 Now, that is mostly true; but there is one little thing here. 00:37:52.400 --> 00:37:58.500 The domain also has to make sense; we can't break the world. 00:37:58.500 --> 00:38:03.900 We wouldn't break this function...we could plug anything we want into this function. 00:38:03.900 --> 00:38:08.900 You plug in any real number in for p, and it would make sense; we would get a number out of it. 00:38:08.900 --> 00:38:14.300 You can plug in 50; you can plug in 0; you could plug in -10; it makes sense--we would get a number out of it. 00:38:14.300 --> 00:38:27.300 But the domain has to make sense; it doesn't have to just make sense in our function--it has to make sense in how we have thought about the function. 00:38:27.300 --> 00:38:31.500 How did we think about the function? It is a square, right? 00:38:31.500 --> 00:38:36.900 It is a real object--it is a thing; we could talk about its shape and how its dimensions are. 00:38:36.900 --> 00:38:44.400 Would it make sense for it to have a perimeter of a negative? No, because it doesn't make sense for the sides to be negative. 00:38:44.400 --> 00:38:49.300 Would it make sense for the perimeter to be 0? No, because then it would just be a speck--it wouldn't be a square. 00:38:49.300 --> 00:38:54.800 There would be no area possible to be contained inside, because we would have no side lengths if we had a perimeter of 0. 00:38:54.800 --> 00:39:03.800 So, it must be the case that our p, perimeter, is allowed to vary only from 0 up to infinity, 00:39:03.800 --> 00:39:07.800 because it can't have a domain below 0, and it can't have a domain of 0, 00:39:07.800 --> 00:39:13.900 because while it doesn't break our function itself, it breaks the idea of what the function means. 00:39:13.900 --> 00:39:19.000 It is meaningless to talk about plugging in a perimeter that is negative or a perimeter that is 0, 00:39:19.000 --> 00:39:22.000 because then it is not the perimeter of anything; we don't actually have a shape there. 00:39:22.000 --> 00:39:25.300 We have to be having our domain make sense, as well. 00:39:25.300 --> 00:39:27.700 If we just have a function, it can't break the function. 00:39:27.700 --> 00:39:33.900 But if we have the function in the context of a word problem, it also has to make sense with everything else happening in the word problem. 00:39:33.900 --> 00:39:37.900 All right, I hope that all made sense, because that just laid an important groundwork. 00:39:37.900 --> 00:39:41.200 You are going to need to know this for the rest of your time in math. 00:39:41.200 --> 00:39:42.600 So, it is really great that we got this covered here. 00:39:42.600 --> 00:39:46.300 Having a really strong understanding of what it means for something to be a function 00:39:46.300 --> 00:39:48.300 is going to help you out in so many different places in math. 00:39:48.300 --> 00:39:51.600 It is going to help you with all sorts of things--it is really great that we covered that here. 00:39:51.600 --> 00:39:54.000 All right, see you at Educator.com later--goodbye!