lunes, 26 de marzo de 2018

Approach to Irrational Numbers

Irrational numbers

Introduction

As in the case of rational numbers, this article begins with a visit to a dictionary. The word irrational in The American Heritage Dictionary gives (as adjective): 1.a. Not endowed with reason. b. Affected by loss of usual or normal mental clarity; incoherent, as from shock. c. Marked by a lack of accord with reason or sound judgement: an irrational dislike. ... 3.Mathematics. Of or relating to an irrational number.

There is also a definition for irrational number: Any real number that cannot be expressed as an integer or as a ratio between two integers.

Historically, the adjective irrational corresponds to the pythagorean reject to numbers different from integers or quotients (ratios) between them.

Geometric theorems  like the following could lead to think that relations between two lengths can always be expressed by means of a quotient between integers, This was a belief  for pythagoreans.


If D, E are mid points of sides of triangle ABC, then DE = (1/2)AB, or DE/AB = 1/2

If lines FL and HJ are medians for the triangle FGH, then HK = (2/3)HJ, or HK/HJ = 2/3.

However, a situation like the following contradicts such assumption: If polygon ABCD is a square, and BD is a diagonal then...


 
BD/AB = ?

The so called Pythagorean Theorem establish that  


Now, the question is if the square root of 2 is a rational number or not.

It will be proved, by contradiction, that the square root of 2 is not a rational number. 

Suppose that square root of 2 is rational. Then it can be expressed as the quotient of two integers , a, b. The fundamental theorem of arithmetic states that an integer can be expressed in terms of their prime factors, in a unique way. If the considered integer is prime, say p, it can be expressed as 1 * p.


In above equation the left side and the right side are expressions of the same number. In the left side there are a total of 2s +1 prime factors (since the prime factor 2 is included). In the right side there are a total of 2t prime factors. In this way it has obtained two different expressions for the same integer: one with an odd number of prime factors and the other with an even number of prime factors.

This contradiction with the fundamental theorem of arithmetic comes from the supposing about rationality of √2. The conclusion is that √2 is not a rational number. This result was catastrophic for the pythagorean brotherhood, but it opened a window to a new kind of numbers.

Above kind of proof of irrationality for square root of 2 can be used to demonstrate that if p is a prime number then square root of p is irrational..

Decimal representation of irrational numbers

Using an algorithm to obtain rational approximations to square root of two it can be obtained decimal expressions of this irrational number.

To obtain √2, an archaic method is

A calculator gives directly 1.41421356...

A computer program can do an impressive result like

1.41421356237309504880168872420969807856967187537694807317667973799073 ...

where it cannot ever found a repeating period. If it happened the number could be represented in quotient form a/b.

Some notable irrational numbers

As well as √2, there are other notable irrational numbers.

π = 3.141592653589793238462643383279502884197169399375... is associated with C/D, where C is the length of a circle and D is the length of its diameter.

e = 2.718281828459045235360287471352662497757247093700 ...is associated with the limit when n tends to infinity in
 For n = 1 the value is 2. For n = 2 the value is 9/4 = 2.25. For n = 3 the value is 64/ 27 =2.3703. Former values are rational, but as n ttakes greater values periodicity tends to disappear.

The so called golden ratio is an irrational number too: (1 + √5)/2 = 1.61803398...

Some operations with irrational and rational numbers

It is clear that addition, multiplication, subtraction and division  between two rational numbers give a rational number as a result. But, what happen when rational and irrational numbers are involved?

Let A be a rational number and B an irrational. If A + B = C then C has to be rational or irrational. If C is rational, then C - A = B and B would be rational which gives a contradiction. The conclusion is, C is irrational. Example: 4 + √3 is irrational.

What happen with A + B if both of them are irrationals? The result could be or not a rational. 

Example (1): A = 2/3 + √5, and B = 1/2 - √5. A + B = 7/6. 

Example (2): A = 1 + √3, and B = -1 -2√3, A + B = -√3 

In example (2) above it is accepted that 2√3 is irrational. This will be justified.

If M is rational and J is irrational then M * J  has to be irrational. If M * J = T and T were rational, then T/M = J would be rational, which is contradictory.

The product of two irrationals could be rational.

Example: (3 + √2) * (3 - √2) = 7

Construction of irrational numbers

Construction or design of irrational numbers represented in decimal non periodic form is possible if a rule is given that allows to know the next digit in any given place.

Example: In a decimal representation, after a given place there is: 2 and one 8, 2 and two 8s, 2 and 3 8s, ...:
3.428288288828888...
Clearly there are not period in that development and so, this is an irrational number located between 3.4 and 3.5 on the number line.

In the same way irrationals can be placed in points which does not correspond to any rational number. 

Those numbers are filling the points which are free in the rational number line, despite the fact that the set of rationals is dense everywhere.

Density of irrational numbers

The set of irrational numbers is dense in the same way as rationals. Between any two irrational numbers there is at least one irrational. For instance between two designed irrationals like

3.428288288828888... and 3,537377377737777,,,

1t can be found , for instance , 3.4320200200020000...

Real numbers

The theory on rational and irrational numbers constitutes a challenge for the intuition since the model of points on a line to represent them has advantages at the beginning but becomes far from intuition in grasping the concept of density.

The set of rational numbers together with the set of irrational numbers constitute the set of real numbers which fills completely the number line.







viernes, 23 de marzo de 2018

Notes on Rational Numbers

The Set of Rational Numbers

Introduction

The word "ratio" comes from Latin and it can be found in dictionaries, like American Heritage, with the meanings of: (1) Relation in degree or number between two similar things. (2) The relative value of silver and gold in a currency system that is bimetallic. (3)Mathematics. The relation between two quantities expressed as the quotient of one divided by the other. The ratio of 7 to 4 is written 7:4 or 7/4.

Also the word "rational" can be found in dictionaries with the meanings of: (1) Having or exercising the ability to reason. (2) Of sound mind; sane. (3) Manifesting or based upon reason; logical. (4) Mathematics. Designating an algebraic expresion no variable of which appears in an irreducible radical or with a fractional exponent.

The above (4) meaning does not reflect  the concept to be developed in this article. A rational number  will be understood as a number  which can be expressed as a quotient between two integers a, b,  that is a/b, with b different from zero. Examples: 2/3, 8/5, -3/7.

A quotient between two integers is not the only way to represent a rational number. It can be represented as a decimal. Example: 12/5 can be expressed as 2.4

Fractions and rational numbers

Examples of fractions are

Those symbols have the same meaning as 2/3 and 8/5 and correspond to concrete situations like the following:

A plane rectangular region  has been taken as a unit. There has been shaded two thirds of it. (A proper fraction of a unit)


A plane rectangular region U has been taken as a unit. This unit has been divided in 5 equal parts. It has been constructed a second plane rectangular unit with eight rectangular regions, each one  of 1/5 of the original unit. (An improper fraction).

These examples correspond to an early approach to rational numbers.

Rational numbers and number line

Integers can be represented on a number line, by means of equally spaced points.


It is possible too the representation of rational numbers as points on a line.




In the expression a/b the numerator is a and the denominator is b. The denominator indicates the number of equal parts in the unit segment [0, 1]. The numerator indicates the number of parts taken in consideration.

Quotient representation

The representation 2/3 means the same as 4/6. since in the latter case it means that the unit has been divided in 6 equal parts and it has been taken, or considered 3 of them.

In general, a/b means the same as ka/kb,with k ≠ 0

When numerator and denominator are multiplied by the same number k, different from zero, the fraction is said to have been amplified by k.

When numerator and denominator are divided by the same number k, the fraction is said to have been simplified by k.

A necessary and sufficient condition for a/b an c/d represent the same rational number is:

a ∗ d =  c

Example: 3/7 = 12/28 (3/7 has been amplified by 4)

If a and b have common factors, different than one. the representation a/b can be expressed as a'/b', where a' = ad and b' = bd and  d is the greatest common factor between a and b

Example: 135/765 = 3/17 . In this case, 45 is the GCF of 135 and 765. The fraction 135/765 has been simplified by 45.  Also, it can be verified that 17 times 135 = 3 times 765.

Introduction to decimal notation

It consists in two sequences of digits separated by a point called decimal point.

The decimal point separates the integer part of the number, at the left of that point, and the decimal part of the number to the right of that point.

The digits to the right of the decimal point are  decimal fractions of a unit. They can be read, from left to right as times 1/10, times 1/100, times 1/1000, ...

Examples:
1.5 means 1 + (5/10)
3.25  means 3 + (2 /10) + (5/100)
0.625 means 0 + (6/10) + (2/100) + (5/1000)

Calculators give directly  decimal notations for  fractions given in quotient notation.

Examples: 
3/2 = 1.5 
1/16 = 0.0625 
25/8 = 3.125
5/3 = 1.6666... (cases like this one will be discussed later)

Terminating decimal notation

If the denominator of a fraction has 2 or 5 as their only  factors (the prime factors of ten) then the fraction can be expressed  directly with a denominator which is is a power of 10.

Examples: 3/2 = 15/10 (amplifying by 5) , 7/4 = 175/100  (amplifying by 25), 8/25 = 32/100 (amplifying by 4), 5/8 = 625/1000 (amplifying by 125).

When the denominator is a multiple of 10 there are rules to represent the fraction in decimal notation.

If the denominator is 10, the decimal point will be placed one step to the left in the numerator. Example: for 15/10 the result is 1.5

If the denominator is 100, the decimal point will be placed two steps to the left in the numerator. Example: for 175/100 the result is 1.75

If the denominator is 1000, the decimal point will be placed three steps to the left in the numerator. Example: for 625/1000 the result is 0.625

If the number of steps to the left is greater than the number of figures of the integer, complete with zeros.
Example: ( Remember that 45 is the same as ...000000045)

For 45/10000, the result is 0.0045

It can be seen that multiplicaion by 10 corresponds to one step displacement to the right of the decimal point. Division by 10 corresponds to  one step displacement to the left of the decimal point.
Examples:
 1.56 ∗ 10 = 15.6
1.56/10 = 0.156

Left zeros before of the first digit different from zero in an integer maybe ignored. For example, 000103 means the same as 103. Right zeros after the lasd digit differente from zero in a decimal representation may be ignored. For instance, 0.05 means the same as 0.050 or 0,0500 or 0.05000, or...

0.05 = 5/100; 0.050 = 50/100

This examle shows that the  addition of a zero after the last digit in a decimal representation means the same as amplifying by 10 the corresponding qoutient representation. It does not change its value.

Non terminating decimal notation

If the denominator of a fraction has at least one factor different from 2 or 5 the corresponding decimal notation does not terminate.To decide cut it at a given point depends of the considered problem or situation.

Example: 5/3 = (3/3) + (2/3) = 1 + (2 /3)

2/3 = (20/3)  (1/10)  
20/3 = (18/3) + (2/3) = 6 + (2 /3). 
Then, 2/3 = [6 + 2/3)]∗(1/10) = 6∗(1/10) + (2/3)(1/10) = (6/10) + (2/3)∗(1/10)
That is, 2/3 = (6/10) + (2/3)∗(1/10)
Then, 2/3 = (6/10) + [(6/10) + (2/3)∗(1/10)]∗(1/10) = (6/10) + (6/100) + (2/3)∗(1/100)
Now, 2/3 = (6/10) + (6/100) + [(6/10) + (2/3)∗(1/10)]∗(1/100)
That is, 2/3 = (6/10) + (6/100) + (6/1000) + (2/3)∗(1/1000)
Until now the result is, 2/3 = (666/1000) + (2/3)∗(1/1000) = 0.666 + (2/3)∗(1/1000)

This process can be iterated without end. So,  1.666666... is the decimal notation for 5/3

Alternatively it can be used the division algorithm, taken the dividend as 5.000000... and the divisor as 3.

Periodic decimal notation

In above example one repeated numeric figure apears in the decimal notation of 5/3. The repetition can occur for two or more numeric figures as in the following examples. Every repeated sequence of digits is called a period.

103/33 = 3.12121212... The period is 12 and it begins next to decimal point.

1253/495 = 2.531313131...The period is 31 and it does not begin next to decimal point.

In what follows, the repeating sequence of digits, the period, will be underlined.

Examples:
 1.66666... = 1.6
2.12121212... = 3.12
2.53131313131... = 2.531


Decimal to quotient notation

In the following examples it is described how to express in the form a/b a rational number written in decimal representation.

Example (1) 2.345
This means 2 + 345/1000 , that is (2000 + 345)/1000 = 2345/1000 = 469/200

Example (2) 3.214
To find the fraction F corresponding to this non terminating periodic decimal, a suitable process is the following:
3.214 = F
3214.214 = 1000 ∗ F 
Subtracting in former equations, 3211 = 999 ∗ F
F = 3211/999

Example (3) 12.345
F = 12.345
100 ∗ F = 1234.5
1000 ∗ F = 12345.5
Subtracting in former equations, 900 ∗ F = 11111
F = 11111/900

These processes can be turned systematic by means of a computer program with instructions like the following:

Write the integer part and the decimal part,before the first period, without the decimal point. Call it N1.
Write the same digits, as before, and add the first period. Call it N2.
Numerator = N2 - N1
Write a series of nines a number of times equal to the number of digits of the period and a series of zeros a number of times equal to the number of digits after the decimal point and before the first period. Call it Denominator.
F = Numerator/Denominator.

Example (4): F = 5.3417

N1 = 534
N2 = 53417
Numerator = 52883
Denominator = 9900
F = 52883/9900

Example (5): F = 145.72

N1 =145
N2= 14572
Numerator = 14427
Denominator = 99
F = 14427/99 = 1603/11 


Density of rational numbers

Given an integer number n, it can be determined its next, n + 1. If the number considered is a rational this cannot be possible. Example: If the number is 4.5, somebody could think that 4.6 is its next. However, 4.53, for instance, could be placed between 4.5 and 4.6 on the number line.

In general, given two rational numbers f, g, there is at least a rational number between them. One of those rational numbers is (f + g)/2. Example: 4.55 is in the middle between 4.5 and 4.6. And 4.525 is in the middle between 4.5 and 4.55. This can be done for ever.

This property of rational numbers is called density. The set of rational numbers is dense everywhere. This means that between any two rational numbers there is at least one rational number. Indeed there are an infinity of them.

Above discourse could suggest that every point of a number line corresponds to a rational number. This is not the case. There are points of a number line with no correspondent in the set of rational numbers. This will be discussed in an article about irrational numbers.

Algebraic properties of rational numbers

Addition and multiplication are operations that can be performed in the set of rational numbers. 

The set of integers is a notable subset of rational numbers. In the quotient form, an integer is a fraction which can be represented with 1 as denominator. Examples: 6/1, -13/1.

In decimal form, an integer is represented with one or more zeros after the decimal point. Examples: 6.00, -13.0000

An equation of the form x + b = c , with a ≠ 0, has always a unique solution for x. The solution is 


x = (c - ba', where a' is the multiplicative inverse of a. It satisfies the equality a´a = 1. Zero is the only number that has not multiplicative inverse.

Example: (2/3) x + 5/7 = -4/9. Solution: x = (-4/9 - 5/7) ∗ (3/2) = -73/42

Using decimal representation, 0,6 x + 0.714285 = -0.4
The multiplicative inverse of 0.6 is 1.5
x = (-0.4 - 0.714285∗ 1.5 = -1.738095238

Order in rational numbers

Let's consider non negative rationals.

A criterion to know if a/bc/d  is the following: a/b ≤ c/d iff  a   d b c.

Example: To establish an order relation between 13/7 and 12/5, a method could consist in expressing those rationals with the same denominator: 65/35 and 84/35. 
Now it is easy to establish that 65/35 ≤ 84/35, that is, 13/7 ≤ 12/5

Above general criterion can be aplied too: 13 ∗ 5  7 ∗ 12.

If the rationals are given in decimal representation, 13/7 = 1.857142  and 12/5= 2.4

For rationals  represented in decimal form, compare the integer parts. If the integer parts are equal, compare the digits after the decimal point from left to right.

Example: f = 2.5689, g = 2.5791. It can be seen that f g.

If a/b c/d then d/c b/a

Example: 5/3 ≤ 7/4; 4/7 ≤ 3/5

1.6 ≤ 1.75; 0.571428 ≤ 0.6

For negative rationals analogous rules can be deduced.















jueves, 8 de marzo de 2018

Integers as Coordinates

A theorem on integers as coordinates

Introduction

The points in a plane with integers as coordinates are called lattice points. In this article is described the origin of a theorem concerning those special points. A program in Python 3.2 gives a fast solution for a particular case. Finally, it is stated the announced theorem.

Origin of the theorem

The following geometric problem gave the central idea for an interesting and curious result.

Given a straight line segment with end potints A and B whose coordinates are known, determine the coordinates of a point C which is the third vertex of an isosceles right triangle


To solve this problem, let's draw the straight line BC perpendicular to the straight line AB and the circle with center in B and radius AB. This circle will cut the straight line BC in two points, one of which will be C.

An alternative way to do this is to consider the orthogonal vectors 
A→B and BC whose norms are equal and their scalar product is equal to zero. This leads to the following equations:
|(c - a, d - b) . (x – cy – d)| = 0

|(c – a, d - b)| = |(x – c, y – d)|

Solving for x and y, the following results are obtained:

Solution (1):  x = b + c – d, y = c – a + d

Solution (2): x = c – b + d, y = a – c + d

Surprisingly (?) if the original coordinates are integers, the coordinates of point C are integers too.

Vectors BA and BC’ could be considered too, and this would lead to new solutions. C' being symmetrical of C, with respect to B.

A program as the following, in Python 3.2 leads quickly to the solutions we are looking for.

The program will be used for the points
 A = (-1, 2) and B = (2, 3).


print("third vertex of isosceles rectangular triangle") 
print("given vertices:(a,b),(c,d)")
print("write successively the values a,b,c,d")
a=float(input())
b=float(input())
c=float(input())
d=float(input())
print("solution(1)",'(',b+c-d,',',c-a+d,')')
print("solution(2)",'(',c-b+d,',',a-c+d,')')
print("solution(3)",'(',d+a-b,',',a-c+b,')')
print("solution(4)",'(',a-d+b,',',c-a+b,')')

Running the program:
write successively the values a,b,c,d
-1
2
2
3
solution(1) ( 1.0 , 6.0 )
solution(2) ( 3.0 , 0.0 )
solution(3) ( 0.0 , -1.0 )
solution(4) ( -2.0 , 5.0 )

Graphically, the results are:




The points obtained are,
(1, 6), (3, 0), (0, -1), (-2, 5)


From results as the former, it can be derived the following theorem:

If the end points of a segment of a straight line, A, B, have integers as coordinates, then the vertices of the squares having segment AB as one of their sides have also integer coordinates.

This result can be extended to all of the squares in the plane, which are connected with the two squares related with the segment AB.