In short
The fractional part function \{x\} extracts the decimal tail of a number: \{3.7\} = 0.7, \{5\} = 0. The signum function \operatorname{sgn}(x) records only the sign: +1, -1, or 0. Both are piecewise-defined, both produce sawtooth or step-shaped graphs, and both appear constantly in competition problems and in building more complex functions from simple pieces.
A shopkeeper in a kirana store sells rice at ₹40 per kilogram. A customer asks for 3.7 kg. The shopkeeper scoops out 3 full kilograms from one sack and then needs to measure out the remaining 0.7 kg on the scale. That leftover portion — the 0.7 that remains after you strip away the whole kilograms — is exactly what mathematicians call the fractional part of 3.7.
Now think about something different. A thermometer reads -8°C in Shimla and +35°C in Chennai. You do not care about the exact temperature — you only want to know: is it above zero, below zero, or exactly zero? That one-bit summary — positive, negative, or zero — is what the signum function captures.
These two functions, the fractional part \{x\} and the signum \operatorname{sgn}(x), are small tools with outsized usefulness. They strip a number down to one piece of information (the leftover, or the sign) and throw away the rest. That controlled destruction is precisely what makes them powerful in equations and inequalities.
The fractional part function
You already know the greatest integer function [x] (also written \lfloor x \rfloor), which gives the largest integer less than or equal to x. The fractional part is what remains after you subtract that integer.
Fractional part function
For any real number x, the fractional part is
where [x] = \lfloor x \rfloor is the greatest integer function (floor function).
The fractional part always satisfies 0 \le \{x\} < 1.
Some concrete values:
| x | [x] | \{x\} = x - [x] |
|---|---|---|
| 3.7 | 3 | 0.7 |
| 5 | 5 | 0 |
| -2.3 | -3 | 0.7 |
| \pi | 3 | \pi - 3 \approx 0.14159 |
| -0.6 | -1 | 0.4 |
The row x = -2.3 deserves a second look. Since [{-2.3}] = -3 (the greatest integer less than or equal to -2.3), the fractional part is -2.3 - (-3) = 0.7. The fractional part is not -0.3. It is always non-negative.
Graph of \{x\}
On each interval [n, n+1) where n is an integer, the fractional part function starts at 0 and climbs linearly with slope 1 until it reaches just below 1, then drops back to 0 at the next integer. The result is a sawtooth wave.
Properties of the fractional part
-
Range. 0 \le \{x\} < 1 for every real x. The value 1 is never reached — just before an integer, \{x\} is arbitrarily close to 1 but snaps back to 0 at the integer itself.
-
Periodicity. \{x + 1\} = \{x\} for every x. Shifting by any integer does not change the fractional part: \{x + n\} = \{x\} for every integer n. The function is periodic with period 1.
-
Reconstruction. Every real number decomposes as x = [x] + \{x\}, with [x] an integer and 0 \le \{x\} < 1. This decomposition is unique.
-
At integers. \{n\} = 0 for every integer n.
-
Discontinuities. The function is discontinuous at every integer. The left-hand limit at x = n is 1, but the function value is 0.
Graph of \{2x\}: compressing the sawtooth
If you replace x by 2x, the teeth become twice as narrow. The function \{2x\} completes one full sawtooth on [0, \frac{1}{2}), another on [\frac{1}{2}, 1), and so on. The period shrinks from 1 to \frac{1}{2}.
The signum function
Signum function
The signum (or sign) function is defined as:
The signum function does one thing: it tells you the sign of a number and discards the magnitude. Think of it as a judge who only announces "positive," "negative," or "zero" — nothing else.
A useful identity links signum to the absolute value:
This says every real number is its magnitude times its sign. Check: -7 = 7 \cdot (-1), 5 = 5 \cdot 1, 0 = 0 \cdot 0. The decomposition works in all three cases.
Equivalently, for x \neq 0:
Graph of \operatorname{sgn}(x)
Properties of signum
-
Range. \operatorname{sgn}(x) \in \{-1, 0, 1\} for all x.
-
Odd function. \operatorname{sgn}(-x) = -\operatorname{sgn}(x) for all x. The graph is symmetric about the origin.
-
Product rule for signs. \operatorname{sgn}(xy) = \operatorname{sgn}(x) \cdot \operatorname{sgn}(y). The sign of a product is the product of the signs.
-
Idempotence. \operatorname{sgn}(\operatorname{sgn}(x)) = \operatorname{sgn}(x). Applying signum twice changes nothing — the sign of 1 is 1, the sign of -1 is -1, the sign of 0 is 0.
-
Discontinuity. The function is discontinuous at x = 0 only. The left-hand limit is -1, the right-hand limit is +1, and the function value is 0.
Combining the two: the graph of x \cdot \{x\}
When you multiply the identity function x by the fractional part \{x\}, you get a function that is piecewise linear on each unit interval but whose slope and position change from interval to interval.
On the interval [n, n+1), \{x\} = x - n, so x \cdot \{x\} = x(x - n). This is a quadratic in x on each unit interval — a small parabolic arc that starts at 0 when x = n and reaches n+1 - \frac{1}{4}(2n+1)^2 / (n+1)... but the key visual point is simpler: the function is 0 at every integer and grows in a scalloped pattern.
Solving equations with these functions
Equations involving \{x\} and \operatorname{sgn}(x) almost always reduce to casework on intervals, because the functions are defined piecewise. The strategy is always the same: identify the intervals, replace the special function with its algebraic expression on each interval, and solve.
Example 1: Solve $\{x\}^2 - 5\{x\} + 6 = 0$
Step 1. Let t = \{x\}. The equation becomes t^2 - 5t + 6 = 0.
Why: substitution turns a fractional-part equation into an ordinary quadratic in t.
Step 2. Factor: (t - 2)(t - 3) = 0, so t = 2 or t = 3.
Why: standard factoring of the quadratic.
Step 3. Check validity. Since t = \{x\}, we need 0 \le t < 1. Neither t = 2 nor t = 3 falls in the interval [0, 1).
Why: the fractional part function can only produce values in [0, 1). Any solution outside this range is spurious.
Step 4. There are no solutions.
Result: The equation \{x\}^2 - 5\{x\} + 6 = 0 has no real solutions, because both roots of the quadratic lie outside the range of \{x\}.
The picture confirms the algebra: the parabola does not touch the t-axis anywhere inside the shaded valid region. The equation is unsolvable not because the quadratic has no roots, but because its roots lie outside the reach of \{x\}.
Example 2: Solve $x \cdot \operatorname{sgn}(x) = 3$
Step 1. Recall that x \cdot \operatorname{sgn}(x) = |x|, since \operatorname{sgn}(x) extracts the sign and multiplying recovers the original. So x \cdot \operatorname{sgn}(x) = |x|.
Why: the identity x = |x| \cdot \operatorname{sgn}(x) rearranges to x \cdot \operatorname{sgn}(x) = |x| \cdot [\operatorname{sgn}(x)]^2 = |x| when x \neq 0 (since [\operatorname{sgn}(x)]^2 = 1), and at x = 0 both sides are 0.
Step 2. The equation becomes |x| = 3.
Why: direct substitution from Step 1.
Step 3. Solve: x = 3 or x = -3.
Why: the absolute value equation |x| = 3 has exactly two solutions — one positive, one negative.
Step 4. Verify. At x = 3: 3 \cdot \operatorname{sgn}(3) = 3 \cdot 1 = 3. At x = -3: (-3) \cdot \operatorname{sgn}(-3) = (-3)(-1) = 3. Both check out.
Result: x = 3 or x = -3.
The key insight: x \cdot \operatorname{sgn}(x) strips the sign from x, leaving |x|. Any equation involving this product reduces to an absolute value equation.
Common confusions
-
"The fractional part of -2.3 is -0.3." It is not. By definition, \{x\} = x - [x]. Since [-2.3] = -3, we get \{-2.3\} = -2.3 - (-3) = 0.7. The fractional part is always in [0, 1).
-
"\operatorname{sgn}(0) is undefined." It is defined — the standard convention is \operatorname{sgn}(0) = 0. Some authors leave it undefined, but in JEE and most Indian textbooks, the convention is \operatorname{sgn}(0) = 0.
-
"\{x\} is the decimal part of x." For positive numbers, this is a reasonable shorthand. For negative numbers, it fails. The "decimal part" of -2.3 feels like 0.3, but \{-2.3\} = 0.7. The fractional part is defined through the floor function, not by reading off digits after the decimal point.
-
"The signum function is differentiable everywhere except at x = 0." True: for x > 0, \operatorname{sgn}(x) = 1 (constant), so the derivative is 0. For x < 0, \operatorname{sgn}(x) = -1 (constant), so the derivative is 0. At x = 0, the function is not even continuous, so differentiability is out of the question. The derivative of \operatorname{sgn}(x) is 0 wherever it exists.
-
"\{x\} and x - [x] can differ." They cannot — \{x\} = x - [x] is the definition. They are the same object.
Going deeper
If you can compute fractional parts (including for negative numbers), sketch the sawtooth graph, evaluate signum, and solve equations by substituting t = \{x\}, you have the tools for the next chapter. The rest of this section is for readers who want the algebraic structure and competition-style applications.
The fractional part in modular arithmetic
The fractional part function is closely related to the modulo operation. For any positive real m:
So \{x\} is the special case x \bmod 1. This connection is why \{x\} appears in number theory and in problems about remainders.
An interactive exploration
Drag the point along the number line to see how x, [x], and \{x\} relate. The filled segment shows [x] (the integer part), and the highlighted segment shows \{x\} (the fractional part).
Signum and absolute value: the full decomposition
Every non-zero real number can be written uniquely as x = |x| \cdot \operatorname{sgn}(x). This is the polar decomposition of real numbers (by analogy with the polar form of complex numbers, z = |z| e^{i\theta}, where e^{i\theta} plays the role of the sign).
This decomposition is more useful than it first appears. When you need to prove a statement about x for all real x, you can split into three cases: x > 0, x = 0, x < 0. The signum function automates this split.
A competition-style identity
For any real x:
Proof: If x is an integer, both \{x\} = 0 and \{-x\} = 0, so the sum is 0. If x is not an integer, write x = n + \alpha where n is an integer and 0 < \alpha < 1. Then \{x\} = \alpha and \{-x\} = \{-n - \alpha\} = -n - \alpha - [-n - \alpha] = -n - \alpha - (-n - 1) = 1 - \alpha. So \{x\} + \{-x\} = \alpha + (1 - \alpha) = 1.
This identity shows up frequently in competition problems, and it is worth committing to memory.
Where this leads next
You now know two more special functions — the fractional part and the signum — and how to work with them in equations and graphs. These functions build on the toolkit you started in Part 1 with the greatest integer and absolute value functions.
- Special Functions — Part 1 — the greatest integer function and the absolute value function, which are the prerequisites for this article.
- Functions — Definition and Notation — the foundational definitions of function, domain, and codomain.
- Graphs of Basic Functions — the standard library of function shapes that includes polynomials, exponentials, and the piecewise functions covered here.
- Domain and Range — how to find what goes in and what comes out, especially for piecewise functions like \{x\} and \operatorname{sgn}(x).
- Ways to Define Functions — piecewise definitions, which are the natural home of both functions covered in this article.