If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains ***.kastatic.org** and ***.kasandbox.org** are unblocked.

Main content

Current time:0:00Total duration:7:57

CCSS.Math: , ,

a function and I'm gonna speak about it in very abstract terms right now is something that will take an input it will take an input and it'll munch on that input and look at that input will do something that input and based on what that input is it will produce a given a given output so what is an example of a function so I could have something like f of f of X and X tends to be the variable most used for an input into the function and the name of a function tends to be f tends to be the most used variable but we'll see that you can use others but we could have f of X is equal to is equal to let's say x squared if if X is even and let's say it is equal to X plus 5 if X is if X is odd so what would happen if we input 2 into this function and the way that we would denote inputting 2 is that we would want to evaluate F of 2 this is saying let's input 2 into our function f and everywhere we see this X here this variable you can kind of use as a placeholder let's replace it with our input so let's see if 2 is even do 2 squared if 2 is odd do 2 plus 5 well 2 is even so we're going to do 2 squared so in this case f of 2 is going to be 2 squared or 4 now what would F of F of 3 be well once again everywhere we see this variable we'll replace it with our input we'll replace it with our input so f of 3 so 3 squared if 3 is even 3 plus 5 if 3 is odd well 3 is odd so it's going to be 3 plus 5 it is going to be equal to 8 now you might say okay that's a neat salad this was kind of an interesting way to define a function a way to kind of munch on these numbers but you know I could have done this with traditional equations in some ways if you allowed me to use the squirrely bracket thing what what what can a function do that maybe my traditional toolkits might have not been as expressive about well you could even do a function like this you could have an let me let me not use F and X anymore just to show you that the notation is more general than that so I could say H of a is equal to is equal to the the next largest largest number number that starts with the same letter the same letter as variable a now says as variable a and we're gonna assume that we are dealing in English so given that what is H of what is H of two going to be well two starts with a T what's the next largest number that starts with a T well it's going to be it's going to be equal to three now what would H of I don't know let's think about this what would H of H of eight be equal to well eight starts with an e the next largest number that starts with an e so it's not nine ten it would be it would be 11 and so now you see it's a very very very general tool this function is that this box this H function that we just defined will look at it will look at the letter that the the number starts with in English and then so it's doing this really really really really wacky thing now not all functions have to be this wacky in fact you have already been dealing with functions you have seen things like you have seen things like Y is equal to X plus 1 this can be viewed as a function we could write this as Y is a function of X which is equal to X plus 1 if you give as an input as you give as an input so let me write it this way so for example when we could when x is 0 we could say f of 0 is equal to well you take 0 you add it's equal to one F of two is equal to two you've already done this before you've done things where you said look let me make a table of X let me take and and put our Y's there when x is 0 Y is 1 when X is 2 I'm sorry this was when X is I mean a little mistake where F of 2 is equal to 3 and you've done this before with tables where you say look x and y when x is 0 Y is 1 when X is 2 y is 3 so this you might say well what was the whole point of using the function notation here to save f of X is equal to X plus 1 and the whole point is to think in these more general terms for something like this you didn't really have to in introduced function notations but it doesn't hurt to introduce function notations because it makes it very clear that the function takes an input takes my X and in this definition it munches on it it says ok X plus 1 and then it produces 1 more than it so here whatever the input is the output is 1 more than that original function now I know what you're asking all right well what is not a function then well remember we said a function is something that takes an input and produces only one possible output for that given input so for example something like and let me look at a visual way of thinking about a function this time or a relationship I should say so let's say that's our y-axis and this right over here is our x-axis and let me let me draw a circle here that has radius let me draw a circle here that has radius 2 so it's a circle of radius 2 this is negative 2 this is positive 2 this is negative 2 so my circle it's centered at the origin it has radius 2 so that's my best attempt at drawing at drawing the circle we fill it in so this is a circle the equation of a circle of this circle is going to be x squared plus y squared is equal to the radius squared is equal to 2 squared or it's equal to 4 so the question is is this relationship between x and y here I've expressed it as equation here I've visually drawn all of the X's and that satisfy this equation is this relationship between x and y a function and we can see visually that it's not going to be a function you pick a given X let's say X is equal to 1 let's say X is equal to 1 there's two possible Y's that are associated with it this Y up here and this Y down here we can even solve for that by looking at the equation when X is equal to 1 we get 1 squared plus y squared is equal to 4 1 plus y is equal to Y squared is equal to 4 or subtracting 1 from both sides Y squared is equal to 3 or Y is equal to the positive or the negative square root of 3 this right over here is the positive square root of 3 and this right over here is the negative square root of 3 so this situation this relationship where I inputted a 1 into my my little box here and associated with the one I associate both a positive square root of 3 and a negative square root of 3 this is not this is not a not a function I cannot want associate with my input to different outputs I can only have one output for a given input