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.