9 (nine) is the
natural number
In mathematics, the natural numbers are the numbers 0, 1, 2, 3, and so on, possibly excluding 0. Some start counting with 0, defining the natural numbers as the non-negative integers , while others start with 1, defining them as the positive in ...
following and preceding .
Evolution of the Hindu–Arabic digit

Circa 300 BC, as part of the
Brahmi numerals, various Indians wrote a digit 9 similar in shape to the modern closing
question mark
The question mark (also known as interrogation point, query, or eroteme in journalism) is a punctuation, punctuation mark that indicates a question or interrogative clause or phrase in many languages.
History
The history of the question mark is ...
without the bottom dot. The Kshatrapa, Andhra and Gupta started curving the bottom vertical line coming up with a -look-alike. How the numbers got to their Gupta form is open to considerable debate. The Nagari continued the bottom stroke to make a circle and enclose the 3-look-alike, in much the same way that the sign @ encircles a lowercase ''a''. As time went on, the enclosing circle became bigger and its line continued beyond the circle downwards, as the 3-look-alike became smaller. Soon, all that was left of the 3-look-alike was a squiggle. The Arabs simply connected that squiggle to the downward stroke at the middle and subsequent European change was purely cosmetic.
While the shape of the glyph for the digit 9 has an
ascender in most modern
typeface
A typeface (or font family) is a design of Letter (alphabet), letters, Numerical digit, numbers and other symbols, to be used in printing or for electronic display. Most typefaces include variations in size (e.g., 24 point), weight (e.g., light, ...
s, in typefaces with
text figures
Text figures (also known as non-lining, lowercase, old style, ranging, hanging, medieval, billing, or antique figures or numerals) are numerals designed with varying heights in a fashion that resembles a typical line of running text, hence the ...
the character usually has a
descender, as, for example, in

.
The form of the number nine (9) could possibly derived from the Arabic letter ''
waw'', in which its isolated form (و) resembles the number 9.

The modern digit resembles an inverted ''6''. To disambiguate the two on objects and labels that can be inverted, they are often underlined. It is sometimes handwritten with two strokes and a straight stem, resembling a raised lower-case letter q, which distinguishes it from the 6. Similarly, in
seven-segment display, the number 9 can be constructed either with a hook at the end of its stem or without one. Most
LCD calculators use the former, but some
VFD models use the latter.
Mathematics
9 is the fourth
composite number
A composite number is a positive integer that can be formed by multiplying two smaller positive integers. Accordingly it is a positive integer that has at least one divisor other than 1 and itself. Every positive integer is composite, prime numb ...
, and the first odd composite number. 9 is also a
refactorable number.
Casting out nines is a quick way of testing the calculations of sums, differences, products, and
quotients of
integer
An integer is the number zero (0), a positive natural number (1, 2, 3, ...), or the negation of a positive natural number (−1, −2, −3, ...). The negations or additive inverses of the positive natural numbers are referred to as negative in ...
s in
decimal, a method known as long ago as the 12th century.
9 is the only square number that is the sum of two consecutive, positive cubes:
If an
odd perfect number
In number theory, a perfect number is a positive integer that is equal to the sum of its positive proper divisors, that is, divisors excluding the number itself. For instance, 6 has proper divisors 1, 2 and 3, and 1 + 2 + 3 = 6, so 6 is a perfec ...
exists, it will have at least nine distinct
prime factors.

9 is the sum of the
cubes of the first two non-zero positive integers
which makes it the first cube-sum number greater than
one. A number that is 4 or 5
modulo
In computing and mathematics, the modulo operation returns the remainder or signed remainder of a division, after one number is divided by another, the latter being called the '' modulus'' of the operation.
Given two positive numbers and , mo ...
9 cannot be represented as the
sum of three cubes.

There are nine
Heegner number
In number theory
Number theory is a branch of pure mathematics devoted primarily to the study of the integers and arithmetic functions. Number theorists study prime numbers as well as the properties of mathematical objects constructed from int ...
s, or
square-free positive integers that yield an imaginary
quadratic field