ruler function

The ruler function f on the real line is defined as follows:

f(x)={0,x is irrational;1/n,x=m/nm and n are relatively primes. (1)

Given a rational numberPlanetmathPlanetmathPlanetmath mn in lowest terms, n positive, the ruler function outputs the size (length) of a piece resulting from equally subdividing the unit interval into n, the number in the denominator, parts. It “ignores” inputs of irrational functions, sending them to 0.

The ruler function is so termed because it resembles a ruler. The following picture might be helpful: if mn in lowest terms is a reasonably small rational number (which we assume positive). Then it can be “read off” on a ruler whose intervals of one unit size are each equally subdivided into n parts measuring 1n units each by

  1. 1.

    running one’s finger through until the integer preceding it and then

  2. 2.

    running through to the subsequent rth subunit, “left-over” from the division of m by n.

On the other hand, an irrational number can not be read off from any ruler no matter how fine we subdivide a unit interval in any ruler.


Title ruler function
Canonical name RulerFunction
Date of creation 2013-03-22 18:23:55
Last modified on 2013-03-22 18:23:55
Owner yesitis (13730)
Last modified by yesitis (13730)
Numerical id 5
Author yesitis (13730)
Entry type Definition
Classification msc 26A99