Tutorials › Real Analysis › The Integer Part of a Real Number

Number Systems · Tutorial 118 of 1000

The Integer Part of a Real Number

Learn how to locate any real number between consecutive integers and use the floor function accurately, including for negative numbers.

Beginner 10 min read

What You'll Learn

  • State the defining inequality for the integer part of a real number
  • Prove existence and uniqueness using the Archimedean Property and least-element reasoning
  • Compute integer parts of positive and negative real numbers
  • Define the fractional part and identify its range
  • Use monotonicity and translation properties of the floor function

Locating a Real Number Between Consecutive Integers

The Archimedean Property says that positive natural numbers exceed any specified real number. It therefore provides integer bounds for real numbers, but a more precise question is often useful: which two consecutive integers surround a given real number? The integer part answers this question. Its definition applies to negative numbers as well as positive ones, where careful attention to the direction of the inequalities is essential.

Throughout, \(\mathbb{N}_0=\{0,1,2,\ldots\}\), and \(\mathbb{Z}\) denotes the integers. We use the Archimedean Property from the previous tutorial, along with the fact that every nonempty subset of \(\mathbb{N}_0\) has a least element. The latter follows from the Principle of Mathematical Induction: given a nonempty subset \(A\subseteq\mathbb{N}_0\), choose \(a\in A\); the nonempty finite set \(A\cap\{0,1,\ldots,a\}\) has a least element, which is also least in \(A\).

Definition (Integer Part). The integer part, or floor, of a real number \(x\) is the integer \(m\) such that $$ m\leq x<m+1. $$ It is denoted by \(\lfloor x\rfloor\). Thus \(\lfloor x\rfloor\) is the unique integer at most \(x\) whose successor is greater than \(x\).

The inequalities are deliberately non-strict on the left and strict on the right. If \(x\) is itself an integer, its integer part is \(x\), not the integer immediately below it. For a noninteger \(x\), the floor is the integer immediately below \(x\).

Every Real Number Has a Unique Integer Part

To prove existence, we handle nonnegative and negative real numbers separately. For a nonnegative \(x\), the Archimedean Property supplies natural numbers larger than \(x\). The least such number gives the next integer above \(x\). For a negative \(x\), we instead find the least nonnegative integer at least as large as \(-x\), then reverse the resulting inequalities.

Theorem (Existence and Uniqueness of the Integer Part). For every \(x\in\mathbb{R}\), there is exactly one \(m\in\mathbb{Z}\) such that $$ m\leq x<m+1. $$

Proof. First suppose \(x\geq0\). Define $$ A=\{n\in\mathbb{N}_0:n>x\}. $$ By the Archimedean Property, \(A\) is nonempty. Let \(n\) be its least element. Since \(x\geq0\), \(0\notin A\), so \(n\geq1\). By minimality, \(n-1\notin A\); hence \(n-1\leq x\). Also \(n\in A\), so \(x<n\). Setting \(m=n-1\in\mathbb{Z}\) gives $$ m\leq x<m+1. $$

Now suppose \(x<0\), so \(y=-x>0\). Define $$ B=\{n\in\mathbb{N}_0:n\geq y\}. $$ The Archimedean Property gives a positive natural number greater than \(y\), so \(B\) is nonempty. Let \(n\) be its least element. Since \(y>0\), \(0\notin B\), and therefore \(n\geq1\). Minimality gives \(n-1\notin B\), so \(n-1<y\). The fact that \(n\in B\) gives \(y\leq n\). Negating these inequalities reverses their order: $$ -n\leq x<-(n-1). $$ With \(m=-n\in\mathbb{Z}\), this is exactly \(m\leq x<m+1\). Thus an integer part exists in both cases.

It remains to prove uniqueness. Suppose integers \(m\) and \(p\) both satisfy the defining inequalities. If \(m<p\), then \(p-m\) is a positive integer, so \(p-m\geq1\) and \(m+1\leq p\). But then $$ x<p\leq x $$ because \(p\leq x\) by the defining inequality for \(p\). This is impossible. The same argument with \(m\) and \(p\) exchanged rules out \(p<m\). Therefore \(m=p\), proving uniqueness. \(\square\)

The strict inequality at the upper endpoint is important in both parts of the proof. In the nonnegative case, minimality ensures that the least integer strictly greater than \(x\) is the next integer after its floor. In the negative case, minimality gives a strict inequality after negation. Replacing either strict inequality without justification could invalidate the conclusion.

Worked Example: The Integer Part of a Positive Irrational Number

Let \(x=\sqrt{10}\), the positive square root of \(10\). Since \(3>0\), \(4>0\), and $$ 3^2=9<10<16=4^2, $$ comparison of positive squares gives \(3<\sqrt{10}<4\). Thus \(3\leq x<3+1\), so the uniqueness theorem gives $$ \lfloor\sqrt{10}\rfloor=3. $$ The calculation verifies the defining inequalities directly; it does not require \(\sqrt{10}\) to be rational.

Worked Example: A Negative Integer Part

Consider \(x=-\sqrt{10}\). The inequalities \(3<\sqrt{10}<4\) give, after negation, $$ -4<-\sqrt{10}<-3. $$ In particular, \(-4\leq x<-3=-4+1\). Therefore $$ \lfloor-\sqrt{10}\rfloor=-4. $$ The floor is not \(-3\): although \(-3\) is the integer above \(x\), the floor must be at most \(x\).

Worked Example: A Rational Number Between Negative Integers

For \(x=-17/5\), we have \(-4=-20/5\) and \(-3=-15/5\). Since $$ -\frac{20}{5}\leq-\frac{17}{5}<-\frac{15}{5}, $$ it follows that \(-4\leq x<-3=-4+1\). Hence $$ \left\lfloor-\frac{17}{5}\right\rfloor=-4. $$ This example illustrates why rounding toward zero is not the same as taking the integer part: rounding \(-17/5=-3.4\) toward zero would give \(-3\), but \(-3\) is greater than \(x\).

Fractional Parts and Basic Floor Properties

Subtracting the integer part from a real number leaves a remainder between zero and one. This remainder is called the fractional part. It need not be a nonzero decimal expansion; the definition works uniformly for rational and irrational numbers.

Definition (Fractional Part). For \(x\in\mathbb{R}\), the fractional part of \(x\) is $$ \{x\}=x-\lfloor x\rfloor. $$

Since \(\lfloor x\rfloor\leq x<\lfloor x\rfloor+1\), subtracting \(\lfloor x\rfloor\) gives $$ 0\leq\{x\}<1. $$ Conversely, the identity \(x=\lfloor x\rfloor+\{x\}\) expresses every real number as an integer plus a number in the half-open interval \([0,1)\). For example, \(\{-17/5\}=-17/5-(-4)=3/5\), which is positive even though the original number is negative.

Theorem (Monotonicity of the Floor Function). If \(x\leq y\), then \(\lfloor x\rfloor\leq\lfloor y\rfloor\).

Proof. Write \(m=\lfloor x\rfloor\) and \(n=\lfloor y\rfloor\). Suppose, for contradiction, that \(m>n\). Since \(m-n\) is a positive integer, \(m-n\geq1\), so \(n+1\leq m\). The defining inequalities and the assumption \(x\leq y\) then give $$ y<n+1\leq m\leq x\leq y, $$ which is impossible. Therefore \(m\leq n\), as claimed. \(\square\)

Monotonicity says that the floor cannot decrease when its input increases. The values need not increase strictly: many distinct real numbers have the same floor. For instance, every \(x\) satisfying \(2\leq x<3\) has floor \(2\).

Theorem (Translation by an Integer). For every \(x\in\mathbb{R}\) and \(k\in\mathbb{Z}\), $$ \lfloor x+k\rfloor=\lfloor x\rfloor+k. $$

Proof. Let \(m=\lfloor x\rfloor\), so \(m\leq x<m+1\). Adding the integer \(k\) to all three parts gives $$ m+k\leq x+k<m+k+1. $$ Since \(m+k\) is an integer, it satisfies the defining inequalities for the integer part of \(x+k\). Uniqueness of the integer part therefore gives \(\lfloor x+k\rfloor=m+k=\lfloor x\rfloor+k\). \(\square\)

Worked Example: Translating an Integer Part

We have \(-4\leq-17/5<-3\), so \(\lfloor-17/5\rfloor=-4\). Apply the translation theorem with \(k=6\): $$ \left\lfloor-\frac{17}{5}+6\right\rfloor =\left\lfloor-\frac{17}{5}\right\rfloor+6 =-4+6=2. $$ Indeed, \(-17/5+6=13/5\), and \(2=10/5\leq13/5<15/5=3\), confirming the result directly.

Why the Integer Part Matters

The integer part converts a real-valued location into an integer index while preserving a precise bound on the remainder. This is useful whenever the real line is divided into intervals of unit length: \(\lfloor x\rfloor=m\) exactly when \(x\in[m,m+1)\). The half-open convention assigns each real number to one interval rather than leaving integer endpoints ambiguous or counting them twice.

A frequent error is to use “truncate toward zero” as a definition of the floor. That agrees with the floor for nonnegative numbers, but not for negative nonintegers. For example, truncating \(-3.4\) toward zero gives \(-3\), whereas the floor is \(-4\), because \(-4\leq-3.4<-3\). Always check the defining inequalities rather than relying on a rounding convention.

The existence proof also illustrates a useful role for the Archimedean Property. It ensures that the relevant set of natural numbers is nonempty; the least-element principle then selects a first integer crossing the chosen bound. Together these ideas produce a precise integer location for every real number, no matter how large, small, or close to an integer it is.

Key takeaway. For each real \(x\), there is exactly one integer \(m\) with \(m\leq x<m+1\); this integer is \(\lfloor x\rfloor\). Its fractional remainder satisfies \(0\leq x-\lfloor x\rfloor<1\), and the floor is monotone and translates by integers.

Check Your Understanding

Use the defining inequalities and the proved properties to answer the following questions.

  1. What two inequalities characterize the integer part of a real number?
  2. Why does minimality of the chosen integer give the strict inequality needed in the negative case of the existence proof?
  3. Find the integer part and fractional part of \(-23/6\), verifying both defining inequalities.
  4. If \(\lfloor x\rfloor=4\), what can be said about \(\lfloor x+9\rfloor\), and which theorem justifies the conclusion?
  5. Explain why truncating \(-2.6\) toward zero does not give its integer part.