STEP-BY-STEP LESSON · §4.6
Direct Proof and Counterexample VI: Floor and Ceiling
Find the nearest integers below and above.
Before you begin
Direct Proof and Counterexample V: Division into Cases and the Quotient-Remainder Theorem
For integer n and positive integer d there are unique integers q,r with n=dq+r and 0≤r<d.
n=dq+r; 0≤r<d
Symbols
- ⌊x⌋
- floor
- ⌈x⌉
- ceiling
Definitions and notation for this topic
Floor and ceiling
⌊x⌋; ⌈x⌉
For real x, ⌊x⌋ is the greatest integer ≤x; ⌈x⌉ is the least integer ≥x.
The defining bounds are ⌊x⌋≤x<⌊x⌋+1 and ⌈x⌉−1<x≤⌈x⌉. Floor does not generally mean truncating toward zero.
Separate glossary example
⌊−2.3⌋=−3 and ⌈−2.3⌉=−2; for integer n, both ⌊n⌋ and ⌈n⌉ equal n.
Step by step
Step 1 / 6
Down means numerical order
For a real number x, ⌊x⌋ is the greatest integer not exceeding x. For negative numbers this moves left on the number line, not toward zero.
⌊−2.3⌋=−3
−2 is already greater than −2.3 and is inadmissible.
Worked example
Find floor and ceiling of −7/3 without relying on decimal rounding.
- Start with −9<−7<−6 and divide all parts by positive 3: −3<−7/3<−2.
- The greatest integer not exceeding −7/3 is −3, so its floor is −3.
- The least integer not below −7/3 is −2, so its ceiling is −2. The two definitions point in opposite directions on the number line.
Prove an identity with the defining intervals
For an integer m, m=⌊x⌋ means m≤x<m+1. For an integer c, c=⌈x⌉ means c−1<x≤c. These are exact characterizations, including integer inputs. Use the intervals to prove identities instead of assuming that rounding obeys every algebraic rule.
Worked example
Prove ⌊−x⌋=−⌈x⌉ for every real x.
Name the ceiling and record its full interval.
c=⌈x⌉ ∈ ℤ; c−1<x≤c
Why: The strict lower endpoint and included upper endpoint distinguish ceiling from floor.
Multiply every part by −1, reversing the inequalities.
−c≤−x<−c+1
Why: Reordering the result into increasing order gives the interval needed for floor. Equality stays on the lower bound.
Use the characterization of floor.
⌊−x⌋=−c=−⌈x⌉
Why: Because −c is an integer and −c≤−x<−c+1, it is exactly the greatest integer no larger than −x.
Try it yourself
Prove ⌈−x⌉=−⌊x⌋ using the floor interval. Check the boundary x=2 as well as x=2.4.
Show worked answer
Let m=⌊x⌋.
m≤x<m+1 ⇒ −m−1<−x≤−m
Why: The transformed interval is the ceiling interval with integer upper endpoint −m.
Conclude and check both cases.
⌈−x⌉=−m; ⌈−2⌉=−2; ⌈−2.4⌉=−2
Why: The included upper endpoint handles the integer boundary without an extra exception.
Optional self-check
What is ⌊−1.1⌋?
Show answer
−2, since −2≤−1.1<−1.