This commit is contained in:
Miloslav Ciz 2025-03-19 21:20:29 +01:00
parent 5a2b049dca
commit 86d87acac8
12 changed files with 1973 additions and 1963 deletions

View file

@ -4,13 +4,13 @@ WIP kind of
{ There's most likely a lot of BS, math people pls send me corrections, thank u. ~drummyfish }
Numbers (from Latin *numerus* coming from a Greek word meaning "to distribute") are one of the most elementary [mathematical](math.md) objects, building [stones](rock.md) serving most often as quantitative values (that is: telling count, size, length, order etc.), in higher math also used in much more [abstract](abstraction.md) ways which have only distant relationship to traditional counting. Examples of numbers are minus [one](one.md) half, [zero](zero.md), [pi](pi.md) or [i](i.md). Numbers constitute the basis and core of mathematics and as such they sit almost at the [lowest level](low_level.md) of it, i.e. most other things such as algebra, [functions](function.md) and [equations](equation.md) are built on top of numbers or require numbers to even be examined. In modern mathematics numbers themselves aren't on the absolute bottom of the foundations though, they are themselves built on top of [sets](set.md), as set theory is most commonly used as a basis of whole mathematics, however for many purposes this is just a formalism that's of practical interest only to some mathematicians -- on the other hand numbers just cannot be avoided anywhere, by a mathematician or just a common folk. The word *number* may be the first that comes to our mind when we say *mathematics*. The area of [number theory](number_theory.md) is particularly focused on examining numbers (though it's examining almost exclusively integer numbers because these seem to have the deepest pattern related e.g. to divisibility). Interest in numbers isn't exclusive to mathematics -- numbers also play an important role in [culture](culture.md) and religion for example; some even believe in "[magical](magic.md)" power of numbers (see [numerology](numerology.md)).
Numbers (from Latin *numerus* coming from a Greek word meaning "to distribute") are one of the most elementary [mathematical](math.md) objects, building [stones](rock.md) serving most often as quantitative values (that is: telling count, size, length, order etc.) and labels, in higher math also used in much more [abstract](abstraction.md) ways which have only distant relationship to traditional counting. Examples of numbers are minus [one](one.md) half, [zero](zero.md), [pi](pi.md) or [i](i.md). Numbers constitute the basis and core of mathematics and as such they sit almost at the [lowest level](low_level.md) of it, i.e. most other things such as algebra, [functions](function.md) and [equations](equation.md) are built on top of numbers or require numbers to even be examined. In modern mathematics numbers themselves do not reside on the absolute bottom of the foundations though, they are themselves built on top of [sets](set.md), as set theory is most commonly used as a basis of whole mathematics, however for many purposes this is just a formalism that's of practical interest only to some mathematicians (as the topic gets closer to the fringes of mathematics and at times rather pertains to [philosophy](philosophy.md)) -- on the other hand numbers just cannot be avoided anywhere, by a mathematician or just a common folk. The word *number* may be the first that comes to our mind when we say *mathematics*. The area of [number theory](number_theory.md) is particularly focused on examining numbers (though it's examining almost exclusively integer numbers because these seem to have the deepest pattern related e.g. to divisibility). Interest in numbers isn't exclusive to mathematics -- numbers also play an important role in [culture](culture.md) and religion for example; some even believe in "[magical](magic.md)" power of numbers (see [numerology](numerology.md)).
Do not [confuse](often_confused.md) numbers with digits or figures (numerals) -- a number is a purely abstract entity while digits serve as symbols for numbers so that we can write them down. One number may be written in many ways, using one of many [numeral systems](numeral_system.md) (Roman numerals, tally marks, Arabic numerals of different [bases](base.md) etc.), for example 4 stands for a number than can also be written as IV, four, 8/2, 16:4, 2^2, 4.00 or 0b100. There are also numbers which cannot be exactly expressed with our traditional numeral systems, for some of them we have special symbols -- most famous example is of course [pi](pi.md) whose digits cannot ever be completely written down -- and there are even numbers lacking any symbolic representation, ones not well researched yet, only described by equations to which they are the solution. Sure enough, a number by itself isn't too interesting and probably doesn't even make sense, it's only in context, when it's placed in relationship with other numbers (by ordering them, defining operations and properties based on those operations) that patterns and useful attributes emerge.
Numbers must not be [confused](often_confused.md) with digits or figures (numerals) -- a number is a purely abstract entity while digits serve as symbols for numbers so that they can be written down. The same number may be represented with many different symbols, using one of many [numeral systems](numeral_system.md) (Roman numerals, tally marks, Arabic numerals of different [bases](base.md) etc.), for example 4 stands for a number than can also be written as IV, four, IIII, 8/2, 16:4, 2^2, 4.00 or 0b100. There are also numbers which cannot be exactly expressed with our traditional numeral systems, for some of them we have special symbols -- most prominent example is of course [pi](pi.md) whose digits in decimal expansion form an [infinite](infinity.md) series -- and there are even numbers lacking any symbolic representation, ones not well researched yet or not important enough, only described by equations to which they are the solution. Sure enough, a number by itself isn't too interesting and probably doesn't even make sense, it's only in context, when it's placed in relationship with other numbers (by ordering them, defining operations and properties based on those operations) that patterns and useful attributes emerge.
Humans first started to use positive natural numbers (it seems as early as 30000 BC), i.e. 1, 2, 3 ..., so as to be able to trade, count enemies, days and so on -- since then they kept expanding the concept of a number with more [abstraction](abstraction.md) as they encountered more complex problems. First extension was to fractions, initially reciprocals of integers (like one half, one third, ...) and then general ones. Around 6th century BC Pythagoras showed that there even exist numbers that cannot be expressed as fractions ([irrational numbers](irrational_number.md), which in the beginning was a controversial discovery), expanding the set of known numbers further. A bit later (around 100 BC) negative numbers started to be used. Adoption of the number [zero](zero.md) also took some time (1st use of true zero seem to be in 4th century BC), with it first just having a limited use as a mere placeholder digit. Since 16th century a highly abstract concept of [complex numbers](complex_number.md) started to appear, which was later (19th century) expanded further to [quaternions](quaternion.md). With more advancement in mathematics -- e.g. with the development of set theory -- more and more concepts of new kinds of numbers appeared and still appear to this day. Nowadays we have greatly abstract numbers, ones existing in many dimensions, capable of counting and measuring infinitely large and infinitely small entities, and it seems we still haven't nearly discovered everything there is to know about numbers.
To embark on the [history](history.md) a bit, humans first started to use positive natural numbers (it seems as early as 30000 BC), i.e. 1, 2, 3 ..., so as to be able to trade, count enemies, days and so on -- since then they kept expanding the concept of a number with more [abstraction](abstraction.md) as they encountered more complex problems. First extension was to fractions, initially reciprocals of integers (like one half, one third, ...) and then general ones. Around 6th century BC Pythagoras showed that there even exist numbers that cannot be expressed as fractions ([irrational numbers](irrational_number.md), which in the beginning was a controversial discovery), expanding the set of known numbers further. A bit later (around 100 BC) negative numbers started to be used. Adoption of the number [zero](zero.md) also took some time (1st use of true zero seem to be in 4th century BC), with it first just having a limited use as a mere placeholder digit. Since 16th century a highly abstract concept of [complex numbers](complex_number.md) started to appear, which was later (19th century) expanded further to [quaternions](quaternion.md). With more advancement in mathematics -- e.g. with the development of set theory -- more and more concepts of new kinds of numbers appeared and still appear to this day. Nowadays we have greatly abstract numbers, ones existing in many dimensions, capable of counting and measuring infinitely large and infinitely small entities, and it seems we still haven't nearly discovered everything there is to know about numbers.
Basically **anything can be encoded as a number** which makes numbers a universal abstract "medium" -- we can exploit this in both mathematics and [programming](programming.md) (which are actually the same thing). Ways of encoding [information](information.md) in numbers may vary, for a mathematician it is natural to see any number as a multiset of its [prime](prime.md) factors (e.g. 12 = 2 * 2 * 3, the three numbers are inherently embedded within number 12) that may carry a message, a programmer will probably rather encode the message in [binary](binary.md) and then interpret the 1s and 0s as a number in direct representation, i.e. he will embed the information in the digits. You can probably come up with many more ways.
Basically **anything can be encoded as a number** which makes numbers a universal abstract "medium" -- this can be exploited in both mathematics and [programming](programming.md) (which are actually the same thing). Ways of encoding [information](information.md) as numbers may vary, for a mathematician it is natural to see any number as a multiset of its [prime](prime.md) factors (e.g. 12 = 2 * 2 * 3, the three numbers are inherently embedded within number 12) that may carry a message, a programmer will probably rather encode the message in [binary](binary.md) and then interpret the 1s and 0s as a number in direct representation, i.e. he will embed the information in the digits. You can probably come up with many more ways.
But what really is a number? What makes number a number? Where is the border between numbers and other abstract objects? Essentially number is an abstract mathematical object made to model something about [reality](irl.md) (most fundamentally the concept of counting, expressing amount) which only becomes meaninful and useful by its relationship with other similar objects -- other numbers -- that are parts of the same, usually (but not necessarily) infinitely large set. We create systems to give these numbers names because, due to there being infinitely many of them, we can't name every single one individually, and so we have e.g. the [decimal](decimal.md) system in which the name 12345 exactly identifies a specific number, but we must realize these names are ultimately not of mathematical importance -- we may call a number 1, I, 2/2, "one", "uno" or "jedna", it doesn't matter -- what's important are the relationships between numbers that create a STRUCTURE. I.e. a set of infinitely many objects is just that and nothing more; it is the relationships that allow us to operate with numbers and that create the difference between integers, real numbers or the set of colors. These relatinships are expressed by operations (functions, maps, ...) defined with the numbers: for example the comparison operation *is less than* (<) which takes two numbers, *x* and *y*, and always says either *yes* (*x* is smaller than *y*) or *no*, gives numbers order, it creates the number line and allows us to count and measure. Number sets usually have similar operations, typically for example addition and multiplication, and this is how we intuitively judge what numbers are: they are sets of objects that have defined operations similar to those of natural numbers (the original "cavemen numbers"). However some more "advanced" kind of numbers may have lost some of the simple operations -- for example [complex numbers](complex_number.md) are not so straightforward to compare -- and so they may get more and more distant from the original natural numbers. And this is why sometimes the border between what is and what isn't a number may be blurry -- for example it can't objectively be said if infinity is a number or not, simply because number sets that include infinity lose many of the nicely defined operations, the structure of the set changes a lot. So arguing about what is a number ultimately becomes subjective, it's similar to arguing about what is and isn't a planet.
@ -128,7 +128,7 @@ Here patterns start to show, for example the level one of the tree are all prime
## Numbers In Math
There are different types of numbers, in mathematics we classify them into [sets](set.md) (if we further also consider the operations we can perform with numbers we also sort them into algebras and structures like [groups](group.md), [fields](field.md) or [rings](ring.md)). Though we can talk about finite sets of numbers perfectly well (e.g. [modulo](mod.md) arithmetic, [Boolean algebra](boolean_algebra.md) etc.), we are firstly considering [infinite](infinity.md) sets (curiously some of these infinite sets can still be considered "bigger" than other infinite sets, e.g. by certain logic there is more real numbers than rational numbers, i.e. "fractions"). Some of these sets are subsets of others, some overlap and so forth. Here are some notable number sets (note that a list can potentially not capture all relationships between the sets):
There are countless different types of numbers, in mathematics we classify them into [sets](set.md) (and if we additionally consider operations with numbers too, we also sort them into algebras and structures such as [groups](group.md), [fields](field.md) or [rings](ring.md)). Although we can talk about finite sets of numbers perfectly well (e.g. [modulo](mod.md) arithmetic, [Boolean algebra](boolean_algebra.md) etc.), we are often examining and using [infinite](infinity.md) sets (curiously some of these infinite sets can still be considered "bigger" than other infinite sets, e.g. by certain logic there is more real numbers than rational numbers, i.e. "fractions"). Some of these sets are subsets of others, some overlap and so forth. Here are some notable number sets (note that a list can potentially not capture all relationships between the sets):
- **all**: Anything conceivable as a number, even by stretch. E.g. [zero](zero.md), minus [infinity](infinity.md) or aleph one.
- **[unknowable](knowability.md)**: Cannot be known for some reason, e.g. being non-computable or requiring more energy for their computation than will ever be present in our [Universe](universe.md).
@ -163,11 +163,11 @@ There are different types of numbers, in mathematics we classify them into [sets
One of the most [interesting](interesting.md) and mysterious number sets are the [prime numbers](prime.md), in fact many number theorists dedicate their whole careers solely to them. Primes are the kind of thing that's defined very simply but give rise to a whole universe of mysteries and whys, there are patterns that seem impossible to describe, conjectures that look impossible to prove and so on. Another similar type of numbers are the [perfect numbers](perfect_number.md).
Of course there are countless other number sets, especially those induced by various number sequences and functions of which there are whole encyclopedias. Another possible division is e.g. to *cardinal* and *ordinal* numbers: ordinal numbers tell the order while cardinals say the size (cardinality) of a set -- when dealing with finite sets the distinction doesn't really have to be made, within natural numbers the order of a number is equal to the size of a set of all numbers up to that number, but with infinite sets this starts to matter -- for example we couldn't tell the size of the set of natural numbers by ordinals as there is no last natural number, but we can assign the set a cardinal number (aleph zero) -- this gives rise to new kind of numbers.
Of course there are countless other number sets, especially those induced by various number sequences and functions of which there are whole [encyclopedias](encyclopedia.md). Another possible division is e.g. to *cardinal* and *ordinal* numbers: ordinal numbers tell the order while cardinals say the size (cardinality) of a set -- when dealing with finite sets the distinction doesn't really have to be made, within natural numbers the order of a number is equal to the size of a set of all numbers up to that number, but with infinite sets this starts to matter -- for example we couldn't tell the size of the set of natural numbers by ordinals as there is no last natural number, but we can assign the set a cardinal number (aleph zero) -- this gives rise to new kind of numbers.
Worthy of mentioning is also [linear algebra](linear_algebra.md) which treats [vectors](vector.md) and [matrices](matrix.md) like elementary algebra treats numbers -- though vectors and matrices aren't usually seen as numbers, they may be seen as an extension of the concept.
**Numbers are [awesome](awesome.md)**, just ask any number theorist (or watch a numberphile video for that matter). Normal people see numbers just as boring soulless quantities but the opposite is true for that who studies them -- study of numbers goes extremely deep, possibly as deep as humans can go and once you get a closer look at something, you discover the art of nature. Each number has its own unique set of properties which give it a kind of "personality", different sets of numbers create species and "teams" of numbers. Numbers are intertwined in intricate ways, there are literally infinitely many patterns that are all related in weird ways -- normies think that mathematicians know basically everything about numbers, but in higher math it's the exact opposite, most things about number sequences are mysterious and mathematicians don't even have any clue about why they're so, many things are probably even [unknowable](knowability.md). Numbers are also self referencing which leads to new and new patterns appearing without end -- for example prime numbers are interesting numbers, but you may start counting them and a number that counts numbers is itself a number, you are getting new numbers just by looking at other numbers. The world of numbers is like a whole universe you can explore just in your head, anywhere you go, it's almost like the best, most free video [game](game.md) of all time, embedded right in this [Universe](universe.md), in [logic](logic.md) itself. Numbers are like animals, some are small, some big, some are hardly visible, trying to hide, some can't be overlooked -- they inhabit various areas and interact with each other, just exploring this can make you quite happy. { Pokemon-like game with numbers when? ~drummyfish }
**Numbers are [awesome](awesome.md)**, just ask any number theorist (or watch a numberphile video for that matter). Normal people perceive numbers just as boring, soulless quantities but the opposite is true for that who studies them with [love](love.md) -- the world of numbers is staggeringly beautiful, their study runs to depths without end, possibly as far as humans can ever hope to get a glimpse at the mechanisms of our [Universe](universe.md), and oftentimes once you pay a closer attention to a seemingly innocently looking detail, you reveal a breathtaking pattern and discover the [art](art.md) of nature. Each number has its own unique set of properties which give it a kind of "personality", different sets of numbers create species and "teams" of numbers. Numbers are intertwined in intricate ways, there are literally infinitely many patterns that are all related in weird ways -- normies think that mathematicians know basically everything about numbers, but in higher math it's the exact opposite, most things about number sequences are mysterious and mathematicians don't even have any clue about why they're so, many things are probably even [unknowable](knowability.md). Numbers are also self referencing which leads to new and new patterns appearing without end -- for example prime numbers are interesting numbers, but you may start counting them and a number that counts numbers is itself a number, you are getting new numbers just by looking at other numbers. The world of numbers is like a whole universe you can explore just in your head, anywhere you go, it's almost like the best, most free video [game](game.md) of all time, embedded right in this [Universe](universe.md), in [logic](logic.md) itself. Numbers are like animals, some are small, some big, some are hardly visible, trying to hide, some can't be overlooked -- they inhabit various areas and interact with each other, just exploring this can make you quite happy. { Pokemon-like game with numbers when? ~drummyfish }
There is a famous [encyclopedia](encyclopedia.md) of integer sequences at https://oeis.org/, made by number theorists -- it's quite [minimalist](minimalism.md), now also [free licensed](free_culture.md) (used to be [proprietary](proprietary.md), they seem to enjoy license hopping). At the moment it contains more than 370000 sequences; by browsing it you can get a glimpse of how deep the study of numbers goes. These people are also [funny](fun.md), they give numbers entertaining names like *happy numbers* (adding its squared digits eventually gives 1), *polite numbers*, *friendly numbers*, *cake numbers*, *lucky numbers* or *weird numbers*.
@ -179,7 +179,7 @@ TODO: what is the best number? maybe top 10? would 10 be in top 10? what's the f
## Numbers In Programming/Computers
While mathematicians work mostly with infinite number sets and all kind of "weird" hypothetical numbers like hyperreals and transcendentals, [programmers](programming.md) still mostly work with "normal", practical numbers and have to limit themselves to finite number sets because, of course, computers have limited memory and can only store limited number of numeric values -- computers typically work with [modulo](mod.md) arithmetic with some high power of two modulo, e.g. 2^32 or 2^64, which is a [good enough](good_enough.md) approximation of an infinite number set. Mathematicians are as precise with numbers as possible as they're interested in structures and patterns that numbers form, programmers just want to use numbers to solve problems, so they mostly use [approximations](approximation.md) where they can -- for example programmers normally approximate [real numbers](real_number.md) with [floating point](float.md) numbers that are really just a subset of rational numbers. This isn't really a problem though, computers can comfortably work with numbers large and precise enough for solving any practical problem -- a slight annoyance is that one has to be careful about such things as [underflows](underflow.md) and [overflows](overflow.md) (i.e. a value wrapping around from lowest to highest value and vice versa), limited and sometimes non-uniform precision resulting in [error](error.md) accumulation, unlinearization of linear systems and so on. Programmers also don't care about strictly respecting some properties that certain number sets must mathematically have, for example integers along with addition are mathematically a [group](group.md), however signed integers in [two's complement](twos_complement.md) aren't a group because the lowest value doesn't have an inverse element (e.g. on 8 bits the lowest value is -128 and highest 127, the lowest value is missing its partner). Programmers also allow "special" values to be parts of their number sets, especially e.g. with the common IEEE [floating point](float.md) types we see values like plus/minus [infinity](infinity.md), [negative zero](negative_zero.md) or [NaN](nan.md) ("not a number") which also break some mathematical properties and creates situations like having a number that says it's not a number, but again this really doesn't play much of a role in practical problems. Numbers in computers are represented in [binary](binary.md) and programmers themselves often prefer to write numbers in binary, hexadecimal or octal representation -- they also often meet powers of two rather than powers of ten or primes or other similar limits (for example the data type limits are typically limited by some power of two). There also comes up the question of specific number encoding, for example direct representation, sign-magnitude, [two's complement](twos_complement.md), [endianness](byte_sex.md) and so on. Famously programmers start counting from 0 (they go as far as using the term "zeroth") while mathematicians rather tend to start at 1. Just as mathematicians have different sets of numbers, programmers have an analogy in numeric [data types](data_type.md) -- a data type defines a set of values and operations that can be performed with them. The following are some of the common data types and representations of numbers in computers:
While mathematicians work mostly with infinite number sets and all kind of "weird" hypothetical numbers like hyperreals and transcendentals, [programmers](programming.md) still mostly work with "normal" numbers pertaining to practical applications, and have to limit themselves to finite number sets because, of course, computers have limited memory and can only store limited number of numeric values -- computers typically work with [modulo](mod.md) arithmetic with some high power of two modulo, e.g. 2^32 or 2^64, which is a [good enough](good_enough.md) approximation of an infinite number set. Mathematicians are as precise with numbers as possible as they're interested in structures and patterns that numbers form, programmers just want to use numbers to solve problems, so they mostly use [approximations](approximation.md) where they can -- for example programmers normally approximate [real numbers](real_number.md) with [floating point](float.md) numbers that are really just a subset of rational numbers. This isn't really a problem though, computers can comfortably work with numbers large and precise enough for solving any practical problem -- a slight annoyance is that one has to be careful about such things as [underflows](underflow.md) and [overflows](overflow.md) (i.e. a value wrapping around from lowest to highest value and vice versa), limited and sometimes non-uniform precision resulting in [error](error.md) accumulation, unlinearization of linear systems and so on. Programmers also don't care about strictly respecting some properties that certain number sets must mathematically have, for example integers along with addition are mathematically a [group](group.md), however signed integers in [two's complement](twos_complement.md) aren't a group because the lowest value doesn't have an inverse element (e.g. on 8 bits the lowest value is -128 and highest 127, the lowest value is missing its partner). Programmers also allow "special" values to be parts of their number sets, especially e.g. with the common IEEE [floating point](float.md) types we see values like plus/minus [infinity](infinity.md), [negative zero](negative_zero.md) or [NaN](nan.md) ("not a number") which also break some mathematical properties and creates situations like having a number that says it's not a number, but again this really doesn't play much of a role in practical problems. Numbers in computers are represented in [binary](binary.md) and programmers themselves often prefer to write numbers in binary, hexadecimal or octal representation -- they also often meet powers of two rather than powers of ten or primes or other similar limits (for example the data type limits are typically limited by some power of two). There also comes up the question of specific number encoding, for example direct representation, sign-magnitude, [two's complement](twos_complement.md), [endianness](byte_sex.md) and so on. Famously programmers start counting from 0 (they go as far as using the term "zeroth") while mathematicians rather tend to start at 1. Just as mathematicians have different sets of numbers, programmers have an analogy in numeric [data types](data_type.md) -- a data type defines a set of values and operations that can be performed with them. The following are some of the common data types and representations of numbers in computers:
- **numeric**: Anything considered a number. In very high level languages there may be just one generic "number" type that can store any kind of number, automatically choosing best representation for it etc.
- **[unsigned](unsigned.md)**: Don't allow negative values -- this is sufficient in many cases, simpler to implement and can offer higher range in the positive direction.