This commit is contained in:
Miloslav Ciz 2024-04-03 22:57:42 +02:00
parent f8e54987d6
commit 5f4a7f55f9
11 changed files with 1742 additions and 1741 deletions

View file

@ -1,6 +1,6 @@
# Real Number
Real numbers are all [numbers](number.md) found on the infinite, continuous one dimensional number line, they often represent what we generally just mean by the term "number" and include for example [zero](zero.md), [pi](pi.md) or -39/11. The [set](set.md) or real numbers includes all [whole numbers](integer.md) as well as all [rational numbers](rational_number.md) (fractions with integer nominator and denominator), but in addition contains infinitely many "special" numbers such as [pi](pi.md), [e](e.md) or [square root](sqrt.md) of 2, numbers that are mathematically very interesting because they for example produce infinitely many digits in our traditional number notation without showing any obvious patterns. However it has to be noted real numbers still do NOT include for example [infinity](infinity.md) or [complex numbers](complex_number.md) (kind of "2D extension" of real numbers) such as [i](i.md). Real numbers really represent a **[continuum](continous.md)**, between any two numbers that are not the same there is always infinitely many real numbers that have no gaps in between -- this leads to the fact that not only is there infinitely many real numbers, but there is **[uncountably many](uncountable.md)** of them, i.e. simply put there is "more than traditional infinity" of real numbers. [Mathematically](math.md) the set of real numbers and operations with them form a structure called a *[field](field.md)* (so you'll often hear the term "field of real numbers").
Real numbers are all [numbers](number.md) found on the infinite, continuous one dimensional number line, they often represent what we generally just mean by the term "number" and include for example [zero](zero.md), [pi](pi.md) or -39/11. The [set](set.md) or real numbers includes all [whole numbers](integer.md) as well as all [rational numbers](rational_number.md) (fractions with integer numerator and denominator), but in addition contains infinitely many "special" numbers such as [pi](pi.md), [e](e.md) or [square root](sqrt.md) of 2, numbers that are mathematically very interesting because they for example produce infinitely many digits in our traditional number notation without showing any obvious patterns. However it has to be noted real numbers still do NOT include for example [infinity](infinity.md) or [complex numbers](complex_number.md) (kind of "2D extension" of real numbers) such as [i](i.md). Real numbers really represent a **[continuum](continous.md)**, between any two numbers that are not the same there is always infinitely many real numbers that have no gaps in between -- this leads to the fact that not only is there infinitely many real numbers, but there is **[uncountably many](uncountable.md)** of them, i.e. simply put there is "more than traditional infinity" of real numbers. [Mathematically](math.md) the set of real numbers and operations with them form a structure called a *[field](field.md)* (so you'll often hear the term "field of real numbers").
WATCH OUT: even though in programming we sometimes encounter [data types](data_type.md) named *real*, they usually don't represent true real numbers! In [programming](programming.md) we mostly only [approximate](approximation.md) real numbers with [floating](float.md) or [fixed](fixed_point.md) point numbers, which really are only rational numbers -- this is practically always [good enough](good_enough.md), we don't ever need an exact value of pi, a few decimal digits of accuracy is enough to an engineer, but to a mathematician real numbers represent a completely new, different world with some fundamental differences, which even a mere programmer should be at least aware of. Real numbers are tied to questions of the continuum, infinitely big and infinitely small, and they can really eventually lead to deep philosophical debates.
@ -8,7 +8,7 @@ TODO: history?
## The Greater, Uncountable Infinity Of Reals
Compared to the basic sets of numbers, such as [natural](natural_number.md) and [rational numbers](rational_number.md), real numbers are special because **there are [uncountably](uncountable.md) many** of them, i.e not just [infinitely](infinity.md) many; in a sense the infinity representing how many real numbers there are is a **"bigger infinity"** than that representing the size (better said [cardinality](cardinality.md)) of sets of for example natural and rational numbers (which are still infinite, but only *countably* infinite); even if we consider just real numbers between 0 and 1, there is still kind of "more" of them than there are e.g. all possible fractions (with integer nominator and denominator). At first it looks like fractions and real numbers are kind of the same, but this is not true, fractions are still kind of sparse, [discrete](discrete.md), even though we can use fractions to infinitely divide the number line, there will always be kind of "gaps" between them; on the other hand real numbers are TRULY continuous in nature: there are infinitely many "special" numbers among real numbers, such as [pi](pi.md) and [e](e.md) (but most just without any special name, e.g. [square root](sqrt.md) of 2), that can never be written as a fraction of integers or as a number with finite decimal expansion (which is really the same thing as being a fraction), i.e. some real numbers we can approximately write down in decimal expansion (i.e. like 1.23456...) but never finish as their decimal expansion goes on forever and lacks any simple pattern. This is what gives rise to the fact that there are many more real numbers than integers and fractions -- due to this possibility of having "infinitely many arbitrary digits after the decimal point" **we cannot produce an ordered list of real numbers**, i.e. we cannot create a system that would say "this is the first real number, this is the second, this is third, ..." in a way that would eventually list out all the real numbers. I.e. we cannot establish a 1:1 mapping between natural numbers and real numbers, something that IS possible with integers and fractions (though with fractions it's less obvious), even considering things like negative numbers, we can order integers e.g. like: 0, 1, -1, 2, -2, 3, -3, .... With real numbers this is impossible, so we say the infinite size of the set of real numbers is uncountable.
Compared to the basic sets of numbers, such as [natural](natural_number.md) and [rational numbers](rational_number.md), real numbers are special because **there are [uncountably](uncountable.md) many** of them, i.e not just [infinitely](infinity.md) many; in a sense the infinity representing how many real numbers there are is a **"bigger infinity"** than that representing the size (better said [cardinality](cardinality.md)) of sets of for example natural and rational numbers (which are still infinite, but only *countably* infinite); even if we consider just real numbers between 0 and 1, there is still kind of "more" of them than there are e.g. all possible fractions (with integer numerator and denominator). At first it looks like fractions and real numbers are kind of the same, but this is not true, fractions are still kind of sparse, [discrete](discrete.md), even though we can use fractions to infinitely divide the number line, there will always be kind of "gaps" between them; on the other hand real numbers are TRULY continuous in nature: there are infinitely many "special" numbers among real numbers, such as [pi](pi.md) and [e](e.md) (but most just without any special name, e.g. [square root](sqrt.md) of 2), that can never be written as a fraction of integers or as a number with finite decimal expansion (which is really the same thing as being a fraction), i.e. some real numbers we can approximately write down in decimal expansion (i.e. like 1.23456...) but never finish as their decimal expansion goes on forever and lacks any simple pattern. This is what gives rise to the fact that there are many more real numbers than integers and fractions -- due to this possibility of having "infinitely many arbitrary digits after the decimal point" **we cannot produce an ordered list of real numbers**, i.e. we cannot create a system that would say "this is the first real number, this is the second, this is third, ..." in a way that would eventually list out all the real numbers. I.e. we cannot establish a 1:1 mapping between natural numbers and real numbers, something that IS possible with integers and fractions (though with fractions it's less obvious), even considering things like negative numbers, we can order integers e.g. like: 0, 1, -1, 2, -2, 3, -3, .... With real numbers this is impossible, so we say the infinite size of the set of real numbers is uncountable.
At first this is usually confusing and hard to comprehend, keep in mind we are dealing with [infinities](infinity.md) here and so intuition fails us, what we mean by "size" of an infinite set is better called a [cardinality](cardinality.md) because this is not really a size as we understand it with finite sets, it's a kind of generalization of it that allows us to examine infinity, but as we start dealing with infinities we have to be careful as things we usually take for granted may no longer hold -- for example here we may have a superset of a set of numbers (e.g. all integers, including negative ones, is a superset of natural numbers, which exclude negative numbers) with both sets having the same "size"/cardinality, i.e. something that with finite sets can't happen. With infinities we cannot measure size with counting elements -- there are always infinitely many -- but we can try with making mappings between the sets, which does tell us new things. But we are still in a different realm where our traditional language doesn't work and at best we sometimes have only "close enough" terms for things we encounter there.
@ -26,11 +26,11 @@ Here is a **[proof](proof.md)** by contradiction of not being able to create an
Now however we can consider a number *X* whose digits are `not(R1_1)`, `not(R2_2)`, `not(R3_3)`, `not(R4_4)` etc., i.e. the number is obtained by taking the table's diagonal and inverting all the digits (1s to 0s and vice versa). We can see number *X* is not present in the table because it is different from every other number in the table -- with any number *RN* it will differ AT LEAST by the *N*th bit. By this we arrive at the contradiction with the original claim that we have an ordered list of ALL real numbers, therefore such list cannot exist.
Another **cool view of real numbers** is this: imagine fractions (rational numbers) in fact sitting on a 2D grid, having coordinates given by their denominator and nominator, e.g. number 3/2 sits at [2,3], i.e. has *x* coordinate 2 and *y* coordinate 3. We are standing at point [0,0] and so every number projects to our field of view, i.e. to an angle from -90 degrees to 90 degrees (with these extremes representing minus and plus infinity, looking straight forward we see [zero](zero.md)). Notice that for example numbers 2/3 and 4/6 exactly overlap from out point of view, as they represent the same value:
Another **cool view of real numbers** is this: imagine fractions (rational numbers) in fact sitting on a 2D grid, having coordinates given by their denominator and numerator, e.g. number 3/2 sits at [2,3], i.e. has *x* coordinate 2 and *y* coordinate 3. We are standing at point [0,0] and so every number projects to our field of view, i.e. to an angle from -90 degrees to 90 degrees (with these extremes representing minus and plus infinity, looking straight forward we see [zero](zero.md)). Notice that for example numbers 2/3 and 4/6 exactly overlap from out point of view, as they represent the same value:
```
...^ nominator
...^ numerator
6 |. . . . . . . __/ 2/3 = 4/6 = 8/12 = ...
5 |. . . . . .__/
4 |. . . . __/ .