# Section 3.1 – Definition of a function

In this video, we’re going to be looking
at section 3.1 where we’re going to discuss functions. The first line
we have here is the textbook definition of a function, it says the function is
relation that associates each element in the domain, which is typically the
x-values, with exactly one element in the range, which is typically the y-values.
All right what does that mean? Well the best explanation I can give you is to
think of it like a multiple-choice test. If I ask you guys a question I need
everybody to have the same answer. If half the class has one answer the other
half the class has another answer and you’re both right and that’s going to be
a problem. We need to have just one correct answer. If I ask you
for the answer to number one everybody should say the same thing, let’s say “b”. If
I ask you for the answer to number two we should all have the same answer for number
three, four and so on. Everybody has to have the same answer. Can they repeat? Of
course because we typically have A B C and D for answers so they’re going to
have to repeat. That’s alright as long as everybody has just one correct answer
for each question. That’s the idea for a function: when we plug in
a value for x we all have to get the same value for y, just one value, so let’s
look at these two examples and see how they work with this idea of functions.
We’re starting with our domain, that’s our starting values, and our function
takes them to another value, which we call the range. So far our first example
here 1 goes to A, 2 goes to B, 3 goes to C, 4 goes to B. We want to know, is this
function? Well think of it in terms of our multiple-choice test: if I ask you
the answer to one you say A, I ask you the answer to 2 you say B, 3 you say C, 4 you say B. Does everybody have the correct answer for that? Yes everything
is fine. Is it okay that 2 & 4 go to the same place? Yes as long as each one has
its own answer. So for this one we say yes, this is a
function. Now let’s look at this one. 1 goes to A, 2 goes to B, 2 goes to C, 3 goes
to D. Is this one a function? If I asked you to answer to 1 you say A.
If I ask you to answer to 2, well we’ve got a problem. Which one you circle? B
or C? That’s the problem right there. Is this a function? And
the answer is no. All right now, since we don’t normally deal with blobs and arrows
and math class, we need a way to look at this in terms of the things that we do
look at either equations or graphs. One easy way to look at a relation
and decide if it’s a function or not is something called the vertical line test. This is actually out of section 3.2 but it makes more sense to me to put it here
we’re talking about functions. The vertical line test says a set of points is
the graph of a function if and only if every vertical line intersects and at
most one spot. What that means is as you’re going across, typically you go left to right, any vertical line that you could possibly draw cannot intersect in
more than one point. It’s okay if there’s zero, but there can’t be more than one.
One way to do this is to take your pen or pencil and just swipe across from
left to right and see if your pen or pencil would intersect in more than one
spot. Now I can’t do that so we’re going to draw a line. Let’s look at this
first one. Any vertical line that I could possibly
draw, could it possibly intersect in more than one spot? Well no we can see as we go along here no matter where I draw a vertical line it’s only going to
intersect in one spot. Even over here if it starts to look like it’s going
vertical, these graphs almost never ever go vertical, it would have to be a special
case. Even if it looks like it’s going vertical, if you were to zoom in, it
wouldn’t be and it’s still only going to intersect in one spot. We only
intersect in one spot so this is this a function? We would say yes it is a
function. Next one is a circle. Perfectly good relation, we’ve looked at
already. Is a function though? And the answer would be no because I can
draw a vertical line that goes through and two places.What that
means is my vertical line is playing the role of X, so x equals some number,
and what happens is let’s say when X is negative 2. This is negative 2. When X is
negative 2 I’ve got a y-value here and I’ve got a y-value here so that looks
like this this over here, where we’re going to this one and this one. That’s
not a function so we would say no. How about this one over here I’ve got no
intersection points over here, that’s okay, but when I get over here, we’ve got
two intersection points and that’s a problem. So this one is also not a
function. That’s the vertical line test, drawing vertical lines through
your graph to see if it is or is not a function. Now that we’ve
established that we do have function we can use function notation and the key to
function notation here is that Y is going to be the same as “f of x”. Normally
in math and we have parentheses it means times but this is an exception “f of x”.
When you see a function it’s going to have these parentheses and then
some value inside of it. Those go together you cannot take them apart. Let’s say we have y is equal to x squared plus 4 this is a function, so we
could also write it as f of x equals x squared plus 4. These mean the same thing y equals x squared plus 4 and f of X equals x squared plus 4. Now why would
you want to use function notation? Well it’s more sophisticated. Sometimes when
we do things in math it is a much easier way to track things. Let’s say we have,
well let’s use these two, so we have y equals x squared plus 4 versus f of X equals x
squared plus 4. All right and let’s say we want to know what value Y is
when X is different values. Let’s say we do X is equal to 2. We would plug that
in. We get y is equal to 2 squared plus 4. So
Y is equal to 4 plus 4 which is 8. And let’s say that we want to do X is equal
to 3 so we would plug 3 in. 3 squared plus 4 so it’s going to be 9 plus 4 is 13. And
let’s say want to do X is equal to 4 so Y is equal to 4 squared plus 4. 16
plus 4 is 20. Okay so this might be what we did before or we might have set up a
table to keep track of our x and y values. Now with function notation, we can do that all in one step. When X is
2 that’s going to go right here and we’re going to say f of 2. What is our
function value or Y value when X is 2? And whatever goes inside the parenthesis
here is going to replace X. I’m going to replace X with 2 anyway that there was
an X is now going to become a 2. I get 2 squared plus 4, 4 plus 4 is 8. All right,
so when I plug in 3, now X is going to become 3 so anywhere there was an X is
now going to become a 3. 9 plus 4 is 13. And f of 4, anywhere there was an X it’s
now going to become a 4 and we get 4 squared plus 4. 16 plus 4 is 20.
So you can see we get the same numbers. 2 and 8, 3 and 13, 4 and 20, but over here
when I look at this I know this is my x value and this is my function value or
my Y value because they’re the same thing. So I know when X is 3, y is 13 when X is 4, y is 20. It’s just a little bit more sophisticated as far as as
record-keeping and as far as being able to look at somebody else’s work and know
exactly what they were doing. All right now let’s go back to f of X is equal to
x squared plus 4. We can plug in numbers it looks just like this. One way
that function notation is different from X and y notation is that we can also
plug in other variables. If let’s say we’re talking about
things in terms of X here but maybe we want to talk about acceleration for “a”
but we want the same function. We could also have this function in terms of “a” so
all of the X’s would become “a” so we’d have an F of a is equal to a squared
plus four. Same function just a different letter. We could also do something like f
of X plus two. Now this one seems a little strange because we’re trading X
for something with an X so it seems a little weird but just to remember
whatever was here is going to become whatever is here. So X is going to become
X plus two this is a substitution. X is going to become X plus two. You
see that? So x squared becomes X plus 2 squared. X becomes X plus two and then if you need to neaten that up a little bit you can, usually the book wants you to
multiply these out, so we’ll stick with that pattern. Remember when you
multiply out an exponent it doesn’t distribute you have to multiply it out
in FOIL. I’m going to x squared plus four X plus four plus four right here. We get x squared plus four X plus 8 for our final answer.