Floor and Ceiling Function — Definition and Examples

Floor and Ceiling Function — Definition and Examples

TL;DR

The floor function ⌊x⌋ gives the greatest integer less than or equal to x, and the ceiling function ⌈x⌉ gives the least integer greater than or equal to x. This article covers their notation, graphs, properties, and worked examples, plus the negative-number trap that costs the most marks.

What Are the Floor and Ceiling Functions?

The floor function, written ⌊x⌋, returns the greatest integer that is less than or equal to x. The ceiling function, written ⌈x⌉, returns the least integer that is greater than or equal to x. In plain terms, floor rounds down to the nearest integer and ceiling rounds up.

For ( x=3.2 ): ⌊3.2⌋=3 and ⌈3.2⌉=4. When x is already an integer, both agree: ⌊5⌋=⌈5⌉=5.

How Do You Read the Notation?

The square-bottomed brackets ⌊⌋ mean floor, and the square-topped brackets ⌈⌉ mean ceiling. A quick memory anchor:

Floor and Ceiling Function Formula

Stated precisely with set-builder notation:

⌊x⌋=max{n∈Z:n≤x}

⌈x⌉=min{n∈Z:n≥x}

In words, floor is the largest integer no bigger than x, and ceiling is the smallest integer no smaller than x. The variable key below keeps the symbols straight.

Symbol Meaning
x Any real number (the input)
n An integer chosen from Z (the output)
Z The set of all integers {…,−2,−1,0,1,2,…}
⌊x⌋ Floor of x: the greatest integer ≤x
⌈x⌉ Ceiling of x: the least integer ≥x

What Do Their Graphs Look Like?

Both functions produce a staircase graph made of flat horizontal segments. Each step is one unit wide and jumps by one unit at every integer.

Which Properties Should You Know?

A handful of identities cover almost every problem. Each holds for any real x and integer n.

Examples of the Floor and Ceiling Function

The examples move from a single value up to an applied problem. Work each line before reading the next.

Example 1

Evaluate ⌊4.7⌋ and ⌈4.7⌉.

Example 2

Evaluate ⌊−2.3⌋.

Example 3

Evaluate ⌈−2.3⌉.

Example 4

Simplify ⌊3.6+5⌋ using the integer-shift property.

Example 5

Evaluate f(x)=⌈3x−5⌉ at x=3.9.

Example 6

A print shop charges per sheet, and each sheet holds 4 photos. How many sheets are needed for 27 photos?

Why the Floor Function Runs Quietly Behind Everyday Systems

The floor and ceiling functions exist to answer a single stubborn question: how do you turn a continuous amount into a whole count?

Tripping Points to Avoid

Three errors account for most wrong answers:

  1. Rounding negatives the wrong way: ⌊−4.2⌋ should equal −5.
  2. Swapping the two brackets: ⌈4.2⌉ not = 4.
  3. Assuming they always differ by 1: on integer inputs, ⌊6⌋=⌈6⌉=6.

Conclusion