# Greatest Integer Function — Graph, Domain, Examples

## TL;DR
The greatest integer function, written ⌊x⌋, returns the largest integer that is less than or equal to x — so it rounds every number down to a whole number. This article covers its definition, the staircase graph, domain and range, key properties, the rule for negative numbers, and six worked examples.

## What Is the Greatest Integer Function?
The **greatest integer function** takes a real number x and returns the **greatest integer that is less than or equal to x**. It is written ⌊x⌋ and is also called the **floor function** or the **step function**.

In plain terms: slide left along the number line from x until you hit the first integer, and that integer is the answer. For a number that's already an integer, the floor is itself. The key word is _down_ — never round to the nearest integer, always round down.

## How Do You Solve the Greatest Integer Function?
The fastest method is the number-line picture: mark x, then take the **first integer at or to its left**.

- ⌊4.7⌋=4
- ⌊9⌋=9
- ⌊0.3⌋=0

For positive numbers this matches "chop off the decimal." For negative numbers it does **not** — and that's the catch the next section settles.

### Why is the floor of a negative number not what most people expect?
Because "less than or equal to" points the other way for negatives. The greatest integer ≤−2.4 is −3. The rule: for a negative non-integer, the floor goes to the _more negative_ integer.

## What Does the Graph of the Greatest Integer Function Look Like?
The graph is a **staircase** — flat horizontal steps that jump up by one at each integer. Each step carries a **solid dot on its left end** (the integer is included) and an **open dot on its right end** (the next integer belongs to the _next_ step).

## What Are the Domain and Range of the Greatest Integer Function?
You can feed in **any real number**, so the **domain is all real numbers**, R. But the output is always a whole number, so the **range is the set of all integers**, Z.

## What Are the Properties of the Greatest Integer Function?
- **Integer shift:** ⌊x+n⌋=⌊x⌋+n for any integer n.
- **Bounds:** ⌊x⌋≤x<⌊x⌋+1 always — the defining inequality.
- **Integer inputs:** ⌊n⌋=n when n is already an integer.
- **Negatives:** ⌊−x⌋=−⌈x⌉, linking the floor to its sibling the ceiling function.
- **Not one-to-one:** many inputs share one output.

## Examples of Greatest Integer Function
### Example 1
**Evaluate ⌊7.92⌋.** Final answer: ⌊7.92⌋=7.

### Example 2
**Evaluate ⌊−3.6⌋.** Final answer: ⌊−3.6⌋=−4.

### Example 3
**Evaluate ⌊5⌋ and ⌊−5⌋.** Final answer: ⌊5⌋=5 and ⌊−5⌋=−5.

### Example 4
**Solve ⌊x⌋=3.** Final answer: x∈[3,4).

### Example 5
**Evaluate ⌊2.5⌋+⌊−2.5⌋.** Final answer: −1.

### Example 6
**A parking meter charges per started hour. How many hours is it billed?** Final answer: 3 hours billed.

## Where the Greatest Integer Function Earns Its Place
- **Computing and programming:** integer division, array indexing, etc.
- **Billing and tiered pricing:** parking, data overages, etc.
- **Calendars and clocks.**

## Where Students Trip Up on the Greatest Integer Function
### Mistake 1: Treating the floor of a negative as "chop the decimal".
### Mistake 2: Putting the dots on the wrong ends of the graph steps.
### Mistake 3: Assuming ⌊x⌋+⌊−x⌋=0.

## Key Takeaways
- The **greatest integer function** ⌊x⌋ returns the largest integer less than or equal to x — it always rounds _down_.
- For negative non-integers, it moves to the more negative integer.
- The graph is a staircase with solid dots on each step's left end and open dots on its right; the domain is all reals, the range is all integers.

## Practice These Before Moving On
1. Evaluate ⌊8.99⌋ and ⌊−8.99⌋.
2. Solve ⌊x⌋=−2.
3. Evaluate ⌊3.5⌋+⌊−3.5⌋.
