The most common method of representing numbers involves making strings out of a (small) finite alphabet, and using each position within the string as a multiplier with the symbol in that position. To be less abstract, a decimal positional notation is now in use by nearly every culture on Earth.

We'll get into the mathematics of positional notation later, but we'll start by saying the only really interesting mathematical property of a positional notation is its *base*, that is, the number of symbols in the alphabet that the strings are derived from. Our decimal positional system is base ten, that is, we use ten symbols (which vary from culture to culture) to represent numbers. In this system, a string position multiplies the contribution of a symbol there by a power of ten:

354 - represents "three hundred fifty-four"
three hundreds -----'||
five tens (fifty) ---'|
four -----------------'

The advent of computers has made systems with other bases (particularly two, eight, and sixteen) occasionally useful. (Now that I've introduced the concept, I'll drop the pretense of using words for numbers).

### This little piggy goes to market...

It is far easier to perform complex calculations using positional notations than with physical analogues or earlier agglomerative symbols, primarily by allowing straightforward algorithms for doing them:

_______________
735 DCCXXXV |ooooo-----ooooo|
x 49 x XLIX |ooooooo-----ooo|
----- --------- |ooo-----ooooooo|
6615 arrrrgh!!
2940 |o-----ooooooooo|
----- |__oooooo-----oooo__|
36015
go buy me a bunch of abaci...

Positional notations probably date from the earliest methods of counting using physical analogues. A crude form of positional notation was in use by preliterate people who, when counting objects using their fingers, ran out of fingers on one hand and used each finger on the other hand to represent a whole hands' worth of objects. Later methods involved putting small pebbles into cups or pits in the ground. Assigning positional importance to physical analogues continues with the use of the abacus in many places today.

Once people began writing things down, they invented symbols to stand in for numbers. The earliest number symbols resembled "tallies": New symbols for larger values piled up in the same way the smaller symbols did, and their order was not important.

The Babylonians invented the first written positional notation, using a base 60 (sexagesimal) system. Although keeping track of the system's 59 symbols seems unwieldy today, the symbols were actually aggolmerative collections of symbols representing 1, 5, and 20. At any rate, 59 symbols is not enough for a base 60 system, as 60 symbols are required. The missing symbol was a "zero" symbolizing no contribution at all for a particular position. As a result there was no way to tell the difference between 72, 702, and 720. However, the Babylonian system evolved to include a kind of zero: "placeholder" symbols eventually appeared in the middle of numbers, and Babylonian astrologers began using these placeholders at the beginnings and endings of numbers around the time of Buddha.

Two cultures later developed positional notations involving true zeroes: The Mayans who had a base 20 system, and Hindus who began using a base 10 system in the early centuries of the Common Era (to be more precise, the earliest archaeological evidence for decimal numbers in India comes from that time). This system spread west into Persia in the succeeding centuries, where it was picked up by Islamic scholars after the conquest. The most influential Islamic work on decimal numbers is an 825 treatise by Al-Khwarizmi. This was in turn read by Leonardo of Pisa, who introduced the notations and algorithms to Western Europe in his 1202 work *Liber abaci*. This method became known in Europe as *augrim* or *algorism*, attempts to represent the name *al-Khwarizmi*, and precusors to our modern word *algorithm*. During the Renaissance, algorism competed with other methods of calculation (including a graphical abacus) until the introduction of movable type made it the most feasible.

### Other bases

Most of the time, other bases are for the sole purpose of demonstrating that you can use other bases. For example, base 3 uses the symbols `{0, 1, 2}`, and positions represent powers of 3 (1, 3, 9, 27, 81, …). 736 in base 3 would be `100021`.

However, as described earlier, bases 2 ("binary"), 8 ("octal"), and 16 ("hexadecimal") have become useful for various aspects of computing.

### Some mathematical stuff

Given an alphabet `S = { S`_{0}, S_{1}, S_{2},… S_{b-1}} containing `b`
symbols, a number `N` can be represented by selecting one symbol `S`_{di} from the set (a "digit") for each integer `i`, where

`d`_{i} = [b^{-i}N] - [b^{1-i}N]

where `[x]` represents "the greatest integer in `x`".

It should be evident that `0 <= d`_{i} < b. Consequently, `d`_{i} is completely determined† for all `i`, and we can calculate the original number as `N=Σb`^{i}d_{i}. Once all of the `d`_{i} have been determined we can represent the number of a string. For a positive integer:

`…S`_{di}S_{di-1}…S_{d1}S_{d0}

Nonintegers can be represented in this way, but since the digit strings could theoretically extend to infinity in both directions, it's necessary to "anchor" the string in some way. The usual way to do this is to introduce a "radix" symbol ("decimal point" in English-speaking countries) which is placed between `S`_{d0} and `S`_{d-1}. This way, the symbols appearing after the radix symbol represent the fractional part of the number.

`…S`_{di}S_{di-1}…S_{d1}S_{d0}.S_{d-1}S_{d-2}…

Every real number is "finite", and so there is an integer `j` such that `b`^{j-1} ≤ n < b^{j} and so `d`_{k} = 0 for all `k≥j`. It becomes unnecessary to include all of those "leading zeroes" in the string, but it's occasionally convenient to do so, and necessary after the radix symbol for representing fractions. In the fractional part (mantissa) of the string, digits can extend into infinity. If it's known that the digits past a certain point are all `0` they are customarily omitted, but some are frequently added to signify the precision of a measurement. If the fractional part contains an infinite repeating sequence, you will sometimes see a line drawn over the repeating part:

______
1/7 = 0.142857142857…= 0.142857

### Rational numbers

I went through all of this just so that I could show that every rational number has an infinite repeating sequence of symbols in its fractional part.

We can represent the reciprocal of an integer `q > 0` in manner analogous to long division. If we define `r`_{0}=1 and `d`_{i+1}=[br_{i}/q]

br_{0} = d_{1}q + r_{1}
br_{1} = d_{2}q + r_{2}
br_{2} = d_{3}q + r_{3}
br_{i} = d_{i+1}q + r_{i+1}

where

` 0 ≤ d`_{i} < b and

` 0 ≤ r`_{i} < q.

Multiply both sides of the last equation by `1/qb`^{i+1}:

`r`_{i}/qb^{i} = d_{i+1}/qb^{i+1} + r_{i+1}/qb^{i+1}

`Since we set ``r`_{0} = 1 at the outset,

`1 / q = d`_{1}/b^{1} + r_{1}/qb^{1}
= d_{1}/b^{1} + d_{2}/b^{2} + r_{2}/qb^{2}
= d_{1}/b^{1} + d_{2}/b^{2} + … + d_{i}/b^{i} …

The definition of the "Greatest integer in" function determines `d`_{i} and `r`_{i} for all `i`. In addition, `r`_{i} completely determines `d`_{i+1} and `r`_{i+1}. Thus, `r`_{i} = r_{j} means `d`_{i+1} = d_{j+1} and `r`_{i+1} = r_{j+1}, such that whenever `i < j` and r_{i} = r_{j}, the series of digits `S`_{di}..S_{dj-1} is repeated forever.

Since `q` is an integer, all of the `r`_{i} are integers. Thus, there are only `q` different values for the various `r`_{i}. So eventually, `r`_{i}=r_{j} for some `i, j` where `i < j`, triggering the infinite sequence in `1/q`'s expansion.

Multiplying `1/q` by some integer `p` will also result in an infinite sequence, but I'll leave that proof to you.

### Not only that...

If the fractional part of a digit string contains an infinite repeating sequence, the resulting number must be rational. Let's say that a sequence of `k` digits repeats forever, starting at digit `i`. Thus:

r = d_{1}/b^{1} + … + d_{i-1}/b^{i-1}
+ d_{i}/b^{i} + … + d_{i+k-1}/b^{i+k-1}
+ d_{i}/b^{i+k} + … + d_{i+k-1}/b^{i+2k-1}
+ d_{i}/b^{i+2k} + … + d_{i+k-1}/b^{i+3k-1}
+…

We can group the terms such that the first group contains the first `i-1` terms, and each group after that contains the next `k` terms. Then, we multiply the first group by `b`^{i-1}/b^{i-1}, and each successive group by `b`^{i+nk-1}/b^{i+nk-1}:

r = (d_{1}/b^{i-2} + … + d_{i-1}/b^{0}) / b^{i-1}
+ (d_{i}b^{k-1} + … + d_{i+k-1}b^{0}) / b^{i+k-1}
+ (d_{i}b^{k-1} + … + d_{i+k-1}b^{0}) / b^{i+2k-1}
+ (d_{i}b^{k-1} + … + d_{i+k-1}b^{0}) / b^{i+3k-1}
+…

If we let `S = d`_{1}/b^{i-2} + … + d_{i-1}/b^{0} and `T=d`_{i}b^{k-1} + … + d_{i+k-1}b^{0},

r = S / b^{i-1} + T / (b^{i-1} * Lim(n->∞) Σ(p=1..n, b^{-pk})) )

The sum of the geometric series `Lim (n->∞)&Sigma(p=1..n, b`^{-pk})) converges to `1/(b`^{k}-1) so

r = S / b^{i-1} + T / (b^{i-1}(b^{k}-1))
= (S(b^{k}-1)+T) / (b^{i-1}(b^{k}-1))

which is clearly†† a rational number.

### Irrational numbers

A method similar to the one used for rational numbers can be used to show that a digit sequence exists for all real numbers, not just rationals. For a real number `a`, `r`_{0} = 1 and `br`_{i} = d_{i+1}a + r_{i+1} still results in `1 / a = d`_{1}/b^{1} + d_{2}/b^{2} + … + d_{i}/b^{i} …, but since `a` might not be integral, the various `r`_{i} might not be integers and a pair of r_{i} might never match. Since a repeating sequence appears only for a rational number, an irrational must be represented by an infinite non-repeating sequence.

### Oh boy, the most tiresome flamewar on `sci.math`!

The positional representation of fractional real numbers introduces ambiguity into the system. The sum of the geometric series

`Lim(j->∞)Σ(i=1..j, b`^{-i})

converges to `1/(b-1)`, and so

`Lim(j->∞)Σ(i=1..j, (b-1)b`^{-i}) = 1.

This means that whenever a number is a multiple of `b`^{i} for some i, there are two ways of representing the number:

- If we assign
`d`_{i} as above, `d`_{j} = 0 for all `j < i`.
- However, when
`[b`^{-i}N] - [b^{1-i}N] > 0, the limit above allows us to assign `d`_{i} = [b^{-i}N] - [b^{1-i}N] - 1, after which we can assign `d`_{j} = b-1 for all `j < i` and still get the same number.

In base 10, this means the string "1" represents the same number as the string "0.99999…". Mathematicians care about this because: 1) cranks love to argue the point, and 2) it causes difficulty when mapping the power set of the integers to the reals.

†Well, opinions differ on the truth of this; see Law of Trichotomy for an explanation.

††A famous result of Euler's shows that for all integral `a, b`, there must be some `k < a` such that `a` divides `b`^{k}-1. Remind me to node this some time.