Euler Function and Theorem
Euler Function and Theorem
Euler's generalization of the Fermat's Little Theorem depends on a function which indeed was invented by Euler (1707-
1783) but named by J. J. Sylvester (1814-1897) in 1883. I never saw an authoritative explanation for the name totient he has given
the function. In Sylvestor's opinion mathematics is essentially about seeing "differences in similarity, similarity in difference."
The word totient rhymes with quotient and the function has to do with division but in an unusual way. (Scott Brodie brougt to my
attention that the Oxford English Dictionary brings up the latin root tot for adding up, total. Tot has also the meaning (of unkown
origin) of a small child or a small drink. It would be very much in the spirit of the above maxim to use the word with two so
different meanings. You could expect this from Sylvester whom E. T. Bell has christened hothead.)
The Euler's totient function for integer m is defined as the number of positive integers not greater than and coprime to
m. A few first values: (1) = 1, (2) = 1, (3) = 2, (4) = 2, (5) = 4, (6) = 2, (7) = 6, = (9) = 6, (10) = 4,(11) = 10, (12) =
4, (13) = 12, etc., do not appear to follow any law. But there is a formula discovered by Euler to which we shall turn shortly. In
one special case the formula is really simple: for prime p, (p) = p - 1. This is why the Euler's Theorem is indeed a generalization
of Fermat's.
Euler's Theorem
The proof is completely analogous to that of the Fermat's Theorem except that instead of the set of non-negative
remainders {1,2,...,m-1} we now consider the set {m1, m2, ..., m(m)} of the remainders of division by m coprime to m. In exactly
the same manner as before, multiplication by a results in a permutation (but now) of the set {m1, m2, ..., m(m)}.Therefore, two
products are congruent:
m1m2 ... m(m) = (am1)(am2) ... (am(m)) (mod m)
dividing by the left-hand side proves the theorem.
The derivation of the Euler's formula for (m) proceeds in two steps. First, we consider the next simplest case (p a),
where p is prime.
Next, we establish the multiplicative property of :
(1)(m1m2) = (m1)(m2)
for coprime m1 and m2.
Since any integer can be (uniquely) represented in the form
(2)m = p1a1p2a2 ... pkak,
with distinct pi's, these two steps combined will lead to a closed form expression for .
Lemma 1
Let p be prime and a>0, an integer. Then
(pa) = pa - pa-1 = pa-1(p - 1) = pa(1 - 1/p).
Indeed, below pa, there are pa-1 - 1 integers divisible by p and hence having common factors with p a. These are 1p, 2p, ..., (pa-1 -
1)p. The total of positive integers below p a and coprime to it is then (pa - 1) - (pa-1 - 1).
To prove the second part, assume m = m1m2, where the two factor are coprime. We wish to relate the number (m) of the
remainders of division by m coprime to m to the similarly defined quantities (m 1) and (m2). Let 0 n < m be coprime to m.
Find remainders n1 and n2 of division of n by m1 and m2, respectively:
(3)n = n1 (mod m1) and n = n2 (mod m2).
Obviously, n1 is coprime to m1 and n2 is coprime to m2. Furthermore, n defines n1 and n2 uniquely. Assume now that n1and
n2 (coprime to m1 and m2, respectively) are given. Then the Chinese Remainder Theorem yields a unique n such that (3) holds.
This proves (1).
All that remains is to finally derive the Euler's formula for (m). Let m be given by (2). Applying the multiplicative
property repeatedly we get
(m) = (p1a1)(p2a2) ... (pkak) = p1a1(1 - 1/p1)p2a2(1 - 1/p2)...pkak(1 - 1/pk)
which simplifies to
(m) = m(1 - 1/p1)(1 - 1/p2)...(1 - 1/pk)
When something is known about ZnZn, it is frequently fruitful to ask whether something comparable applies
to UnUn. Here we look at UnUn in the context of the previous section. To aid the investigation, we introduce a new
quantity, the Euler phi function, written (n)(n), for positive integers nn.
Definition 3.8.1 (n)(n) is the number of non-negative integers less than nn that are relatively prime to nn. In other words,
if n>1n>1 then (n)(n) is the number of elements in UnUn, and (1)=1(1)=1.
Example 3.8.2 You can verify readily that (2)=1(2)=1, (4)=2(4)=2, (12)=4(12)=4 and (15)=8(15)=8.
Example 3.8.3 If pp is a prime, then (p)=p1(p)=p1, because 11, 22, , p1p1 are all relatively prime to pp, and 00 is
not.
For any number nn, (n)(n) turns out to have a remarkably simple form; that is, there is a simple formula that gives
the value of (n)(n). We've already seen how simple it is for primes. As is typical of many results in number theory,
we will work our way gradually to any nn, looking next at powers of a single prime.
(pa)=papa1(pa)=papa1
Proof.
We want to calculate the number of non-negative integers less than n=pan=pa that are relatively prime to nn. As in many cases, it
turns out to be easier to calculate the number that are notrelatively prime to nn, and subtract from the total. List the non-negative
integers less than papa: 00, 11, 22, , pa1pa1; there are papa of them. The numbers that have a common factor
with papa(namely, the ones that are not relatively prime to nn) are the multiples of pp: 00, pp, 2p2p, , that is, every ppth
number. There are thus pa/p=pa1pa/p=pa1 numbers in this list, so (pa)=papa1(pa)=papa1.
Using the Chinese Remainder Theorem we can prove that this is true in general.
Theorem 3.8.7 If aa and bb are relatively prime and n=abn=ab, then (n)=(a)(b)(n)=(a)(b).
Proof.
We want to prove that |Un|=|Ua||Ub||Un|=|Ua||Ub|. As indicated in the example, we will actually prove more, by
exhibiting a one to one correspondence between the elements of UnUn and UaUbUaUb. We already have a
one to one correspondence between the elements of ZnZn and ZaZbZaZb. Again as indicated by the
example, we just have to prove that this same correspondence works for UnUn and UaUbUaUb. That is, we
already know how to associate any [x][x] with a pair ([x],[x])([x],[x]); we just need to know that [x]Un[x]Un if
and only if ([x],[x])UaUb([x],[x])UaUb. After a long-winded build up, here's the proof: [x][x] is in UnUn if
and only if (x,n)=1(x,n)=1 if and only if (x,a)=1(x,a)=1 and (x,b)=1(x,b)=1 if and only
if ([x],[x])UaUb([x],[x])UaUb. Corollary 3.8.8 Suppose n=abn=ab, with aa and bb relatively prime.
For x=0,1,,n1x=0,1,,n1, if [x]Un[x]Un, associate [x][x] with ([x],[x])ZaZb([x],[x])ZaZb. This gives a one-to-one
correspondence between UnUn and UaUbUaUb.
Proof.
We proved this already in the proof of the previous theorem, but it deserves its own statement.
Example
3.8.10(233472)=(23)(3472)=(23)(34)(72)=(2322)(3433)(727)(233472)=(23)(3472)=(23)(34)(72)=(2322)(34
33)(727)
(n)=(pe11pe111)(pe22pe212)(pekkpek1k).(n)=(p1e1p1e11)(p2e2p2e21)(pkekpkek1).
Proof.
The proof by induction is left as an exercise.
Leonhard Euler. Euler (pronounced "oiler'') was born in Basel in 1707 and died in 1783, following a life of stunningly prolific
mathematical work. His complete bibliography runs to nearly 900 entries; his research amounted to some 800 pages a year over
the whole of his career. He continued doing research right up until his sudden death while relaxing with a cup of tea. For almost
all of the last 17 years of his life he was totally blind.
The breadth of Euler's knowledge may be as impressive as the depth of his mathematical work. He had a great facility with
languages, and studied theology, medicine, astronomy and physics. His first appointment was in medicine at the recently
established St. Petersburg Academy. On the day that he arrived in Russia, the academy's patron, Catherine I, died, and the
academy itself just managed to survive the transfer of power to the new regime. In the process, Euler ended up in the chair of
natural philosophy instead of medicine.
Euler is best remembered for his contributions to analysis and number theory, especially for his use of infinite processes of
various kinds (infinite sums and products, continued fractions), and for establishing much of the modern notation of mathematics.
Euler originated the use of ee for the base of the natural logarithms and ii for 11; the symbol has been found in a book
published in 1706, but it was Euler's adoption of the symbol, in 1737, that made it standard. He was also responsible for the use
of to represent a sum, and for the modern notation for a function, f(x)f(x).
Euler's greatest contribution to mathematics was the development of techniques for dealing with infinite operations. In the
process, he established what has ever since been called the field of analysis, which includes and extends the differential and
integral calculus of Newton and Leibniz. For example, by treating the familiar
functions sinxsinx, cosxcosx and exex analytically (as infinite series), Euler could easily establish identities that became
fundamental tools in analysis. One such is the well-known eix=cosx+isinxeix=cosx+isinx;
substituting x=x= gives ei=1ei=1 or ei+1=0ei+1=0, a remarkable equation containing perhaps the five most important
constants in analysis.
Euler used infinite series to establish and exploit some remarkable connections between analysis and number theory. Many
talented mathematicians before Euler had failed to discover the value of the sum of the reciprocals of the
squares: 12+22+32+12+22+32+. Using the infinite series for sinxsinx, and assuming that it behaved like a finite
polynomial, Euler showed that the sum is 2/62/6. Euler's uncritical application of ordinary algebra to infinite series occasionally
led him into trouble, but his results were overwhelmingly correct, and were later justified by more careful techniques as the need
for increased rigor in mathematical arguments became apparent. We'll see Euler's name more than once in the remainder of the
chapter.
The information here is taken from A History of Mathematics, by Carl Boyer, New York: John Wiley & Sons, 1968.
Up to this point weve dealt exclusively with the Cartesian (or Rectangular, or x-y) coordinate system. However, as we will see,
this is not always the easiest coordinate system to work in. So, in this section we will start looking at the polar coordinate system.
Coordinate systems are really nothing more than a way to define a point in space. For instance in the Cartesian coordinate system
at point is given the coordinates (x,y) and we use this to define the point by starting at the origin and then moving x units
horizontally followed by y units vertically. This is shown in the sketch below.
This is not, however, the only way to define a point in two dimensional space. Instead of moving vertically and horizontally from
the origin to get to the point we could instead go straight out of the origin until we hit the point and then determine the angle this
line makes with the positive x-axis. We could then use the distance of the point from the origin and the amount we needed to
rotate from the positive x-axis as the coordinates of the point. This is shown in the sketch below.
The above discussion may lead one to think that r must be a positive number. However, we also allow r to be negative. Below is
From this sketch we can see that if r is positive the point will be in the same quadrant as . On the other hand if r is negative the
point will end up in the quadrant exactly opposite . Notice as well that the coordinates describe
the same point as the coordinates do. The coordinates tells us to rotate
an angle of from the positive x-axis, this would put us on the dashed line in the sketch above, and then move out a
distance of 2.
This leads to an important difference between Cartesian coordinates and polar coordinates. In Cartesian coordinates there is
exactly one set of coordinates for any given point. With polar coordinates this isnt true. In polar coordinates there is literally an
infinite number of coordinates for a given point. For instance, the following four points are all coordinates for the same point.
In the second coordinate pair we rotated in a clock-wise direction to get to the point. We shouldnt forget about rotating in the
clock-wise direction. Sometimes its what we have to do.
The last two coordinate pairs use the fact that if we end up in the opposite quadrant from the point we can use a negative r to get
back to the point and of course there is both a counter clock-wise and a clock-wise rotation to get to the angle.
These four points only represent the coordinates of the point without rotating around the system more than once. If we allow the
angle to make as many complete rotations about the axis system as we want then there are an infinite number of coordinates for
the same point. In fact the point can be represented by any of the following coordinate pairs.
Next we should talk about the origin of the coordinate system. In polar coordinates the origin is often called the pole. Because
we arent actually moving away from the origin/pole we know that . However, we can still rotate around the
system by any angle we want and so the coordinates of the origin/pole are .
Now that weve got a grasp on polar coordinates we need to think about converting between the two coordinate systems. Well
start out with the following sketch reminding us how both coordinate systems work.
Note that weve got a right triangle above and with that we can get the following equations that will convert polar coordinates
into Cartesian coordinates.
Polar to Cartesian Conversion Formulas
Converting from Cartesian is almost as easy. Lets first notice the following.
This is a very useful formula that we should remember, however we are after an equation for r so lets take the square root of both
sides. This gives,
Note that technically we should have a plus or minus in front of the root since we know that r can be either positive or negative.
We will run with the convention of positive r here.
We will need to be careful with this because inverse tangents only return values in the range
. Recall that there is a second possible angle and that the second angle is given by .
Summarizing then gives the following formulas for converting from Cartesian coordinates to polar coordinates.
Example 1 Convert each of the following points into the given coordinate system.
Solution
(a) Convert into Cartesian coordinates.
This conversion is easy enough. All we need to do is plug the points into the formulas.
This is not the correct angle however. This value of is in the first quadrant and the point weve been given is in the third
quadrant. As noted above we can get the correct angle by adding onto this. Therefore, the actual angle is,
So, in polar coordinates the point is . Note as well that we could have used the first that we got
by using a negative r. In this case the point could also be written in polar coordinates as .
[Return to Problems]
We can also use the above formulas to convert equations from one coordinate system to the other.
Example 2 Convert each of the following into an equation in the given coordinate system.
(a) Convert into polar coordinates. [Solution]
(b) Convert into Cartesian coordinates. [Solution]
Solution
(a) Convert into polar coordinates.
In this case there really isnt much to do other than plugging in the formulas for x and y (i.e. the Cartesian coordinates) in terms
of r and (i.e. the polar coordinates).
[Return to Problems]
(b) Convert into Cartesian coordinates.
This one is a little trickier, but not by much. First notice that we could substitute straight for the r. However, there is no straight
substitution for the cosine that will give us only Cartesian coordinates. If we had an r on the right along with the cosine then we
could do a direct substitution. So, if an r on the right side would be convenient lets put one there, just dont forget to put one on
the left side as well.
We can now make some substitutions that will convert this into Cartesian coordinates.
[Return to Problems]
Before moving on to the next subject lets do a little more work on the second part of the previous example.
The equation given in the second part is actually a fairly well known graph; it just isnt in a form that most people will quickly
recognize. To identify it lets take the Cartesian coordinate equation and do a little rearranging.
Lines
Some lines have fairly simple equations in polar coordinates.
1. .
We can see that this is a line by converting to Cartesian coordinates as follows
This is a line that goes through the origin and makes an angle of with the positive x-axis. Or, in other words it is a line
through the origin with slope of .
2.
This is easy enough to convert to Cartesian coordinates to . So, this is a vertical line.
3.
Likewise, this converts to and so is a horizontal line.
Circles
Lets take a look at the equations of circles in polar coordinates.
1. .
This equation is saying that no matter what angle weve got the distance from the origin must be a. If you think about it
that is exactly the definition of a circle of radius a centered at the origin.
So, this is a circle of radius a centered at the origin. This is also one of the reasons why we might want to work in polar
coordinates. The equation of a circle centered at the origin has a very nice equation, unlike the corresponding equation in
Cartesian coordinates.
2. .
We looked at a specific example of one of these when we were converting equations to Cartesian coordinates.
This is a circle of radius and center . Note that a might be negative (as it was in our
example above) and so the absolute value bars are required on the radius. They should not be used however on the
center.
3. .
4. .
This is a combination of the previous two and by completing the square twice it can be shown that this is a circle of
Solution
The first one is a circle of radius 7 centered at the origin. The second is a circle of radius 2 centered at (2,0). The third is a circle of
1. Cardioids : and
.
These have a graph that is vaguely heart shaped and always contain the origin.
0 5 1 6
0 7 2
5 13 -2
10 7 2
5 1 6
There is one final thing that we need to do in this section. In the third graph in the previous example we had an inner loop. We
will, on occasion, need to know the value of for which the graph will pass through the origin. To find these all we need to do is
set the equation equal to zero and solve as follows,