F(x) is basically just a y output.
Now, when we plug 5 into the f function, instead of saying y = 26, we say f(5) = 26. This tells us that we used the f function and 5 was our input - much more informative! By this same logic, g(-2) = -9. Also, now instead of having to say the f function is x^2 + 1 and the g function is 3(x - 1), we can simply write f(x) = x^2 + 1 and g(x) = 3(x - 1). Again, these are basically the same as y =, so if you see an f(x) and get freaked out, don't worry - it's basically just a y.
This way of writing f(x) or g(x) instead of y is called function notation and is going to be used throughout math and science classes from now on.
Before we finish, I have to clarify one thing I said earlier. When I said that a function was just another way of saying equation or rule, I wasn't being entirely honest. The reason is that functions are a special breed of equation. Not every equation gets to be a function - there is a test you have to pass first. In order to illustrate what that test is, I'm going to use an analogy.
Enjoy Slurp
Let's say we've got a soda machine. It could be called a function, right? I mean, you push the button telling it what kind of soda you want - the input - and then it spits one out - the output. Alright, well, for lack of a better word, let's say this is a Slurp machine. It has three buttons on top that will all give you regular Slurp, two buttons for Diet Slurp, one for Dr. Slurp, one for Extreme Slurp and finally one for Fruity Slurp. This is pretty normal to see. There are three for regular Slurp because that's the most popular one, so there needs to be a bunch of it. Diet Slurp is pretty popular, so it gets two, while the rest only have one because they don't sell as well.
Now let's say we're going to use this machine. You and I walk up to it and both decide to get Dr. Slurp. You push the Dr. Slurp button, and your Dr. Slurp pops out - cool. Now I do the same thing - push the same Dr. Slurp button - but then Extreme Slurp comes out! What? That's not what I asked for! You pushed Dr. Slurp, and it gave you what you wanted, but when I pushed the exact same button, I got Extreme Slurp! This machine is broken. I want my money back!
Okay. I'll calm back down and re-focus. The reason I tell this story is that functions are just like the Slurp machine was. They're allowed to have multiple buttons that give you the same thing, but if one button sometimes gives you this and sometimes gives you that, it's broken and not a function at all.
Saying this in math sounds like this: multiple inputs can have the same output, but one input cannot lead to multiple outputs. Each input must have a unique output. Let's look at a few example problems and decide whether or not they are functions.
Function and Relation Examples
The most basic type of function we can have is just a pairing of input values with output values, like this: (2,3) (5,6) (7,8). This tells us that when 2 is plugged in, 3 is the output; when 5 is plugged in, 6 is the output; and so on. We can agree that this is a function because each input always gives you the same output. 2 always gives you 3, 5 always gives you 6, and 7 always gives you 8.
This one (2,1) (3,1) (4,1) (5,1) (6,2) is also okay because each input always gives you the same thing. Remember that it is okay to have multiple buttons that give you the same thing, like you see here with 2, 3, 4 and 5 all giving you 1.
But here (1,2) (1,3) (1,4) (2,5) we run into a problem because the input 1 has multiple outputs. Sometimes 1 will give you 2, but sometimes it'll give you 3 and sometimes even 4. Since it is not a function, it is simply called a 'relation.'
Vertical Line Testing
This graph is not a function because there are three spots on the line that go with the x-value.
We can also tell whether or not something is a function by looking at its graph. Here, I know that this is a function because for any x-value I pick, there is only one spot on the line that goes with that value. But for this graph now, right away I can tell it is not a function because for any x-value right in the middle here, there are actually three different spots on the line that go with it. Even though these parts of the graph are okay, the fact that this part here in the middle exists ruins it all, and it's therefore not a function.
What we are doing here is called the vertical line test. It's basically just a trick you can use to see whether a graph is a function or not. By dragging an imaginary vertical line over the graph and checking to see if there is ever a point where your line touches the graph in two places, you can tell if it's a function. If the line ever, even just once, touches the graph in two or more spots, it is not a function. If this isn't the case, it's all good, passes the test and is indeed a function.
Lesson Summary
A function is a special kind of equation that you can plug numbers into and get something new out. Instead of labeling these equations with y =, we often use f(x) or g(x) because they tell us a lot more information than just a plain y does. This is called function notation. The letters f and g are most commonly used, but any kind of letter can actually be used.
Not all equations are functions. While it is okay to have multiple inputs leading to the same outputs (or multiple buttons for the same soda), it is not okay to have multiple outputs for one input (one button that sometimes gives you one thing and sometimes another). If we are looking at a graph of an equation, we can test whether or not it is a function with the vertical line test. If this imaginary vertical line that we drag across the graph ever touches the graph in more than one spot, it's not a function, but if it doesn't, it is!