0 (zero) is a number,[1] and the numerical digit used to represent that number in numerals. It fulfills a central role in mathematics as the additive identity of the integers, real numbers, and many other algebraic structures. As a digit, 0 is used as a placeholder in place value systems. Names for the number 0 in English include zero, nought (UK), naught (US; ), nil, or—in contexts where at least one adjacent digit distinguishes it from the letter "O"—oh or o (). Informal or slang terms for zero include zilch and zip.[2] Ought and aught (),[3] as well as cipher,[4] have also been used historically.[5][6]

The word zero came into the English language via French zéro from the Italian zero, a contraction of the Venetian zevero form of Italian zefiro via ṣafira or ṣifr.[7] In pre-Islamic time the word ṣifr (Arabic صفر) had the meaning "empty".[8] Sifr evolved to mean zero when it was used to translate śūnya (Sanskrit: शून्य) from India.[8] The first known English use of zero was in 1598.[9]

The Italian mathematician Fibonacci (c. 1170–1250), who grew up in North Africa and is credited with introducing the decimal system to Europe, used the term zephyrum. This became zefiro in Italian, and was then contracted to zero in Venetian. The Italian word zefiro was already in existence (meaning "west wind" from Latin and Greek zephyrus) and may have influenced the spelling when transcribing Arabic ṣifr.[10]

Depending on the context, there may be different words used for the number zero, or the concept of zero. For the simple notion of lacking, the words "nothing" and "none" are often used. Sometimes, the word "nought" or "naught" is used.

It is often called "oh" in the context of reading out a string of digits, such as telephone numbers, street addresses, credit card numbers, military time, or years (e.g. a phone number 555-0123 would be pronounced "five five five oh one two three"; a year such as 1907 is often pronounced "nineteen oh seven"). The presence of other digits avoids confusion with the letter O. For this reason, systems that include alphanumeric strings (e.g. Canadian postal codes) may exclude the use of the letter O.

Slang words for zero include "zip", "zilch", "nada", and "scratch."[11]

"Nil" is used for many sports in British English. Several sports have specific words for a score of zero, such as "love" in tennis – from French l'oeuf, "the egg" – and "duck" in cricket, a shortening of "duck's egg"; "goose egg" is another general slang term used for zero.[11]

Ancient Egyptian numerals were of base 10.[12] They used hieroglyphs for the digits and were not positional. By 1770 BC, the Egyptians had a symbol for zero in accounting texts. The symbol nfr, meaning beautiful, was also used to indicate the base level in drawings of tombs and pyramids, and distances were measured relative to the base line as being above or below this line.[13]

By the middle of the 2nd millennium BC, the Babylonian mathematics had a sophisticated sexagesimal positional numeral system. The lack of a positional value (or zero) was indicated by a space between sexagesimal numerals. In a tablet unearthed at Kish (dating to as early as 700 BC), the scribe Bêl-bân-aplu used three hooks as a placeholder in the same Babylonian system.[14] By 300 BC, a punctuation symbol (two slanted wedges) was co-opted to serve as this placeholder.[15][16]

The Babylonian placeholder was not a true zero because it was not used alone, nor was it used at the end of a number. Thus numbers like 2 and 120 (2×60), 3 and 180 (3×60), 4 and 240 (4×60) looked the same, because the larger numbers lacked a final sexagesimal placeholder. Only context could differentiate them.[citation needed]

The Mesoamerican Long Count calendar developed in south-central Mexico and Central America required the use of zero as a placeholder within its vigesimal (base-20) positional numeral system. Many different glyphs, including this partial quatrefoilsmall illustration of a partial quatrefoil in right half, whitespace in left half—were used as a zero symbol for these Long Count dates, the earliest of which (on Stela 2 at Chiapa de Corzo, Chiapas) has a date of 36 BC.[a]

Since the eight earliest Long Count dates appear outside the Maya homeland,[17] it is generally believed that the use of zero in the Americas predated the Maya and was possibly the invention of the Olmecs.[18] Many of the earliest Long Count dates were found within the Olmec heartland, although the Olmec civilization ended by the 4th century BC, several centuries before the earliest known Long Count dates.

Although zero became an integral part of Maya numerals, with a different, empty tortoise-like "shell shape" used for many depictions of the "zero" numeral, it is assumed not to have influenced Old World numeral systems.

Quipu, a knotted cord device, used in the Inca Empire and its predecessor societies in the Andean region to record accounting and other digital data, is encoded in a base ten positional system. Zero is represented by the absence of a knot in the appropriate position.

The ancient Greeks had no symbol for zero (μηδέν), and did not use a digit placeholder for it.[19] They seemed unsure about the status of zero as a number. They asked themselves, "How can nothing be something?", leading to philosophical and, by the medieval period, religious arguments about the nature and existence of zero and the vacuum. The paradoxes of Zeno of Elea depend in large part on the uncertain interpretation of zero.[20]

Example of the early Greek symbol for zero (lower right corner) from a 2nd-century papyrus

By AD 150, Ptolemy, influenced by Hipparchus and the Babylonians, was using a symbol for zero (°)[21][22] in his work on mathematical astronomy called the Syntaxis Mathematica, also known as the Almagest.[23] This Hellenistic zero was perhaps the earliest documented use of a numeral representing zero in the Old World.[24] Ptolemy used it many times in his Almagest (VI.8) for the magnitude of solar and lunar eclipses. It represented the value of both digits and minutes of immersion at first and last contact. Digits varied continuously from 0 to 12 to 0 as the Moon passed over the Sun (a triangular pulse), where twelve digits was the angular diameter of the Sun. Minutes of immersion was tabulated from 0′0″ to 31′20″ to 0′0″, where 0′0″ used the symbol as a placeholder in two positions of his sexagesimal positional numeral system,[b] while the combination meant a zero angle. Minutes of immersion was also a continuous function 1/12 31′20″ d(24−d) (a triangular pulse with convex sides), where d was the digit function and 31′20″ was the sum of the radii of the Sun's and Moon's discs.[25] Ptolemy's symbol was a placeholder as well as a number used by two continuous mathematical functions, one within another, so it meant zero, not none.

The earliest use of zero in the calculation of the Julian Easter occurred before AD 311, at the first entry in a table of epacts as preserved in an Ethiopic document for the years AD 311 to 369, using a Ge'ez word for "none" (English translation is "0" elsewhere) alongside Ge'ez numerals (based on Greek numerals), which was translated from an equivalent table published by the Church of Alexandria in Medieval Greek.[26] This use was repeated in AD 525 in an equivalent table, that was translated via the Latin nulla or "none" by Dionysius Exiguus, alongside Roman numerals.[27] When division produced zero as a remainder, nihil, meaning "nothing", was used. These medieval zeros were used by all future medieval calculators of Easter. The initial "N" was used as a zero symbol in a table of Roman numerals by Bede—or his colleagues—around AD 725.[28]

The Sūnzĭ Suànjīng, of unknown date but estimated to be dated from the 1st to 5th centuries AD, and Japanese records dated from the 18th century, describe how the c. 4th century BC Chinese counting rods system enabled one to perform decimal calculations. As noted in Xiahou Yang's Suanjing (425–468 AD) that states that to multiply or divide a number by 10, 100, 1000, or 10000, all one needs to do, with rods on the counting board, is to move them forwards, or back, by 1, 2, 3, or 4 places,[30] According to A History of Mathematics, the rods "gave the decimal representation of a number, with an empty space denoting zero."[29] The counting rod system is considered a positional notation system.[31]

In AD 690, Empress Wǔ promulgated Zetian characters, one of which was "〇"; originally meaning 'star', it subsequently[when?] came to represent zero.

Zero was not treated as a number at that time, but as a "vacant position".[32] Qín Jiǔsháo's 1247 Mathematical Treatise in Nine Sections is the oldest surviving Chinese mathematical text using a round symbol for zero.[33] Chinese authors had been familiar with the idea of negative numbers by the Han Dynasty (2nd century AD), as seen in The Nine Chapters on the Mathematical Art.[34]

Pingala (c. 3rd/2nd century BC[35]), a Sanskrit prosody scholar,[36] used binary numbers in the form of short and long syllables (the latter equal in length to two short syllables), a notation similar to Morse code.[37] Pingala used the Sanskrit word śūnya explicitly to refer to zero.[35]

The concept of zero as a written digit in the decimal place value notation was developed in India, presumably as early as during the Gupta period (c. 5th century), with the oldest unambiguous evidence dating to the 7th century.[38]

A symbol for zero, a large dot likely to be the precursor of the still-current hollow symbol, is used throughout the Bakhshali manuscript, a practical manual on arithmetic for merchants.[39] In 2017, three samples from the manuscript were shown by radiocarbon dating to come from three different centuries: from AD 224–383, AD 680–779, and AD 885–993, making it South Asia's oldest recorded use of the zero symbol. It is not known how the birch bark fragments from different centuries forming the manuscript came to be packaged together.[40][41][42]

The Lokavibhāga, a Jain text on cosmology surviving in a medieval Sanskrit translation of the Prakrit original, which is internally dated to AD 458 (Saka era 380), uses a decimal place-value system, including a zero. In this text, śūnya ("void, empty") is also used to refer to zero.[43]

The Aryabhatiya (c. 500), states sthānāt sthānaṁ daśaguṇaṁ syāt "from place to place each is ten times the preceding."[44][45][46]

Rules governing the use of zero appeared in Brahmagupta's Brahmasputha Siddhanta (7th century), which states the sum of zero with itself as zero, and incorrectly division by zero as:[47][48]

A positive or negative number when divided by zero is a fraction with the zero as denominator. Zero divided by a negative or positive number is either zero or is expressed as a fraction with zero as numerator and the finite quantity as denominator. Zero divided by zero is zero.

The number 605 in Khmer numerals, from the Sambor inscription (Saka era 605 corresponds to AD 683). The earliest known material use of zero as a decimal figure.

There are numerous copper plate inscriptions, with the same small o in them, some of them possibly dated to the 6th century, but their date or authenticity may be open to doubt.[14]

A stone tablet found in the ruins of a temple near Sambor on the Mekong, Kratié Province, Cambodia, includes the inscription of "605" in Khmer numerals (a set of numeral glyphs for the Hindu–Arabic numeral system). The number is the year of the inscription in the Saka era, corresponding to a date of AD 683.[49]

The first known use of special glyphs for the decimal digits that includes the indubitable appearance of a symbol for the digit zero, a small circle, appears on a stone inscription found at the Chaturbhuj Temple, Gwalior, in India, dated 876.[50][51] Zero is also used as a placeholder in the Bakhshali manuscript, portions of which date from AD 224–383.[52]

The Arabic-language inheritance of science was largely Greek,[53] followed by Hindu influences.[54] In 773, at Al-Mansur's behest, translations were made of many ancient treatises including Greek, Roman, Indian, and others.

In AD 813, astronomical tables were prepared by a Persian mathematician, Muḥammad ibn Mūsā al-Khwārizmī, using Hindu numerals;[54] and about 825, he published a book synthesizing Greek and Hindu knowledge and also contained his own contribution to mathematics including an explanation of the use of zero.[55] This book was later translated into Latin in the 12th century under the title Algoritmi de numero Indorum. This title means "al-Khwarizmi on the Numerals of the Indians". The word "Algoritmi" was the translator's Latinization of Al-Khwarizmi's name, and the word "Algorithm" or "Algorism" started to acquire a meaning of any arithmetic based on decimals.[54]

Muhammad ibn Ahmad al-Khwarizmi, in 976, stated that if no number appears in the place of tens in a calculation, a little circle should be used "to keep the rows". This circle was called ṣifr.[56]

The Hindu–Arabic numeral system (base 10) reached Western Europe in the 11th century, via Al-Andalus, through Spanish Muslims, the Moors, together with knowledge of classical astronomy and instruments like the astrolabe; Gerbert of Aurillac is credited with reintroducing the lost teachings into Catholic Europe. For this reason, the numerals came to be known in Europe as "Arabic numerals". The Italian mathematician Fibonacci or Leonardo of Pisa was instrumental in bringing the system into European mathematics in 1202, stating:

After my father's appointment by his homeland as state official in the customs house of Bugia for the Pisan merchants who thronged to it, he took charge; and in view of its future usefulness and convenience, had me in my boyhood come to him and there wanted me to devote myself to and be instructed in the study of calculation for some days. There, following my introduction, as a consequence of marvelous instruction in the art, to the nine digits of the Hindus, the knowledge of the art very much appealed to me before all others, and for it I realized that all its aspects were studied in Egypt, Syria, Greece, Sicily, and Provence, with their varying methods; and at these places thereafter, while on business. I pursued my study in depth and learned the give-and-take of disputation. But all this even, and the algorism, as well as the art of Pythagoras, I considered as almost a mistake in respect to the method of the Hindus (Modus Indorum). Therefore, embracing more stringently that method of the Hindus, and taking stricter pains in its study, while adding certain things from my own understanding and inserting also certain things from the niceties of Euclid's geometric art. I have striven to compose this book in its entirety as understandably as I could, dividing it into fifteen chapters. Almost everything which I have introduced I have displayed with exact proof, in order that those further seeking this knowledge, with its pre-eminent method, might be instructed, and further, in order that the Latin people might not be discovered to be without it, as they have been up to now. If I have perchance omitted anything more or less proper or necessary, I beg indulgence, since there is no one who is blameless and utterly provident in all things. The nine Indian figures are: 9 8 7 6 5 4 3 2 1. With these nine figures, and with the sign 0  ... any number may be written.[57][58][59]

Here Leonardo of Pisa uses the phrase "sign 0", indicating it is like a sign to do operations like addition or multiplication. From the 13th century, manuals on calculation (adding, multiplying, extracting roots, etc.) became common in Europe where they were called algorismus after the Persian mathematician al-Khwārizmī. The most popular was written by Johannes de Sacrobosco, about 1235 and was one of the earliest scientific books to be printed in 1488. Until the late 15th century, Hindu–Arabic numerals seem to have predominated among mathematicians, while merchants preferred to use the Roman numerals. In the 16th century, they became commonly used in Europe.

0 is the integer immediately preceding 1. Zero is an even number[60] because it is divisible by 2 with no remainder. 0 is neither positive nor negative,[61] or both positive and negative.[62] Many definitions[63] include 0 as a natural number, in which case it is the only natural number that is not positive. Zero is a number which quantifies a count or an amount of null size. In most cultures, 0 was identified before the idea of negative things (i.e., quantities less than zero) was accepted.

As a value or a number, zero is not the same as the digit zero, used in numeral systems with positional notation. Successive positions of digits have higher weights, so the digit zero is used inside a numeral to skip a position and give appropriate weights to the preceding and following digits. A zero digit is not always necessary in a positional number system (e.g., the number 02). In some instances, a leading zero may be used to distinguish a number.

The number 0 is the smallest non-negative integer. The natural number following 0 is 1 and no natural number precedes 0. The number 0 may or may not be considered a natural number, but it is an integer, and hence a rational number and a real number (as well as an algebraic number and a complex number).

The number 0 is neither positive nor negative, and is usually displayed as the central number in a number line. It is neither a prime number nor a composite number. It cannot be prime because it has an infinite number of factors, and cannot be composite because it cannot be expressed as a product of prime numbers (as 0 must always be one of the factors).[64] Zero is, however, even (i.e. a multiple of 2, as well as being a multiple of any other integer, rational, or real number).

The following are some basic (elementary) rules for dealing with the number 0. These rules apply for any real or complex number x, unless otherwise stated.

The expression 0/0, which may be obtained in an attempt to determine the limit of an expression of the form f(x)/g(x) as a result of applying the lim operator independently to both operands of the fraction, is a so-called "indeterminate form". That does not simply mean that the limit sought is necessarily undefined; rather, it means that the limit of f(x)/g(x), if it exists, must be found by another method, such as l'Hôpital's rule.

The sum of 0 numbers (the empty sum) is 0, and the product of 0 numbers (the empty product) is 1. The factorial 0! evaluates to 1, as a special case of the empty product.

The value zero plays a special role for many physical quantities. For some quantities, the zero level is naturally distinguished from all other levels, whereas for others it is more or less arbitrarily chosen. For example, for an absolute temperature (as measured in kelvins), zero is the lowest possible value (negative temperatures are defined, but negative-temperature systems are not actually colder). This is in contrast to for example temperatures on the Celsius scale, where zero is arbitrarily defined to be at the freezing point of water. Measuring sound intensity in decibels or phons, the zero level is arbitrarily set at a reference value—for example, at a value for the threshold of hearing. In physics, the zero-point energy is the lowest possible energy that a quantum mechanical physical system may possess and is the energy of the ground state of the system.

Zero has been proposed as the atomic number of the theoretical element tetraneutron. It has been shown that a cluster of four neutrons may be stable enough to be considered an atom in its own right. This would create an element with no protons and no charge on its nucleus.

As early as 1926, Andreas von Antropoff coined the term neutronium for a conjectured form of matter made up of neutrons with no protons, which he placed as the chemical element of atomic number zero at the head of his new version of the periodic table. It was subsequently placed as a noble gas in the middle of several spiral representations of the periodic system for classifying the chemical elements.

The most common practice throughout human history has been to start counting at one, and this is the practice in early classic computer programming languages such as Fortran and COBOL. However, in the late 1950s LISP introduced zero-based numbering for arrays while Algol 58 introduced completely flexible basing for array subscripts (allowing any positive, negative, or zero integer as base for array subscripts), and most subsequent programming languages adopted one or other of these positions. For example, the elements of an array are numbered starting from 0 in C, so that for an array of n items the sequence of array indices runs from 0 to n−1. This permits an array element's location to be calculated by adding the index directly to address of the array, whereas 1-based languages precalculate the array's base address to be the position one element before the first.[citation needed]

There can be confusion between 0- and 1-based indexing, for example Java's JDBC indexes parameters from 1 although Java itself uses 0-based indexing.[citation needed]

In databases, it is possible for a field not to have a value. It is then said to have a null value.[65] For numeric fields it is not the value zero. For text fields this is not blank nor the empty string. The presence of null values leads to three-valued logic. No longer is a condition either true or false, but it can be undetermined. Any computation including a null value delivers a null result.[66]

A null pointer is a pointer in a computer program that does not point to any object or function. In C, the integer constant 0 is converted into the null pointer at compile time when it appears in a pointer context, and so 0 is a standard way to refer to the null pointer in code. However, the internal representation of the null pointer may be any bit pattern (possibly different values for different data types).[citation needed]

In mathematics −0 = +0 = 0; both −0 and +0 represent exactly the same number, i.e., there is no "positive zero" or "negative zero" distinct from zero. However, in some computer hardware signed number representations, zero has two distinct representations, a positive one grouped with the positive numbers and a negative one grouped with the negatives; this kind of dual representation is known as signed zero, with the latter form sometimes called negative zero. These representations include the signed magnitude and one's complement binary integer representations (but not the two's complement binary form used in most modern computers), and most floating point number representations (such as IEEE 754 and IBM S/390 floating point formats).

In binary, 0 represents the value for "off", which means no electricity flow.[67]

The Unix epoch (the date and time associated with a zero timestamp) begins the midnight before the first of January 1970.[68][69][70]

The Classic Mac OS epoch and Palm OS epoch (the date and time associated with a zero timestamp) begins the midnight before the first of January 1904.[71]

Many APIs and operating systems that require applications to return an integer value as an exit status typically use zero to indicate success and non-zero values to indicate specific error or warning conditions.

Programmers often use a slashed zero to avoid confusion with the letter "O".[72]

The modern numerical digit 0 is usually written as a circle or ellipse. Traditionally, many print typefaces made the capital letter O more rounded than the narrower, elliptical digit 0.[74] Typewriters originally made no distinction in shape between O and 0; some models did not even have a separate key for the digit 0. The distinction came into prominence on modern character displays.[74]

In the BC calendar era, the year 1 BC is the first year before AD 1; there is not a year zero. By contrast, in astronomical year numbering, the year 1 BC is numbered 0, the year 2 BC is numbered −1, and so forth.[75]