What is a Function?
It all begins with an idea.
A function is one of the most fundamental concepts in calculus. Here is the most basic one:
y = f(x)
In algebra, students are often taught to use methods such as substitution and elimination to solve equations like y = x + 4. In calculus, you will see functions that are very similar except that you will commonly see them written using f(x):
f(x) = x +4
How Does a Function Work?
Think of a function like a machine that you put a certain number into. The machine then gives you a different number based on the number you put in.
For example, say you have a machine that adds 1 to any number that you put in. If you put a 1 into it, the machine will give you a 2. If you put a 53 into it, you will get a 54. We could write this function like this:
y = f(x + 1)
The x represents the number that you put into the machine, and the y represents the number that the machine gives you. The y value will change depending on the number that you put into the machine (the x value). For this reason, we call the y value the dependent value, and the x number is the independent value.
We can also illustrate this function using an input/output table. Using the example of a function that adds one to the number you put in, y = f(x +1), the numbers would look like this:
The first column represents all the numbers you put into the machine. These are the x values of your function. The second column (on the right) is all the numbers that the machine will give you after adding 1. These are the y values of your function.
How to Solve a Function for y
To solve a function for its y value, input a given number into the function. We do this by replacing all the values of x in the function with the number given to us in the question.
Here’s an example:
Vertical Line Test
In order to test whether a given equation is a function, use the Vertical Line Test. Graph the function (see our lesson on how to graph functions here) or if provided, look at the graph of the function, and draw a vertical line through it. Look for areas where the line touches parts of the graph. Does the vertical line only touch the graph once?
In the image above, we drew a vertical line through the graph. Because the pink line only intersects the graph once, this is a function.
However, if the vertical line touches the graph more than once, it is not a function. Here’s an example:
In this example, the pink vertical line intersects the graph twice so I know that this graph does not represent a function.
Why does the Vertical Line Test work? In a function, there can only be one value of y for each value of x. If you plug a 2 into your function machine, you cannot get both a 1 and a 3 from it. You can only get one value. For example, perhaps if you plug a 2 into the function machine, you get a 4 and nothing else. That would be a function. So, when a function is represented on a coordinate plane, the curve cannot intersect a value of y twice at the same point of x, as it does in the image above.
Key Points to Remember:
A function is an equation where one variable depends on the value of another variable.
y = f(x) so if you are asked to solve for f(x), you are solving for the y value.
To solve for y, input the given value of x into the function and solve.
To test whether something is a function, use the vertical line test on the graph of that function. Check to see if the vertical line intersects the graph more than once. If so, it’s not a function.
Additional Resources
Here is an excellent video from Organic Chemistry Tutor that covers the definition of a function, the vertical line test, common types of functions, and how to solve a function.
This video from Khan Academy describes functions using inputs and outputs and demonstrates how the Vertical Line Test works.
This video from MathEase is a quick 3-minute overview of what a function is, including excellent visual examples.
This article by Third Space Learning provides clear examples of what a function is and how it is represented through the use of several examples.
https://thirdspacelearning.com/us/math-resources/topic-guides/algebra/what-is-a-function/
Graphing Functions
It all begins with an idea.
To plot a function on a coordinate plane, it is often helpful to choose a few values of x and plug them into your given function. Solve for y and then use those coordinates to plot a general outline of your graph.
Here’s an example. I like to choose at least three values of x: one negative value, zero, and one positive value.
Now we have chosen to calculate what our y value would be when x is equal to -1, 0, and 1. Using this information, we can now create three different sets of coordinates using these x and y values: (-1, 1), (0, 0), and (1, 1).
Next, we are going to plot each of these coordinates on a coordinate plane:
Now that we have plotted each of the coordinates on the graph, draw a line to connect each of the dots.
Then we can extend the line in either direction and add an arrow because the line will continue on forever, which we call ‘infinity.’
Now we have successfully graphed the function!
Things to Remember
To graph a function, choose a few values of x and solve for y to create coordinate points.
Plot those points on the coordinate plane.
Connect the points on the plane and extend the lines into infinity.
Additional Resources
Need more help? Check out these resources to help you learn more!
Floor and Ceiling Functions
The floor and ceiling functions are functions that give us the integers that are closest to a given number, x. To start, let’s review what an integer is.
An integer can be a positive or negative number without fractions or decimals. Zero is also an integer. So, the list of integers would be …..-3, -2, -1, 0, 1, 2, 3, … continuing for infinity in both directions.
Is 17 an integer?
Yes, 17 is an integer because it is a whole number without any fractions or decimals.
Is 3.5 an integer?
No, 3.5 is not an integer because it includes a decimal.
Is -6 an integer?
Yes, -6 is an integer because it is a whole number without any fractions or decimals.
Integer Floor Function
The floor function looks like this:
This function includes two brackets around the x, which is our unknown value. To help remember what this function is called, think about the straight lines at the bottom of the brackets as being the floor that the x is standing on.
The floor function is also called the greatest integer function because it gives us the greatest integer less than or equal to x. We can remember this by picturing that the floor is beneath the x value, so we need to find an integer that is less than or “below” the given number, which is 5.4 in the example above.
Using the example above, what is the greatest (or largest) integer that is closest to 5.4?
It can be helpful to use a number line to illustrate this principle:
Here we have a number line with a list of integer from 3 to 8. The number 5.4 is labeled above, sitting between the integers 5 and 6. The floor function (or the greatest integer function) asks us to find the greatest integer that is less than or equal to the number 5.4. We know the integer cannot be equal to 5.4 because 5.4 is not an integer. So, what is the great integer on our number line that is less than 5.4? The answer is the integer 5. That is the closest we can get on the number line without going higher than 5.4.
Integer Ceiling Function
The ceiling function looks like this:
It helps to remember that this function is the ceiling function by imagining that the tops of the brackets form a ceiling to cover the x.
The ceiling function is also called the least integer function because it finds the smallest integer that is greater than or equal to our given number, which in the example above is 1.8. We can remember this by thinking about how the ceiling is higher than the number, so we need to find an integer that is greater than or “bigger than” the number we are given (1.8 in the example above).
To solve for x in the example above, we need to find the closest integer that is greater than 1.8. We know that it won’t be equal to 1.8 because 1.8 is not an integer.
It can be helpful to visualize this concept using a number line:
On this number line, we see a list of integers and 1.8 plotted on the number line between 1 and 2.
For the ceiling function, we are asked to find the smallest integer that is greater than or equal to 1.8. Looking at the number line, the first integer that is “bigger” than 1.8 is the integer 2. So, our answer is 2.
Practice Problems:
Test your understanding by trying out these practice problems! Then check your answers at the end.
Answers:
0
We are asked to find the greatest integer that is less than or equal to 3/4. If we picture a number line, 3/4 is in between the integers 0 and 1. So 0 is the greatest integer less than 3/4.
-5
Now we were asked to use the ceiling function to find the smallest integer that is greater than or equal to -5.9. If we were to plot -5.9 on a number line, it would be between the integers -6 and -5. We have to be careful with negative numbers because as we move to the right on the number line, the numbers become greater. So, -5 is the closest integer to -5.9 that is greater in value.
7
This time, we used the floor function to find the greatest integer less than or equal to 7. Because 7 is an integer, the answer is 7.
Key Points To Remember:
The floor function is used to find the greatest integer that is less than or equal to a given value of x. Think of this as “rounding down” to the nearest integer.
The ceiling function is used to find the smallest integer that is greater than or equal to a given value of x. Think of this as “rounding up” to the nearest integer.
Additional Resources:
Want some more resources? Here are a few articles and videos that may be helpful:
This video does an excellent job of defining floor functions and walking through several examples in depth.