Download Hoofdstuk 1

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

System of linear equations wikipedia , lookup

System of polynomial equations wikipedia , lookup

Equation wikipedia , lookup

History of algebra wikipedia , lookup

Eisenstein's criterion wikipedia , lookup

Factorization wikipedia , lookup

Fundamental theorem of algebra wikipedia , lookup

Algebraic number field wikipedia , lookup

Factorization of polynomials over finite fields wikipedia , lookup

Polynomial greatest common divisor wikipedia , lookup

Transcript
Algebra Interactive
Reader
Arjeh M. Cohen, Hans Cuypers, Hans Sterk
Eindhoven University of Technology
iii
Preface
Algebra Interactive is designed as modern course material for undergraduate courses in Algebra. It can also be used by students for
individual study. The many dynamic illustrations make it suitable for
demonstrations in lectures as well. As such it is useful for instructors
who wish to enliven their lectures with modern means.
Algebra Interactive differs in content from classical material on algebra in that it focuses on algorithms (constructive aspects) and real
life applications; the presentation deviates strongly from classical algebra books in that it brings to life the basic concepts of algebra
through interactive examples and visualizations. With these modern techniques illustrations are presented in totally new ways that
go beyond the traditional presentations. It provides students with a
sophisticated learning environment with emphasis on computational
and algorithmic aspects. New technology enriches the material in that
• many examples (in particular, the so–called gapplets) allow for
experimenting,
• dynamic illustrations (in particular, the applets under the Cool
button) occur throughout the text,
• buttons enable focusing on specific aspects (proofs, examples, exercises, illustrations),
• on-line multiple choice tests are offered,
• on-line calculators pertaining to the subjects covered are available,
• various ways of cross referencing are supported.
More information on the features of Algebra Interactive is given in
the Appendix.
Algebra Interactive offers a new challenge compared to traditional
text books and we recommend that you grasp the material by experimenting with the examples, working through the exercises, testing
yourself, etc. However, working with the interactive notes will not
replace the full benefits of pad and pencil, it rather adds to them.
So keep pad and pencil at hand while you work your way through.
Also, for your convenience, we provide this reader, a paper excerpt
of Algebra Interactive. It contains most of the text from the main
window (in standard font size) and a fair portion of the proofs, examples, remarks, applications and explanations from the secondary
window (in a smaller font size).
Algebra Interactive covers topics ranging from arithmetic with integers and with polynomials (including modular arithmetic) to permutations in the first five chapters, and then unifies the many common
iv
aspects of these arithmetic structures in the remaining chapters on
groups and rings.
Algebra Interactive grew out of algebra lectures given at the Eindhoven University of Technology, The Netherlands, over the past few
years. It was developed as IDA: Interactive Document on Algebra.
(We still refer to Algebra Interactive as IDA rather than AI.)
Algebra Interactive is not the end of the story. It is part of the OpenMath project that ultimately aims at providing a flexible working
environment for engineers and researchers using mathematics. In the
not so distant future, we hope to produce a second version using the
OpenMath standard for sharing mathematical expressions between
the user interface and back engines (such as GAP).
Arjeh M. Cohen, Hans Cuypers, Hans Sterk,
Eindhoven, June 1999.
v
Contents
1
Arithmetic
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1
1
1. Arithmetic
In this chapter we study the properties of the set Z of integers. We
mainly deal with its multiplicative structure and discuss notions such
as the greatest common divisor (gcd) and the least common multiple
(lcm) of two (or more) integers.
1.1. Divisors and multiples
We know how to add integers, how to subtract them and how to
multiply them. Division is a bit harder.
Definition 1. Let a ∈ Z and b ∈ Z.
• We call b a divisor of a if there is an integer q ∈ Z such that
a = qb.
• If b is a nonzero divisor of a, then the (unique) integer q with
a = qb is called the quotient a over b and denoted by a/b.
If b is a divisor of a, we also say that b divides a, or a is a multiple
of b, or a is divisible by b. We write this as b | a.
Suppose that a is an integer. If a is nonzero, not every integer b is
a divisor of a. If b (not equal to 0) does not divide a, then there is a
remainder after division of a by b. Here is a precise statement about
division with remainder.
Theorem 2. If a ∈ Z and b ∈ N \ {0}, then there are exactly one
q ∈ Z and one r ∈ Z such that a = qb + r and 0 ≤ r < b.
This theorem states that there exist a quotient q and a remainder r, often denoted by a mod b, but it does not tell you how to find
those two integers. However, the proof that we give here, is constructive: it provides an algorithm to find q and r.
Proof. In the case where a, b > 0, the proof is roughly as follows: find the greatest
multiple qb of b that is less than or equal to a; this can be accomplished by starting
with q = 0 and increasing q by 1 until a − (q + 1)b < 0. Then r = a − qb.
• Existence
We first consider the case where a ≥ 0 and use induction on a. If a < b, then
we set q = 0 and r = a.
If a ≥ b, then by the induction hypothesis, there exist integers q 0 and r0 (with
0 ≤ r0 < b) such that a − b = q 0 b + r0 . Thus, a = (q 0 + 1)b + r0 . Apparently,
q = q 0 + 1 and r = r0 satisfy the conditions of the theorem in this case.
If a < 0, then by the above there are q 0 and r0 with |a| = q 0 b + r0 . But then
a = −(q 0 b + r0 ) = −(q 0 + 1)b + (−r0 + b). So q = −(q 0 + 1) and r = (−r0 + b)
satisfy the conditions of the theorem.
2
1
Arithmetic
• Uniqueness
Suppose that a = qb + r and a = q 0 b + r0 with 0 ≤ r, r0 < b. Suppose moreover
that r ≥ r0 . (This is no essential restriction.) By subtracting these equalities
we get r − r0 = (q 0 − q)b. Now it follows that the multiple (q 0 − q)b of b satisfies
0 ≤ (q 0 − q)b = r − r0 < b. This can only happen if q 0 − q = 0. In other words
q = q 0 . Now it also follows that r = r0 .
Application. Suppose you need to fit rods of length b one after the other in a box
of length a. Then the quotient tells you how many will fit and the remainder what
the length of the space left open will be. For instance, in a box of length a = 23
we can fit two rods of length b = 11, and there will be an open space of length 1.
We consider common divisors and multiples of two (or more) integers. Let a, b ∈ Z.
Definition 3.
• An integer d is a common divisor of a and b if d | a and d | b.
• If a and b are not both 0, the largest common divisor of a and b
(exists and) is called the greatest common divisor of a and b.
• If the greatest common divisor of a and b equals 1, then a and b
are called relatively prime.
Remark. If a and b are not both 0, then they have only a finite number of common
divisors. Note that 1 is always a common divisor. Hence the greatest common
divisor exists.
We denote the greatest common divisor of a and b by gcd(a, b).
Analogous to the greatest common divisor of two integers we can
define the greatest common divisor of more than two numbers.
We now discuss common multiples of two (or more) integers. Let
a, b ∈ Z.
Definition 4.
• The integer c is a common multiple of a and b if c is a multiple
of a and of b (that is, a | c and b | c).
• The smallest nonnegative common multiple of a and b is called the
least common multiple of a and b.
We express the least common multiple of a and b with lcm(a, b).
1.2. Euclid’s algorithm
The gcd of two integers a and b (which, for simplicity, we assume to
be positive) can be determined with Euclid’s algorithm.
1.2
Euclid’s algorithm
3
Algorithm 5 (Euclid’s algorithm).
• Input: two positive integers a and b.
• Output: the gcd of a and b.
1. Replace (simultaneously)
◦ a by b and
◦ b by the remainder of the division of a by b.
2. Repeat Step 1 until b is equal to 0.
3. Return a.
Proof. We use three properties of the greatest common divisor:
gcd(a, b) = gcd(b, a), gcd(a, b) = gcd(a, b − ka), and gcd(a, 0) = a.
These properties imply that in each step of the algorithm the gcd is left invariant.
The variable b decreases with each step. Eventually we come to the point that b
equals 0. Then the algorithm ends and it will give gcd(a, 0) = a as output.
There is also an extended version of Euclid’s algorithm, where
integers x and y are determined such that ax + by = gcd(a, b). To do
this, we record at each step of Euclid’s algorithm how to express the
intermediate results in the input integers.
Algorithm 6 (The extended Euclidean algorithm).
• Input: positive integers a and b.
• Output: integers x and y such that gcd(a, b) = xa + yb.
1. Let x = v = 1 and y = u = 0.
2. Determine q and r such that a = qb + r and 0 ≤ r < b.
Replace (simultaneously)
◦ a by b and b by r,
◦ x by u and y by v,
◦ u by x − qu and v by y − qv.
3. Repeat Step 2 until b equals 0.
4. Return x and y.
Proof. Find the gcd of a and b using Euclid’s algorithm. When after some steps
using this algorithm a0 = xa + yb and b0 = ua + vb for certain integers x, y, u
and v, then after the next step a0 = ua + vb and b0 = (ua + vb) − q(xa + yb) =
(x − qu)a + (y − qv)b, where q is the quotient of a0 and b0 . Since Euclid’s algorithm
will eventually return a0 as the gcd of a and b, the extended Euclidean algorithm
will give x and y with gcd(a, b) = xa + yb.
Remark. The integers x and y with xa + yb = gcd(a, b) are not unique: of course,
for any integer t we have (x + tb)a + (y − ta)b = gcd(a, b).
The extended Euclidean algorithm leads us to the following characterization of the gcd. Let a and b be two positive integers.
4
1
Arithmetic
Theorem 7 (Characterization of the gcd). The following three
statements are equivalent.
1. gcd(a, b) = d.
2. d is a positive common divisor of a and b such that any common
divisor c of a and b is a divisor of d.
3. d is the least positive integer that can be expressed as xa + yb with
integers x and y.
Proof.
• 1⇔2
Let d = gcd(a, b). Then d is a common divisor of a and b. By the extended
Euclidean algorithm d = xa + yb for some integers x and y. If c is any common
divisor of a and b, then it also divides d. This proves that the first assertion
implies the second.
As for the other way around, suppose that d is as in the second statement.
Since gcd(a, b) is a common divisor of a and b it must divide d. On the other
hand d cannot be larger than the greatest common divisor of a and b. Hence
d and gcd(a, b) must be equal. This proves that the second statement implies
the first.
• 1⇔3
Let d = gcd(a, b) and let e be the least positive integer that can be expressed
as xa + yb with integers x and y. We show that d = e. Since d is a common
divisor of a and b, the equality e = xa + yb implies that d divides e. So d ≤ e.
Moreover, d itself can also be written as a linear combination of a and b. So
d ≥ e by the defining property of e. Hence d must be equal to e. This proves
the equivalence.
This characterization of the gcd has the following trivial (but important) corollary.
Corollary 8. Integers a and b are relatively prime if and only if
there exist integers x and y such that xa + yb = 1.
Proof. Apply the previous theorem with d = 1.
Example. For all natural numbers m, n with m < n, the integers 2m and 2n − 1
are relatively prime: 2n−m · 2m − 1 · (2n − 1) = 1.
A consequence is the following useful result for deducing divisibility of one integer by another.
Proposition 9. Let a, b, c be integers. If a and b are relatively prime,
then a | bc implies a | c.
Proof. There exist integers x and y such that xa + yb = 1. Multiply this relation
by c to get xac + ybc = c. Since a | xac and a | bc (and hence also a | ybc) we get
that a | xac + ybc = c.
1.3
Linear diophantine equations
5
1.3. Linear diophantine equations
We describe an algorithm to find all integer solutions to the equation
xa + yb = c in the unknown x, y and given a, b, c ∈ Z. Such equations
are known as linear diophantine equations. We first discuss a
special case, the homogeneous equation. Let a, b ∈ Z.
Lemma 10. If xa + yb = 0 and gcd(a, b) = 1, then there exists an
integer n such that x = −nb and y = na.
Proof. Suppose that xa + yb = 0 and that gcd(a, b) = 1. From xa = −by it follows
that a | by. Since gcd(a, b) = 1, we find a | y, see Proposition 9 of Section 1.2. But
that means that there exists an integer n such that an = y. Substitution of y in
the original equation gives x = −nb . This proves the lemma.
Remark. If we interpret the equation over Q or R, then the solutions are, assuming
b is not equal to 0, of the form (x, y) = (x, (c − xa)/b). However, not all of these
solutions are integral.
From the lemma we conclude the following.
Theorem 11. Suppose that a, b are not both 0. Then the integer solutions to the equation xa + yb = 0 are given by x = −nb/d and
y = na/d, where d = gcd(a, b) and n ∈ Z.
Proof. Assume that xa + yb = 0 and gcd(a, b) = d. By dividing the equality
xa + yb = 0 by d, we get the situation of the lemma. The theorem now follows.
Example. The solutions to the equation 28x + 21y = 0 are x = −21n/7 = −3n
and y = 28n/7 = 4n, with n ∈ Z, since gcd(28, 21) = 7.
We are ready for the general case.
Algorithm 12.
• Input: integers a, b, c, with a and b not both 0.
• Output: all integer solutions x, y to the equation xa + yb = c.
1. Find, using the extended Euclidean algorithm, integers x0 , y 0 such
that d := gcd(a, b) = x0 a + y 0 b.
2. If d does not divide c, then return that there are no solutions to
the equation.
3. If d | c, then return x = (x0 c − nb)/d and y = (y 0 c + na)/d, with
n ∈ Z.
Proof. First note that if (x0 , y0 ) and (x1 , y1 ) are solutions to the equation ax +
yb = c, then their difference (x0 − x1 , y0 − y1 ) is a solution to the homogeneous
equation ax + yb = 0. Hence all solutions of ax + yb = c, if there are any, are of
the form (x0 ,y0 ) plus a solution to the homogeneous equation ax + yb = 0.
Correctness of the algorithm is now a direct consequence of the previous lemma
and theorem.
6
1
Arithmetic
Example. Consider the equation 28x + 21y = 14. Using the extended Euclidean
algorithm we find gcd(28, 21) = 7 = 28 − 21. Moreover, it is easy to see that x = 2
and y = −2 is a solution of the equation. Hence all solutions are x = 2 − 21n/7 =
2 − 3n and y = −2 + 28n/7 = −2 + 4n, with n in Z.
Note the structure of the solutions: x0 c/d, y 0 c/d is one particular
solution of the equation xa + yb = c, and all other solutions are
obtained by adding all solutions of the homogeneous equation xa +
yb = 0 to it.
1.4. Prime numbers
In this section we discuss prime numbers, the building blocks for the
multiplicative structure of the integers.
Definition 13. A prime is an integer p larger than 1 that has no
positive divisors other than 1 and p.
The first five primes are 2, 3, 5, 7, and 11. But there are many
more.
Theorem 14. There are infinitely many primes.
Proof. Suppose that there are only finitely many primes, say p1 , . . . , pr . Construct
the integer m = p1 · · · pr + 1. Then m > 1. The integer m is not divisible by any
of the pi (i = 1, . . . , r). The smallest divisor larger than 1 of m is a prime. This is
a prime that is not in our list. Contradiction.
Eratosthenes’ sieve is an algorithm to make a list of primes.
Algorithm 15 (Eratosthenes’ sieve).
• Input: a positive integer n.
• Output: the list of primes less than or equal to n.
1. Construct the list L := [2, . . . , n] and the empty list M .
2. Let m be the smallest element in L.
◦ Add m to M .
◦ Remove all multiples of m from L.
3. Repeat Step 2 until L is empty.
4. Return M .
Using this sieve we can find all the primes in the interval [1, n]. The
number of such primes can be approximated as follows.
Fact 16 (Prime number theorem). Let prime(n) be the number
of primes in the interval [1, n]. Then we have
prime(n) ∼ n/log(n)
when n tends to infinity.
(This means that limn→∞ prime(n)/(n/ log(n)) = 1.)
1.5
Factorization
7
The next theorem gives a characterization of primes.
Theorem 17. Let p > 1. Then p is a prime if and only if, for all
integers b, c: p | bc implies p | b or p | c.
Proof.
• ⇒
Suppose p is prime. Assume that p | bc. If p | b we are done. If p is not a divisor
of b, then p and b have no common divisors > 1 and we can apply Proposition
9.
• ⇐
Assume that p is not prime, but p = bc, for some b, c > 1. Then p divides the
product bc, but it does not divide b or c.
Example. Suppose a = bc, where a, b, c are natural numbers. If a is even, then so
is at least one of b, c. It is one implication in the special case p = 2 of the theorem.
This theorem has the following corollary.
Corollary 18. If p is a prime and b1 , . . . , bs are integers such that
p | b1 b2 · · · bs , then there is an index i ∈ {1, . . . , s} such that p | bi .
We leave the proof of the corollary to the reader.
1.5. Factorization
We will show how integers are built out of primes.
Theorem 19. Every positive integer a > 1 can be written as the
product of finitely many primes:
a = p1 · · · ps ,
where s is a positive integer and each pi is a prime. Up to the order
of the factors, this factorization is unique.
For a positive integer a we denote the number of times that the prime
p occurs in its factorization by ordp (a). The factorization in primes
of a can be written as
Y
a=
pordp (a) .
p prime
Note that only a finite number of factors is distinct from 1. By definition a product that has the empty set as index set (the empty
product) is 1. So, using this convention, we could have included this
case a = 1 in the theorem.
Proof. The proof is divided into two steps.
8
1
Arithmetic
• Existence
We prove by induction on a that every positive integer can be written as a
product of primes.
The case a = 2 is trivial. So suppose that a is at least 3. If a is a prime then
we are done. If a is not a prime then it has a divisor b such that 1 < b < a.
According to the induction hypothesis b and a/b can both be written as a
product of primes: b = p1 · · · pr , a/b = pr+1 · · · ps . For a we have a = p1 · · · pr ·
pr+1 · · · ps .
• Uniqueness
Here we also use induction. The case a = 2 is easy. Suppose that a > 2, and also
suppose that uniqueness has been proven for the integers < a. If a = p1 · · · pr
and a = q1 · · · qs are two ways of expressing a as a product of primes, then it
follows that p1 | p1 · · · pr = q1 · · · qs . From Corollary 18 we may conclude that
there exists an index k in the set {1, . . . , s} such that p1 | qk . But then we
have p1 = qk because qk is a prime. Now apply the induction hypothesis to the
integer a/p1 with the two expressions as products of primes a/p1 = p2 · · · pr
and a/p1 = q1 · · · qk−1 · qk+1 · · · qs . These factorizations of a/p1 are the same
(up to the order of the factors) and therefore the two factorizations of a are
the same.
Application. If a is a square, then ordp (a)√is even for each prime p. Using this
observation it is not difficult to prove that 2 is not in Q. This means that there
are no integers a, b such that (a/b)2 = 2. For such a and b, we would have 2b2 = a2 .
Now ord2 (2b2 ) is odd. But ord2 (a2 ) is even. This is a contradiction. Therefore,
the assumption that a and b with (a/b)2 = 2 exist is false.
Remark. There also exist arithmetic systems in which
√ uniqueness of factorizations
is not√guaranteed. For example, in the system Z[ −5] of numbers of the form
a + b −5 with
√ a, b ∈ Z we
√ can express 6 in two
√ essentially different ways: 6 =
3 · 2 = (1 + −5) · (1 − −5). The system Z[ −5] is an example of a ring, a
structure we will encounter in Chapter 7.
Here is an explicit description of the gcd and lcm in terms of prime
factorizations.
Theorem 20. If a and b are positive integers, then:
Q
gcd(a, b) = p prime pmin{ordp (a),ordp (b)} ,
Q
lcm(a, b) = p prime pmax{ordp (a),ordp (b)} .
In particular we have a · b = gcd(a, b) · lcm(a, b).
Proof. We prove the first equality. The proof of the second is left to the reader.
We certainly have min{ordp (a), ordp (b)}≤ ordp (a) and min{ordp (a), ordp (b)} ≤
ordp (b). Hence the right-hand side of the equality is a common divisor of a and
b. On the other hand, if ordp (ggd(a, b)) = r > 0 for some prime p, then p divides
both a and b so that we can conclude that r ≤ ordp (a) and r ≤ ordp (b). Hence
Q
min{ordp (a),ordp (b)}
equals gcd(a, b).
p prime p
Example. Suppose 0 < pk | m for some prime number p and integer k. Suppose
k is maximal with this property. Then the binomial coefficient M = pmk is not
divisible by p. Indeed, this binomial can be written as the quotient of m · (m −
1) · · · (m − pk + 1) by pk . Now for all 0 ≤ n ≤ pk we have ordp (m − n) =
min(k, ordp (n)) = ordp (pk − n), and every factor p in the numerator is canceled
by a factor p in the denominator.
1.6
Exercises
9
1.6. Exercises
1. If c is a common multiple of a and b, then c is a multiple of lcm(a, b). Prove
this.
2. For any positive integer n divide 103n by 10n − 1 and find the remainder.
3. Three cogwheels with 24, 15 and 16 cogs, respectively, touch as shown in the
picture.
Fig. 1.
(a) What is the smallest positive number of times you have to turn the lefthand cogwheel before the right-hand cogwheel is back in its original position?
(b) What is the smallest positive number of times you have to turn the lefthand cogwheel before all three wheels are back in their original position?
4. Prove that the square of an odd integer is again odd, where ‘odd’ means ‘not
divisible by 2’ or, equivently, ‘leaving remainder 1 upon division by 2’. Show
that the remainder of division by 4 of the square of an odd integer is 1. Does
the last statement hold if we replace 4 by 8? And by 16?
5. Prove each of the following statements.
(a) If a | b and b | c then a | c.
(b) If a | b and c | d then ac | bd.
6. Determine the gcd of each of the following pairs of numbers, and write the
gcd as a linear combination of the given numbers:
(a) 480, 175;
(b) 5621, 219;
(c) 983675, 105120.
7. Show that, for all positive integers x, y, z, gcd(zx, zy) = z gcd(x, y).
8. Prove: If a and b are integers, not both zero, and c = gcd(a, b), then c =
min{xa + yb | xa + yb > 0, x, y ∈ Z}.
9. Let a be a rational number such that both 18a and 25a are integers. Show
that a itself is an integer.
10. Find all integers x and y such that 32x + 10y = 6.
11. Prove that there exist infinitely many primes of the form 4n + 3.
12. For which positive integers n is n2 − 1 prime?
13. Which integers of the form 13p + 1 (with p prime) are squares of integers?
14. Find all primes p and q such that 4p + 7q = pq.
15. Let a, b be distinct integers.
(a) Show that a − b | a2 − b2 and determine the quotient.
(b) Show that a − b | a3 − b3 and determine the quotient.
(c) Prove that a − b divides an − bn for all positive integers n.
(d) Show that a + b | a2n+1 + b2n+1 for each positive integer n.
(e) Find the prime factorization of 510 − 210 .
16. Prove that the cube root of 17 is not a rational number.
17. Find the factorization of 232 − 1.