Floor and Ceiling Functions
Lesson · Intermediate
Algebra
Floor Function
The floor of a real number x, written
is the greatest integer less than or equal to x.
Equivalently,
For example,
and

Ceiling Function
The ceiling of a real number x, written
is the smallest integer greater than or equal to x.
Equivalently,
For example,
and

If n is an integer, then
If x is not an integer, then
The floor function does not mean simply deleting the decimal part.
For example,
because -4 is the greatest integer satisfying
Similarly,
For an integer n,
and
If n is an integer, then
and
Let
Then
Adding an integer n,
Therefore,
The ceiling version follows similarly.
Floor and ceiling are related by
and
Let
Then
Multiplying by -1 reverses the inequalities:
Therefore,
Hence,
Similarly,
The fractional part of x is
Therefore,
where
For example,
while
Since
and
adding gives
Since the quantities involving floors are integers, it follows that
Thus,
can only be one of
or
Solve
By the definition of floor,
Adding 1,
Dividing by 2,
Solve
Write
where
Then
Since
we have
Thus,
The only possibility is
Therefore,
Hence,
Find all real x satisfying
If x were an integer, then
which is even and therefore cannot equal 9.
Thus x is not an integer.
Let
Then
Therefore,
so
Since x is not an integer,
Solve
for integer x.
Case 1: x is even.
Write
Then
Thus we would need
which is impossible because 2k is even.
Case 2: x is odd.
Write
Then
Therefore,
so
If x is an integer,
If x is not an integer,
Therefore,
If x is not an integer,
If x is an integer,
For positive integers d and n, the number of positive multiples of d not exceeding n is
For example, the number of positive multiples of 7 not exceeding 100 is
For an integer n and a positive integer d,
where
Thus,
is the quotient when n is divided by d.
For a real number x and a positive integer n,
This can simplify expressions containing several floor functions.
Do not truncate negative numbers:
not
Similarly,
Do not assume
For example,
while
Do not assume
Do not forget which endpoint is included:
whereas