 # Ceiling Function

If you look at mathematics and computer programming, there are two important functions that are used quite often. One is called the floor function and the other is called the ceiling function. The ceiling function, that is also called as the least integer function, of a real number x, denoted by ⌈x⌉, is defined as the smallest integer which is not smaller than x.

For example, the floor and ceiling of the decimal 2.31 is 2 and 3 respectively.  Hence, with the help of these two functions, you can get the nearest integer in a number line of the given decimal.

The ceiling function is related to the floor function by the formula

⌈x ⌉= − ⌊−x⌋

In this article, we would look at what is ceiling function and floor function, the ceiling function definition, properties, and examples.

Ceiling Function Definition

Ceiling function is a type of function in which the given smallest successive integer is returned. In simpler words, the ceiling function of a given real number x is the least integer which is greater than or equal to the number x. The ceiling function is defined as follows:

f (x) = minimum { a ∈ Z ; a ≥ x }

Ceiling Function Symbol

The ceiling function is also known as the smallest integer function. The notation for representing this function is ⌈ ⌉. It can be used as follows:

⌈x⌉ or ceil (x) or f(x) = ⌈x⌉

The symbol of the floor function is also a kind of square bracket with the bottom part missing, such as

⌊ ⌋.

Ceiling Function Properties

Consider that x and y are two given real numbers and ceil (x) = ⌈x⌉. Let us now take a look at some of the important properties of the ceiling functions:

1. ⌈x⌉ + ⌈y⌉ – 1 ≤ ⌈x + y⌉ ≤ ⌈x⌉ + ⌈y⌉

2. ⌈x + a⌉ = ⌈x⌉ + a

3. ⌈x⌉ = a; if x ≤ a < x + 1

4. ⌈x⌉ = a; if x – 1 < a ≤ x

5. a < ⌈x⌉ if a < x

6. a ≤ ⌈x⌉ if x < a

Ceiling Function Graph

The ceiling function graph is a discrete graph which contains discontinuous line segments with one end with a dark dot, which is a closed interval, and the other end with an open circle, which is an open interval. The ceiling function is a type of step function because it looks like a staircase.

The graph of ceiling function is as follows:

Difference Between Ceiling Function and Floor Function

The ceiling function and the floor function both have different definitions. The ceiling function returns the smallest value, whereas the floor function returns the largest value for the specific number. However, the ceiling and floor of an integer remains the same. Consider the floor and ceiling of 4 to be 4 for both of them. Both these functions are represented by a square brackets sign, however, with the top and the bottom parts missing. Also, another difference can be found when you use the graph. In the graph of the ceiling function, it has an open dot on the left and the solid dot on the right. However, for the floor function, it is opposite. This means that there is a solid dot on the left and the open dot on the right.

Ceiling Function Example

Example 1:

Find all the possible solutions to ⌈x⌉⌈2x⌉ = 15.

Solution:

The first step is to write x = n − r.

Then write ⌈2x⌉ = 2n or 2n-1 depending on the value of r.

Considering the first case where r  < $\frac{1}{2}$, the equation would become 2n2 = 15, which does not have any solution.

Considering the second case where r > $\frac{1}{2}$, the equation would become n(2n - 1) = 15.

Hence,

2n2 - n - 15 = 0

Solving this gives you

(n − 3)(2n + 5) = 0

Hence, the only integer solution you get is n = 3.

Hence, the range of the solution is given by the interval (2, 2.5).