# Algebraic Systems, Fall 2013, September 1, 2013 Edition. Todd Cochrane

Save this PDF as:

Size: px
Start display at page:

## Transcription

1 Algebraic Systems, Fall 2013, September 1, 2013 Edition Todd Cochrane

2

3 Contents Notation 5 Chapter 0. Axioms for the set of Integers Z. 7 Chapter 1. Algebraic Properties of the Integers Background Deducing the Additional Properties of Z from the Axioms Discreteness Axioms for Z Proof by Induction Basic Divisibility Properties Euclidean Algorithm Linear Combinations and Linear Equations Solving Linear Equations in integers Unique Factorization of Integers Further properties of primes 23 Chapter 2. Modular Arithmetic and the Modular Ring Z m A few applications of congruences Multiplicative inverses (mod m) The modular ring Z m Group of units U m and the Euler phi-function Euler s Theorem and Fermat s Little Theorem Public Key Cryptography. 31 Chapter 3. Rings, Integral Domains and Fields Basic properties of Rings Subrings of Z and Z m Polynomial Rings Zero divisors and Integral Domains Units and Fields Matrix Rings Complex Numbers n-th powers and n-th roots of complex numbers Subfields of the Real Numbers and Complex Numbers 45 Chapter 4. Factoring Polynomials Unique Factorization of Polynomials Factoring quadratic and cubic polynomials Useful Factoring Formulas Factoring Polynomials over C Factoring Polynomials over R 55 3

4 4 CONTENTS 4.6. Factoring Polynomials over Q Summary of Irreducible Polynomials over C, R, Q and Z p Cardano s Solution of the Cubic Equation Solution of the Quartic Equation and Higher Degree Equations. 58 Chapter 5. Group Theory Subgroups of Groups Generators and Orders of Elements Cyclic Groups The Klein-4 group Direct Product of Groups Lagrange s Theorem Permutation Groups Cycle Notation Groups of Symmetries Dihedral Group D n Isomorphism. 68

5 Notation N = {1, 2, 3, 4, 5,... } = Natural numbers Z = {0, ±1, ±, 2, ±3,... } = Integers E = {0, ±2, ±4, ±6,... } = Even integers O = {±1, ±3, ±5,... } = Odd integers Q = {a/b : a, b Z, b 0} = Rational numbers R = Real numbers C = Complex numbers Z m = Ring of integers mod m [a] m = {a + mx : x Z} = Residue class of a mod m U m = Multiplicative group of units mod m a 1 (mod m) = multiplicative inverse of a (mod m) φ(m) = Euler phi-function (a, b) = gcd(a, b) = greatest common divisor of a and b [a, b] = lcm[a, b] = least common multiple of a and b a b = a divides b M 2,2 (R) = Ring of 2 2 matrices over a given ring R R[x] = Ring of polynomials over R S = order or cardinality of a set S S n = n-th symmetric group intersection union empty set subset there exists! there exists a unique for all implies equivalent to iff if and only if element of congruent to 5

6

8 8 0. AXIOMS FOR THE SET OF INTEGERS Z. 5] Positivity Axiom. The sum of two positive integers is positive. The product of two positive integers is positive. 6] Discreteness Axioms. a) Well Ordering Property of N. Any nonempty subset of N has a smallest element. b) Principle of Induction. Let S be a subset of N such that (i) 1 S and (ii) n S n + 1 S. Then S = N. Additional Properties of Z. The properties below can all be deduced from the axioms above. You may assume them in your homework unless specifically asked to prove the property. See Chapter 1, Section 1.2 for proofs. 1] Subtraction-Equality principle. x = y if and only if x y = 0. 2] Cancelation law for addition: If a + x = a + y then x = y. 3] Additive inverses are unique, that is, if a, b, c are integers such that a + b = 0 and a + c = 0 then b = c. 4] Zero multiplication property: a 0 = 0 for any a Z. 5] Properties of negatives: ( a)b = (ab) = a( b), ( a)( b) = ab, ( 1)a = a. 6] Basic consequence of Trichotomy: If a > 0 then a < 0 and if a < 0 then a > 0. 7] Products of Positives and Negatives: If a > 0 and b < 0 then ab < 0. If a < 0 and b < 0, then ab > 0. 8] Zero divisor property, or integral domain property: If ab = 0 then a = 0 or b = 0. 9] Cancelation law for multiplication: If ax = ay and a 0 then x = y. 10] General Associative-Commutative Law: a) Addition: When adding a collection of n integers a 1 + a a n, the numbers may be grouped in any way and added in any order. In particular, the sum a 1 +a 2 + +a n is well defined, that is, no parentheses are necessary to specify the order of operations. b) Multiplication: When multiplying a collection of n integers a 1 a 2 a n, the numbers may be grouped in any way and multiplied in any order. In particular, the product a 1 a 2 a n is well defined, that is, no parentheses are necessary to specify the order of operations. 11] FOIL Law: For any integers a, b, c, d, (a + b)(c + d) = ac + ad + bc + bd. 12] Binomial Expansion: For any integers a, b and positive integer n we have (a + b) n = n ( n ) k=0 k a k b n k = a n + ( ) n 1 a n 1 b + ( n 2) a n 2 b b n. In particular, (a + b) 2 = a 2 + 2ab + b 2 (a + b) 3 = a 3 + 3a 2 b + 3ab 2 + b 3.

9 CHAPTER 1 Algebraic Properties of the Integers 1.1. Background Definition A statement is a sentence that can be assigned a truth value. (In general there is a subject, verb and object in the statement). Example The following are statements, that is, given x R, we can definitively assert whether A, B or C is true or false: A : x 2 = 4. B : x = 2. C : x = ±2. Note that these statement really are complete sentences. subject is x 2, the verb = and the object is 4. For example in A the If A and B are statements, A B means A implies B, that is, if A is true then B is true. A B means A is equivalent to B, that is, A is true iff B is true. Example Which of the following are true for the statements in the preceding example? A C, A B, B A, A C. (T,F,T,T). Note the truth value actually depends on an implicit assumption such as x is an integer or x is a real number. If our implicit assumption is that x is a natural number, then A B is a true statement. For some algebraic systems that we shall see this semester A and C are not equivalent! Note The symbols and are used between statements. The symbol = is used between objects (numbers, functions, sets, etc. ). Be careful in making this distinction whenever you write a proof. Definition Let A, B be given sets. A function f : A B (pronounced, a function f from A to B), is a rule that assigns to each element x A a unique element f(x) B. The set A is called the domain of f and the set B, the codomain of f. The range of f, denoted f(a), is the set of all output values, The range is a subset of the codomain. f(a) := {f(x) : x A}. Definition The cartesian product of two sets A, B, denoted A B, is the set of all ordered pairs (x, y) with x A, y B. That is, A B = {(x, y) : x A, y B}. Example Z Z is the set of all ordered pairs of integers, Z Z = {(x, y) : x, y Z}. 9

10 10 1. ALGEBRAIC PROPERTIES OF THE INTEGERS Definition ) A binary operation on Z is a function : Z Z Z, that assigns to each ordered pair (a, b) of integers a unique integer denoted a b. 2) It is called commutative if a b = b a for all a, b Z. 3) It is called associative if a (b c) = (a b) c for all a, b, c Z. 4) An element e Z is called an identity element with respect to if a e = a and e a = a for all integers a. Example Ordinary addition and multiplication are binary ops on Z; so is subtraction. Division fails (why?). Addition and Multiplication are commutative and associative, and both have identities (what are they?). Definition A subset S of Z is said to be closed under (or with respect to ) if for any two a, b S we have a b S. Example Let a b = 2a + b. i) Is this a binary operation on Z? Yes, given any two integers a, b the output 2a + b is a uniquely defined integer. ii) Is this operation commutative? Note that a b = 2a + b, but b a = 2b + a. Thus a b b a in general (eg. 1 2 = 3 but 2 1 = 5.) iii) Is the operation associative? a (b c) = a (2b + c) = 2a + (2b + c) = 2a + 2b + c, whereas, (a b) c = (2a + b) c = 2(2a + b) + c = 4a + 2b + c. Since 2a + 2b + c 4a + 2b + c for a 0 we see that associativity fails. iv) Is there an identity element? Suppose that e is an identity. Then e a = a and a e = a for all a Z. Thus 2e + a = a and 2a + e = a, that is, e = 0 and e = a for all a Z. The latter condition clearly fails (e cannot equal a for all integers a.) Therefore, there is no identity. v) Is the set of odd integers O closed under? Lets check. Let a, b be odd integers. Then a b = 2a + b = even + odd = odd. Thus O is closed. Example Let a b = ab. Is this a binary op on Z? No, for example, 1 2 = 2 which is not an integer. (To be a binary operation on Z, the output has to be an integer for all possible integer inputs. If this fails for one example, then the operation fails to be a binary operation. Example The following are binary operations on Z: a b = 2b, a b = 3, a b = gcd(a 2 +1, b 2 +1), (where gcd is the greatest common divisor.) The following are not binary operations on Z: a b = b 2 /a, a b = ±a, a b = a b Deducing the Additional Properties of Z from the Axioms In this section we will deduce the Additional Properties of Z listed in Chapter 0 from the axioms. We will provide examples of two styles of proofs. The first is two-column style, where the right column provides the justification for each step. The second is text style, where the proof is written in paragraph form with complete sentences following all the rules of grammar. In formal mathematical writing one always uses text style, but for this class the two-column style is occasionally acceptable Subtraction-Equality principle. For any integers x, y, x y = 0 if and only if x = y.

12 12 1. ALGEBRAIC PROPERTIES OF THE INTEGERS Properties of Negatives. For any integers a, b we have i) ( a) = a. ii) ( 1)a = a. iii) ( a)b = (ab) = a( b). iv) ( a)( b) = ab. Proof. i) Since a + ( a) = 0 = ( a) + a by the definition of additive inverse, we see that a is the additive inverse of a, that is a = ( a). ii) For this part our goal is to show that ( 1)a is the additive inverse of a, that is, ( 1)a + a = 0. Now, ( 1)a + a = ( 1)a + 1(a), iii) We have 1 is the multiplicative identity = ( 1 + 1)a, distributive law = 0a, property of additive inverses = 0, by zero mult property ( a)b = (( 1)a)b, by part (ii) = ( 1)(ab), by associativity = (ab), by part (ii) The second equality can be proven in the same manner. iv) We have ( a)( b) = (a( b)), by part (iii) = ( (ab)), by part (iii) = ab, by part (i) Basic consequence of Trichotomy. Let a Z. If a > 0 then a < 0, and if a < 0 then a > 0. Proof. Suppose that a > 0 that is, a N. Then a N and so by definition a < 0. Next, suppose that a < 0, that is, a N. Then a = c for some c N. Thus, by a property of negatives, a = ( c) = c N, and so a > Products of Positives and Negatives. i) If a > 0 and b < 0 then ab < 0. ii) If a < 0 and b < 0, then ab > 0. Proof. i) Suppose that a < 0 and b > 0. Then a = c for some c > 0, by definition of <. Thus ab = ( c)b = (cb) by a property of negatives. Now, by the Positivity Axiom, cb > 0, and thus by the preceding property, (cb) < 0, that is, ab < 0. ii) Suppose that a < 0 and b < 0. Then a = c, b = d for some positive integers c, d. Thus ab = ( c)( d) = cd by a property of negatives. By the Positivity Axiom, cd > 0, and thus ab > 0.

14 14 1. ALGEBRAIC PROPERTIES OF THE INTEGERS The FOIL law. For any integers a, b, c, d, (a + b)(c + d) = ac + ad + bc + bd. Proof. We have (a + b)(c + d) = (a + b)c + (a + b)d, distributive law = (ac + bc) + (ad + bd), distributive law = ac + ad + bc + bd, general associative-commutative law Binomial Square Formula. For any positive integer n and integers a, b we have (a + b) 2 = a 2 + 2ab + b 2. We have (a + b) 2 = (a + b)(a + b), definition of square = a 2 + ba + ab + b 2, FOIL law = a 2 + ab + ab + b 2, commutative law for mult = a 2 + (ab + ab) + b 2, general associative law = a 2 + 2ab + b 2, definition of 2 times a number. We shall prove the general binomial expansion formula using induction in Section Discreteness Axioms for Z Let us return now to the two discreteness axioms for Z. These are the axioms that distinguish the integers from sets such as Q and R, which also satisfy all of the algebraic axioms (associative law, commutative law, distributive law, etc. ) These axioms imply that the integers are discrete objects. For Q and R we can say that between any two elements of the set there are infinitely many other elements of the set. Thus there is no gap between one rational or real number and the next one. For integers this is false. For instance, between 0 and 1 there are no other integers. More generally, for any distinct integers a, b we can say a b 1. a) Well Ordering Property of N. Any nonempty subset of N has a smallest element. Note that this property does not hold for the set of positive rational numbers Q + or positive real numbers R +. Consider for example the interval of real numbers (0, 1). This set has no smallest element. b) Axiom of Induction. Let S be a subset of N such that (i) 1 S and (ii) n S n + 1 S. Then S = N. Again, it is plain that this axiom fails for Q + and R +. One can prove that these two axioms are equivalent, that is the well ordering property of N implies the axiom of induction, and the axiom of induction implies the well ordering property. (See if you can prove either direction!) Here are a couple more equivalent discreteness properties that we will occasionally appeal to, but will not prove here.

15 1.4. PROOF BY INDUCTION 15 c) Maximum Element Principle. Any nonempty subset of integers bounded above contains a maximum element. d) Minimum Element Principle. Any nonempty subset of integers bounded below contains a minimum element Proof by Induction An important method of proof that we shall use in this class is a variation of the axiom of induction that we call the principle of induction. It is used for proving that a given statement is true for all natural numbers. Principle of Induction. Let P (n) be a statement involving a natural number n. Suppose that (i) P (1) is true. (Base Case.) (ii) If P (n) is true for a given n N then P (n + 1) is true. (Inductive Step.) Then P (n) is true for all n N. The assumption P (n) is true for a given n N is called the induction assumption. Note One of the common errors in proving something is to assume the statement you wish to prove is true in the middle of the proof. How would you respond to someone who objects to the Principle of Induction by saying in the induction assumption you are assuming what you wish to prove? (Note the subtle distinction. In the induction assumption, although n is arbitrary, we are only assuming P (n) is true for one value of n, not for all integers n.) Example Prove that for any positive integer n, (1.1) n 3 = n2 (n + 1) 2. 4 Proof. Proof by induction. For n = 1 we have 1 3 = , a true statement. Suppose that statement (1.1) is true for a given n. Then for n + 1 we have n 3 + (n + 1) 3 = ( n 3 ) + (n + 1) 3 = n2 (n + 1) 2 + (n + 1) 3, by induction assumption (1.1). 4 (Lets interrupt the proof with a little motivation. In your formal write-up you do not need to include these comments. Our goal is to establish the truth of (1.1) for n + 1, that is, we are hoping to get (n + 1) 2 (n + 2) 2 /4. Since this expression is in factored form, we proceed by factoring, rather than expanding.) (n + 1)2 = [n 2 + 4(n + 1)], 4 (n + 1)2 = [n 2 + 4n + 4] = 4 (n + 1)2 4 [n + 2] 2 = (n + 1)2 ((n + 1) + 1) 2. 4 Thus (1.1) holds for n + 1. At this point, there are two ways to conclude the induction proof. You can either say Thus, by the Principle of Induction, the

16 16 1. ALGEBRAIC PROPERTIES OF THE INTEGERS statement is true for all n N, or you can simply write QED, which stands for the Latin expression quod erat demonstrandum meaning literally what was to be demonstrated, but is more liberally taken to mean thus we have established what we wished to prove. In this example you should also try restating everything in sigma notation. The statement in this notation would read n k=1 k3 = n2 (n+1) 2 4 for any n N. Example n 3 n is a multiple of 3 for any positive integer n. Proof. Proof by induction. For n = 1 we note that = 0 = 0 3, a multiple of 3. Suppose that the statement is true for a given n, that is, n 3 n = 3k for some k Z. Then for n + 1 we have (n + 1) 3 (n + 1) = n 3 + 3n 2 + 3n + 1 n 1 = (n 3 n) + 3n 2 + 3n = 3k + 3n 2 + 3n, by induction assumption, = 3(k + n 2 + n) = 3 integer, since the integers are closed under addition and multiplication. QED. Example n 1 is a multiple of 5 for any positive integer n. Proof. Proof by induction. For n = 1, 6 n 1 = 6 1 = 5, a multiple of 5. Suppose that the statement is true for a given n, that is, 6 n 1 = 5k for some integer k. Then for n + 1 we have, 6 n+1 1 = 6 n 6 1 = (5k + 1)6 1, by the induction hypothesis. Then, using the distributive law we see that 6 n+1 1 = 30k = 30k + 5 = 5(6k + 1), a multiple of 5, since 6k + 1 is an integer. Thus the statement is true for n + 1. QED. Example The word induction is connected to the concept of inductive reasoning, a type of reasoning where one looks at data and tries to find a pattern or rule governing the data. Try the following example. Look at the sum of the first n odd numbers for n = 1, 2, 3, 4, 5: 1=1, 1+3=4, 1+3+5=9, =16, =25. What is the pattern? Write down a conjecture for what you think (2n 1) equals in general, and then prove it by induction. Example The Fibonacci sequence {F n } = 1, 1, 2, 3, 5, 8, 13,..., is governed by the rule F n+1 = F n + F n 1 for n 2, and the initial values F 1 = F 2 = 1. Prove that (1.2) F 1 + F F 2k 1 = F 2k, for any k N. Proof. Proof by induction on k. For k = 1 we have F 1 = 1 = F 2, so the statement is true. Suppose that the statement (1.2) is true for a given k. Then for

17 1.4. PROOF BY INDUCTION 17 k + 1 we have F 1 + F F 2k 1 + F 2k+1 = (F 1 + F F 2k 1 ) + F 2k+1 = F 2k + F 2k+1, by the induction hypothesis, = F 2k+2 = F 2(k+1), by the defining property of the Fibonacci sequence. QED Property 11. Binomial Expansion Formula. For any positive integer n and integers a, b we have (1.3) n ( ) ( ) ( ) ( ) n n n n (a+b) n = a k b n k = a n + a n 1 b+ a n 2 b ab n 1 +b n. k 1 2 n 1 k=0 Proof. The proof is by induction on n. For n = 1 the statement is trivial, (a + b) 1 = a + b. Suppose the statement is true for a given n. Then for n + 1 we have n ( ) n (a + b) n+1 = (a + b)(a + b) n = (a + b) a k b n k k = n k=0 ( ) n a k+1 b n k + k l=1 n k=0 k=0 ( ) n a k b n+1 k k ( ) n 1 n ( ) ( ) n n n = a n+1 + a k+1 b n k + b n+1 + n k 0 k=0 k=1 n ( ) n n ( n = a n+1 + b n+1 + a l b n+1 l + l 1 l l=1 l=1 n (( ) ( )) n n = a n+1 + b n a l b n+1 l l 1 l l=1 l=0 ( ) n a k b n+1 k k ) a l b n+1 l n ( ) n+1 n + 1 ( ) n + 1 = a n+1 + b n+1 + a l b n+1 l = a l b n+1 l, l l Strong Form of Induction. A variation of induction that we will sometimes use is called the Strong Form of Induction given below. It has the advantage in that one is allowed to assume a lot more in the induction assumption. We will see it used when we prove the Fundamental Theorem of Arithmetic. Strong Form of Induction. Let P (n) be a statement involving a natural number n. Suppose that (i) P (1) is true. (Base Case.) (ii) If P (k) is true for all k < n, for a given n N, then P (n) is true. (Inductive Step.) Then P (n) is true for all n N.

18 18 1. ALGEBRAIC PROPERTIES OF THE INTEGERS 1.5. Basic Divisibility Properties Our goal is to prove the Fundamental Theorem of Arithmetic, which states that every positive integer can be uniquely expressed as a product of primes, but to get there we need to start with basic properties of divisibility. Definition Let a, b Z, a 0. ax = b for some integer x. We say a divides b, written a b, if Example since 12 = 3 4; 5 12 since 12/5 / Z. Distinguish 3 12 from 3/12: the first is a statement and the latter an object. Note There are many equivalent ways of expressing the statement a divides b: a is a divisor of b, a is a factor of b, b is divisible by a, b is a multiple of a, b/a is an integer. Note, the latter form assumes knowledge about the rational numbers. At this point in the semester, I want you to prove statements about the integers without making reference to the larger number system Q. Example a. What are the divisors of 6? {±1, ±2 ± 3 ± 6}. b. What are the divisors of 0? All integers (except 0). (Ruling 0 out is just a technical assumption in our definition of divisibility above (a 0). It might make sense to say 0 is a divisor of 0 since 0 = 0 0, indeed 0 = 0 b for any b Z. It is ruled out because 0/0 is an undefined quantity.) Theorem Basic divisibility properties. Let a, b, d be integers. (i) If d a and d b then d (a + b). (ii) If d a and d b then d (a b). (iii) If d a and d b then for any integers x, y, d (ax + by). Proof. (iii) Suppose that d a, d b and that x, y Z. Then a = dk and b = dl for some integers k, l. Thus, ax + by = (dk)x + (dl)y = d(kx) + d(ly) = d(kx + ly) = d(integer), since Z is closed under addition and multiplication. Thus d ax + by. Example Another way to think about the basic divisibility properties, is to use the word multiple. Property (i) says that if a and b are multiples of d then so is a + b, while (ii) says that if a and b are multiples of d then so is a b. For example, if a and b are multiples of 5 then so are a + b and a b. Another way yet of saying this is the following: If S is the set of all multiples of 5, then S is closed under addition and subtraction. Theorem Transitive law for divisibility. For any integers a, b, c, if a b and b c, then a c. Proof. Homework Definition Let a, b be integers not both 0. The greatest common divisor of a, b, denoted gcd(a, b) is the largest integer that divides both a and b. ii) Two numbers are called relatively prime if gcd(a, b) = 1. Note gcd(0,0) is undefined. Why? 2. If a, b are not both zero, gcd(a,b) exists and is unique. (Why? Let S be the set of positive common divisors. It is a finite nonempty set, so it has a maximum element by the discreteness property of Z.)

19 1.6. EUCLIDEAN ALGORITHM gcd(0, n) = n. 4. gcd(a, b) = gcd(b, a)=gcd( a, b)= gcd( a, b). Example ) gcd(-16,-28)=4. 2) gcd(6,-16,-28) = Euclidean Algorithm. The Euclidean algorithm, an efficient way of computing GCDs, is based on two theorems, the Subtraction Principle for GCDs and the Division Algorithm. Theorem Subtraction Principle for GCDs. For any a, b Z, not both zero, and any integer q, gcd(a, b) = gcd(a qb, b). Proof. Let S be the set of common divisors of a and b, and T the set of common divisors of a qb and b. We claim that S = T, and so S and T have the same maximal element, that is, gcd(a, b) = gcd(a qb, b). To show S = T we need to show S T and T S. These inclusions follow readily from the basic divisibility properties. (Fill in details.) Example Find gcd(1023, 1026). By subtraction principle this equals gcd(1023, 3). The latter equals 3 since Division of Integers with remainder. Ex = 7R3, that is, 38 = Recall, 7 is called the quotient, 3 the remainder, 38 the dividend and 5 the divisor. Ex = 4R4, that is, 24 = ( 4) Ex. 3 8 = 0R3, that is, 3 = Note the remainder is always nonnegative and strictly smaller than the divisor. Theorem Division Algorithm. Let a, b be integers with b > 0. Then there exist integers q, r such that a = qb + r with 0 r < b. Moreover q, r are unique. (q=quotient and r= remainder in dividing a by b.) Proof. Existence: Let q be the greatest integer such that qb a, so that qb a < (q + 1)b. Then set r = a qb. It is easy to see that a = qb + r and that 0 r < b. Uniqueness: If a = qb+r = q b+r with 0 r, r < b, then b q q = r r < b and so q q < 1. Thus q = q and consequently r = r. (Fill in the details!) We are now ready to describe the Euclidean Algorithm with an example. (Recall, an algorithm is a step by step procedure for carrying out some task.) Example Find d = gcd(126, 49), by the Euclidean Algorithm. To get started we calculate = 2R28 by long division, and so 126 = Then, by the subtraction principle for GCDs, gcd(126, 49) =gcd( , 49) =gcd(28, 49). We now repeat the process by calculating 49 28, etc. (1) 126 = , d = gcd(28, 49) (2) 49 = , d = gcd(28, 21) (3) 28 = , d = gcd(7, 21) (4) 21 = 3 7, d = gcd(7, 0) = 7, ST OP The process stops when you get a remainder of 0.

20 20 1. ALGEBRAIC PROPERTIES OF THE INTEGERS 1.7. Linear Combinations and Linear Equations Definition A linear combination (LC) of two integers a, b is an integer of the form ax + by where x, y Z. Claim: If d = gcd(a, b) then d can be expressed as a linear comb. of a and b, that is, the equation (1.4) ax + by = d, has a solution in integers x, y. Example gcd(20,8)=4. By trial and error, 4 = ( 2)8. gcd(21,15)=3. By trial and error, 3 = We will see two methods for solving the GCD equation (1.4). The first is the method of Back Substitution and the second, the Array Method. Back Substitution: A method of solving the equation d = ax + by (with d = gcd(a, b)) by working backwards through the steps of the Euclidean algorithm. Example Use example above for gcd(126,49) to express 7 as a LC of 126 and 49. Use the method of back substitution. Start with equation (3): 7 = By (2) we have 21 = Substituting this into previous yields 7 = 28 (49 28) = By (1) we have 28 = Substituting this into previous yields 7 = 2 ( ) 49 = , QED. Array Method. A method for solving the linear equation ax + by = c for any c Z. Here we will do it for the case where c = gcd(a, b). Example We shall redo the previous example using the array method. To begin, set up an array with the first three columns initialized as shown below. For a given choice of x and y the linear combination 126x + 49y is given in the first row. Now, perform the Euclidean Algorithm on the numbers in top row, but do the corresponding column operations on the entire array. Let C 1 be the column with top entry 126, C 2 the column with top entry 49, etc.. The first step in the Euclidean algorithm is to subtract 2 times 49 from 126, so we let the next column C 3 be given by C 3 = C 1 2C 2. Then C 4 = C 2 C 3, C 5 = C 3 C x + 49y x y Thus, 7 = Example Find gcd(83, 17) and express it as a LC of 83 and x + 17y x Thus gcd = 1 and 1 = y By applying these methods to an arbitrary pair of integers a, b, we obtain the following theorem, called the GCDLC-theorem, Greatest Common Divisor Linear Combination Theorem. Theorem GCDLC theorem. Let a, b be integers not both zero, d = gcd(a, b). Then d can be expressed as a linear combination of a and b.

21 1.9. UNIQUE FACTORIZATION OF INTEGERS 21 Proof. (Optional Reading) A constructive proof can be given by following the Euclidean Algorithm together with the method of back substitution. The notation is rather cumbersome however. We shall give here instead a non-constructive proof. Let S = {ax + by : x, y Z}, the set of all linear combinations of a and b. This set clearly contains positive integers, so let e be the smallest positive integer in the set (e exists by well ordering). Say e = ax 0 + by 0, for some x 0, y 0 Z. We claim that e = d. Since d a and d b, we know d e, by a basic divisibility property. In particular, d e. Thus, it suffices to show that e is a common divisor of a and b, for this would imply that e d, the greatest common divisor of a and b. Lets show that e a. To do this, we shall compute a e and show that the remainder is 0. By the division algorithm, a = qe + r, for some q, r Z with 0 r < e. Thus a = q(ax 0 + by 0 ) + r, so r = a(1 qx 0 ) bqy 0 a linear combination of a and b. Since r < e we must have r = 0 by the minimality of e in S. Therefore e a. In the same manner we obtain e b. QED Corollary GCDLC corollary. Let d = gcd(a, b). (i) The set of all linear combinations of a, b is just the set of multiples of d. (ii) The gcd of a and b is the smallest positive linear combination of a and b. Proof. (i) Suppose that e is a LC of a, b, so that, e = ax+by for some x, y Z. Since d a and d b we must have d (ax + by) by basic divisibility property. Thus d e, that is e is a multiple of d. Conversely, suppose that e is a multiple of d, say e = dk for some k Z. By GCDLC theorem we know d = ax + by for some x, y Z. Thus e = kd = k(ax + by) = (kx)a + (ky)b a LC of a and b. (ii) This follows immediately from the fact that every LC of a and b is a multiple of d, and the smallest positive multiple of d is d Solving Linear Equations in integers Suppose that we wish to solve the equation ax + by = c in integers x, y. The preceding corollary tells us that this equation can be solved iff c is a multiple of d, where d = gcd(a, b), that is d c. This gives us Theorem Solvability of a Linear Equation. The linear equation ax + by = c has a solution in integers x, y iff d c where d = gcd(a, b). Example Solve the following equations or show that there is no solution. 120x 75y = 150,, 120x 75y = 11. By the array method we obtain 120(2) 75(3) = 15, the gcd of 120 and 75. Multiplying by 10 gives the solution (20, 30) to the first equation above. Since the second equation has no solution. Example A parcel costs \$2 and we only have 13 cent and 17 cent stamps. How can we do it? 13x + 17y = 200. We know 200 is a LC since gcd(13,17)=1. Using the array method we obtain the solution (-50,50). Then note that you can keep adding (17,-13) to get other solutions. Keep adding this until you obtain a solution that makes sense (that is, both x and y are positive.) 1.9. Unique Factorization of Integers Definition Two integers a, b are called relatively prime if gcd(a, b) = 1. Lemma Euclid s Lemma. If d ab and gcd(d, a) = 1 then d b.

22 22 1. ALGEBRAIC PROPERTIES OF THE INTEGERS Note: This lemma fails if gcd(d, a) 1. For example 4 (2 2), but 4 2. Thus d ab does not imply that d a or d b. Note Applications of Euclid s Lemma. (i) Every rational number can be uniquely expressed as a fraction in reduced form. Proof. Homework. (ii) If n is not a perfect square, then n is irrational. Proof. Homework. Definition i) A positive integer p > 1 is called a prime if its only positive factors are 1 and itself. 2,3,5,7,... ii) A positive integer n > 1 is called a composite if it is not a prime, that is, n = ab for some positive integers a, b with a > 1 and b > 1. 4,6,8,9,... Note is not a prime or a composite. It is the multiplicative identity element. (Later, we will call it a unit.) Why? If 1 is a prime then we would violate unique factorization, eg 6 = 2 3 = Lemma a) Let p be a prime such that p ab. Then p a or p b. b) Let p be a prime such that p a 1 a 2... a k where a i are integers. Then p a i for some i. Proof. Use Euclid s lemma for part (a) and induction for (b). Theorem FTA: Fundamental Theorem of Arithmetic. Any positive integer n > 1 can be expressed as a product of primes, and this expression is unique up to the order of the primes. Note (i) 12 = = = 3 2 2, are all considered the same factorization. (ii) We say that a prime p has a trivial factorization as a product of primes. Proof of FTA. Existence. Proof is by strong form of induction. Let P (n) be the statement that n has a factorization as a product of primes. P (2) is true. Suppose P (k) is true for all values k smaller than a given n. Consider P (n). If n is prime we are done. Otherwise n = ab for some integers a, b with 1 < a < n, 1 < b < n. By the induction assumption, a and b can be expressed as products of primes, say a = p 1 p k, b = q 1 q l. Then ab = p 1 p k q 1 q l, a product of primes. QED Uniqueness. Suppose that n is a positive integer with two representations as a product of primes, say, (1.5) n = p 1 p k = q 1 q r for some primes p i, q j, 1 i k, 1 j r. We may assume WLOG that k r. Then p 1 q 1... q r, so by lemma, p 1 q i1 for some i 1 {1, 2,..., r}. Since p 1 and q i1 are primes, we must have p 1 = q i1. Cancelling p 1 in (1.5) yields (1.6) p 2 p 3 p k = q 1 ˆq i1 q r, where ˆq i1 indicates that this factor has been removed. We can then repeat the argument with p 2 in place of p 1. After repeating this process k times we have that (1.7) p 1 = q i1, p 2 = q i2,..., p k = q ik for some distinct integers i 1, i 2,..., i k {1, 2,..., r}. Moreover, after cancelling each of the p i from (1.5) we are left with 1 on the LHS. If r > k then (1.5) would

23 1.10. FURTHER PROPERTIES OF PRIMES 23 say that 1 is a product of primes, a contradiction. Therefore r = k, and so by (1.7), the primes p i are just a permutation of the primes q i Further properties of primes Theorem There exist infinitely many primes. Proof. (Euclid) Proof by contradiction. Suppose that there are finitely many primes, say {p 1, p 2,..., p k }. Let N = p 1 p 2 p k +1. By FTA, N has a prime factor p i, for some i k. Thus, p i N and p i (p 1 p 2 p k ). Therefore p i (N p 1 p k ), that is, p i 1, a contradiction. Theorem Basic primality test. Let a > 1 be a positive integer such that a is not divisible by any prime p with p a. Then a is a prime. Proof. Proof by contradiction. Suppose that n is composite, say n = ab with 1 < a < n, 1 < b < n. We claim that either a n or b n, else ab > n n = n = ab, a contradiction. Say a n. Let p be any prime divisor of a. Then p a n, and, since p a and a n we have p n. But this contradicts assumption that n has no prime divisor p n. Therefore n is a prime. The Sieve of Eratosthenes: This is the method of finding all of the primes in a given interval [a, b] by crossing out (sieving) all multiples of primes p b. Example Find all primes between 200 and 220. Start by making a list of all the integers from 200 to 220, then cross out all multiples of 2,3,5,7, 11 and 13. Since 17 2 = 289 > 220 we don t need to consider 17 or any larger prime. Also, note that we don t need to cross out multiples of composites such as 4,6,8,9,.. since they already have smaller prime factors. At the end of this process, the only values left in the array must be primes by the preceding theorem.

24

25 CHAPTER 2 Modular Arithmetic and the Modular Ring Z m Example What s the pattern? 3+5=8, 6+4=10, 7+6=1, 9+8=5, 9+2=11 Let m N. m =modulus. Definition We say that two integers a, b are congruent modulo m, written a b (mod m), if a and b differ by a multiple of m, that is m (a b). Note: a b (mod m) is equivalent to a = b + mk for some integer k. Example Let m = 12. Then 16 4 (mod 12) since 16 4 = (mod 12). In the example above we see = 17 5 (mod 12). How about 256 what is it (mod 12). 256 = , so (mod 12). Definition The least residue of a (mod m) is the smallest nonnegative integer that a is congruent to (mod m). Note: The least residue of a (mod m) is the remainder in dividing a by m. Since 0 r < m l.r. is always in {0, 1, 2, 3,..., m 1}. Example m = 5 Wrap the integers around a five hour clock. Theorem Congruence is an equivalence relation. That is (i) Reflexive, (ii) Symmetric and (iii) Transitive. Theorem Important properties of congruences. The substitution laws. Suppose a b (mod m), and c d (mod m). Then (i) a ± c b ± d (mod m). (ii) a c b d (mod m). (iii) a n b n (mod m) for any positive integer n. Proof. (i) a b (mod m) m (a b). c d (mod m) m (d c). Thus, by a basic divisibility property, m [(a b) + (d c)], and so, by the associative and commutative laws, m [(a + d) (b + c)], that is, a + d b + c (mod m). (ii) We ll do this one in a different style. a b (mod m) a = b + mk for some k Z. c d (mod m) c = d + ml for some l Z. Thus ac = (b + mk)(d + ml) = bd + mkd + bml + mkml = bd + m(kd + bl + kml), by the distributive, commutative and associative laws. Since kd + bl + kml Z we see that ac and bd differ by a multiple of m, that is ac bd (mod m). (iii) The proof is by induction on n. For n = 1 the statement is trivially true. Suppose the statement is true for n, and now consider n + 1. Then we have a b (mod m) and by the induction assumption a n b n (mod m). Thus by property (ii), a a n b b n (mod m), that is, a n+1 b n+1 (mod m). QED 25

26 26 2. MODULAR ARITHMETIC AND THE MODULAR RING Z m Example (mod 7) (mod 5). Note that for a chain of congruences, the modulus (mod 5) is only indicated once on the far right. Example Explore powers of 2 (mod 3), (mod 6), (mod 7), (mod 8), (mod 9), etc.. For instance working (mod 6) we have 2 1, 2 2, 2 3, = 2, 4, 2, 4, 2,..., whereas (mod 7) we get 2 1, 2 2, 2 3, = 2, 4, 1, 2, 4, 1,.... Find the length of the repeating pattern in each case. Note that the repeating pattern always has length less than the modulus. Use the pattern discovered for (mod 6) and (mod 7) to calculate (mod 6) and (mod 7). Answers: 4, 2. Note Standard trick for calculating a n (mod m) if gcd(a, m) = 1. First find a power k such that a k ±1 (mod m). We will see a theorem called Euler s theorem later on that will give us an explicit value for such a k. For now, we will just use computation as in the previous example to find such a k. Example i) Find (mod 5). First note that 47 2 (mod 5), then compute 2 1, 2 2, 2 3, = 2, 4, 3, 1, 2,... to see that (mod 5). Thus (2 4 ) (mod 5). ii) Find (mod 7). This time we note that (mod 7) and so (2 3 ) (mod 7). iii) Find (mod 17). This time we observe that (mod 17) and so (2 4 ) 25 ( 1) (mod 17) A few applications of congruences Example Day of the week. What day of the week is it 10 years from today? (Hint: Work (mod 7), and don t forget the leap years.) What time will it be 486 hours from now? (Hint: Use a 24 hour clock.) Example Divisibility tests. We will assume that every positive integer n has a unique decimal representation (2.1) n = a k 10 k + a k 1 10 k a a 0 where the a i are the digits of n, a i {0, 1, 2,..., 9}, a k 0. In standard form, n would be written n = a k a k 1... a 0, but we will avoid this notation to avoid confusion with the product of the digits. (The proof that every positive integer has such a representation can be done using the strong form of induction. ) Thus, for example 2715 = Theorem Divisibility tests for 3,9 and 11. Let n be a positive integer with decimal representation as in (2.1). (i) 3 n iff 3 (a k + + a 0 ). (ii) 9 n iff 9 (a k + + a 0 ). (iii) 11 n iff 11 (a k a k 1 + a k 2 + ( 1) k a 0 ). Proof. (ii) We ll do the test for 9, the others being similar. First we observe that by the substitution properties for congruences, since 10 1 (mod 9), we have n a k 1 k + a k 1 1 k a 0 a k + a k a 0 (mod 9). Thus n 0 (mod 9) if and only if a k + a 0 0 (mod 9), that is 9 n iff 9 (a k + + a 0 ).

27 2.3. THE MODULAR RING Z m 27 Example The UPC symbol is a 12 digit code d 1, d 2,..., d 12, where the check digit d 12 is chosen such that 3(d 1 +d 3 + +d 11 )+(d d 12 ) 0 (mod 10). This extra digit is included to prevent errors in the scanning or human input of the UPC digits. If the congruence fails after inputting the digits then you will know there is an error in the input. However, if the congruence holds, you are not guaranteed that the input is correct Multiplicative inverses (mod m) Definition An integer x is called a multiplicative inverse of a (mod m) if ax 1 (mod m). We write x a 1 (mod m) in this case. (Fraction notation 1 a is not used in modular arithmetic.) Example Find the multiplicative inverse of 3 (mod 5), 4 (mod 6), by trial and error. Which numbers have multiplicative inverses (mod 10). 1. Theorem a has a multiplicative inverse (mod m) if and only if gcd(a, m) = Example Find the multiplicative inverse of 12 it to solve the linear congruence 12x 5 (mod 17). Example Solve 3x 5 (mod 6). (mod 17) and then use Theorem Cancelation Law for modular arithmetic. Suppose that ax ay (mod m) and that gcd(a, m) = 1. Then x y (mod m). Theorem The congruence ax b (mod m) is solvable if and only if d b where d = gcd(a, m). Proof. Homework The modular ring Z m Definition The (residue class) congruence class of a (mod m), denoted [a] m is the set of all integers congruent to a (mod m). Thus [a] m = {a + km : k Z}. Example [2] 5 = {2, 7, 12,... } { 3, 8,... }. Note [7] 5, [12] 5 also represent the same class. Draw a five hour clock and observe the different residue classes at each of the five hours. Note [a] m = [b] m if and only if a b (mod m). Thus eg. [2] 5 = [12] 5. The values 2,7,12, etc. are called representatives for the class [2] 5. Definition (i) Let m be a positive integer. The ring of integers (mod m) (also called the modular ring or residue class ring (mod m)) denoted Z m, is the set of all congruence classes (mod m), Z m = {[0] m,..., [m 1] m }, together with the addition and multiplication laws defined in (ii). (ii) We define addition and multiplication on Z m as follows: For [a] m, [b] m Z m, [a] m + [b] m := [a + b] m, [a] m [b] m := [ab] m.

28 28 2. MODULAR ARITHMETIC AND THE MODULAR RING Z m Example [3] 5 + [4] 5 = [2] 5. [3] 5 [4] 5 = [2] 5. Note Addition and multiplication are well defined on Z m, that is, if [a] m = [b] m and [c] m = [d] m then [a + c] m = [b + d] m and [ac] m = [bd] m. (That is, the sum and product do not depend on the choice of representatives for the congruence classes.) Proof. We ll do multiplication. The proof for addition is similar. First, the definition of multiplication in Z m is [x] n [y] m = [xy] m, for any [x] m, [y] m Z m. To show that the product is well defined we must show that the product does not depend on the choice of representatives for the congruence classes. Now lets begin the proof. Suppose that [a] m = [a ] m and [b] m = [b ] m. Our goal is to show that [ab] m = [a b ] m. By the definition of a congruence classes, we have a a (mod m) and b b (mod m). By the substitution property of congruences this implies that ab a b (mod m), that is, [ab] m = [a b ] m. QED. Note (i) The following algebraic axioms for Z hold for Z m as well: Commutative, Associative, Distributive, zero element, additive inverses. (ii) Note one important property that Z has that Z m doesn t have in general: Integral domain property. If m is composite and xy = 0 in Z m, we cannot conclude that x = 0 or y = 0. We will return to this in the next chapter. Convention. If it is understood that we are working in Z m then the bracket notation can be dropped. Thus we can abbreviate Z m = {0, 1, 2,..., m 1}, and we can say things like in Z 6, 3 7 = 3. What is in Z 5? Answer: 2. The example of clock-arithmetic that we started this chapter with is abbreviated notation in Z 12. Example Make an addition table and multiplication table for Z 4 using the abbreviated notation Group of units U m and the Euler phi-function Definition The group of units having multiplicative inverses in Z m. (mod m), U m, is the set of x Z m Note (i) We saw earlier that an element a Z m has a multiplicative inverse iff a is relatively prime to m. Thus U m is the set of elements a Z m with gcd(a, m) = 1. (ii) U m is closed under multiplication. Why? If a, b have multiplicative inverses a 1, b 1 respectively, then ab has a multiplicative inverse (ab) 1 = a 1 b 1. Example Below is the multiplication table for U 9.

### Elementary Number Theory We begin with a bit of elementary number theory, which is concerned

CONSTRUCTION OF THE FINITE FIELDS Z p S. R. DOTY Elementary Number Theory We begin with a bit of elementary number theory, which is concerned solely with questions about the set of integers Z = {0, ±1,

### ALGEBRAIC SYSTEMS, FALL Notation

ALGEBRAIC SYSTEMS, FALL 2012 TODD COCHRANE 1. Notation N = {1, 2, 3, 4, 5,... } = Natural numbers Z = {0, ±1, ±, 2, ±3,... } = Integers E = {0, ±2, ±4, ±6,... } = Even integers O = {±1, ±3, ±5,... } =

### Further linear algebra. Chapter I. Integers.

Further linear algebra. Chapter I. Integers. Andrei Yafaev Number theory is the theory of Z = {0, ±1, ±2,...}. 1 Euclid s algorithm, Bézout s identity and the greatest common divisor. We say that a Z divides

### Topics in Number Theory

Chapter 8 Topics in Number Theory 8.1 The Greatest Common Divisor Preview Activity 1 (The Greatest Common Divisor) 1. Explain what it means to say that a nonzero integer m divides an integer n. Recall

### MODULAR ARITHMETIC. a smallest member. It is equivalent to the Principle of Mathematical Induction.

MODULAR ARITHMETIC 1 Working With Integers The usual arithmetic operations of addition, subtraction and multiplication can be performed on integers, and the result is always another integer Division, on

### INTRODUCTION TO PROOFS: HOMEWORK SOLUTIONS

INTRODUCTION TO PROOFS: HOMEWORK SOLUTIONS STEVEN HEILMAN Contents 1. Homework 1 1 2. Homework 2 6 3. Homework 3 10 4. Homework 4 16 5. Homework 5 19 6. Homework 6 21 7. Homework 7 25 8. Homework 8 28

### Mathematics of Cryptography

CHAPTER 2 Mathematics of Cryptography Part I: Modular Arithmetic, Congruence, and Matrices Objectives This chapter is intended to prepare the reader for the next few chapters in cryptography. The chapter

### 3 Congruence arithmetic

3 Congruence arithmetic 3.1 Congruence mod n As we said before, one of the most basic tasks in number theory is to factor a number a. How do we do this? We start with smaller numbers and see if they divide

### Homework 5 Solutions

Homework 5 Solutions 4.2: 2: a. 321 = 256 + 64 + 1 = (01000001) 2 b. 1023 = 512 + 256 + 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = (1111111111) 2. Note that this is 1 less than the next power of 2, 1024, which

### CHAPTER 5. Number Theory. 1. Integers and Division. Discussion

CHAPTER 5 Number Theory 1. Integers and Division 1.1. Divisibility. Definition 1.1.1. Given two integers a and b we say a divides b if there is an integer c such that b = ac. If a divides b, we write a

### Mathematics of Cryptography Modular Arithmetic, Congruence, and Matrices. A Biswas, IT, BESU SHIBPUR

Mathematics of Cryptography Modular Arithmetic, Congruence, and Matrices A Biswas, IT, BESU SHIBPUR McGraw-Hill The McGraw-Hill Companies, Inc., 2000 Set of Integers The set of integers, denoted by Z,

### vertex, 369 disjoint pairwise, 395 disjoint sets, 236 disjunction, 33, 36 distributive laws

Index absolute value, 135 141 additive identity, 254 additive inverse, 254 aleph, 466 algebra of sets, 245, 278 antisymmetric relation, 387 arcsine function, 349 arithmetic sequence, 208 arrow diagram,

### CS 103X: Discrete Structures Homework Assignment 3 Solutions

CS 103X: Discrete Structures Homework Assignment 3 s Exercise 1 (20 points). On well-ordering and induction: (a) Prove the induction principle from the well-ordering principle. (b) Prove the well-ordering

MODULAR ARITHMETIC KEITH CONRAD. Introduction We will define the notion of congruent integers (with respect to a modulus) and develop some basic ideas of modular arithmetic. Applications of modular arithmetic

### It is time to prove some theorems. There are various strategies for doing

CHAPTER 4 Direct Proof It is time to prove some theorems. There are various strategies for doing this; we now examine the most straightforward approach, a technique called direct proof. As we begin, it

### 2. Integers and Algorithms Euclidean Algorithm. Euclidean Algorithm. Suppose a and b are integers

2. INTEGERS AND ALGORITHMS 155 2. Integers and Algorithms 2.1. Euclidean Algorithm. Euclidean Algorithm. Suppose a and b are integers with a b > 0. (1) Apply the division algorithm: a = bq + r, 0 r < b.

### Review for Final Exam

Review for Final Exam Note: Warning, this is probably not exhaustive and probably does contain typos (which I d like to hear about), but represents a review of most of the material covered in Chapters

### 8 Divisibility and prime numbers

8 Divisibility and prime numbers 8.1 Divisibility In this short section we extend the concept of a multiple from the natural numbers to the integers. We also summarize several other terms that express

### Copy in your notebook: Add an example of each term with the symbols used in algebra 2 if there are any.

Algebra 2 - Chapter Prerequisites Vocabulary Copy in your notebook: Add an example of each term with the symbols used in algebra 2 if there are any. P1 p. 1 1. counting(natural) numbers - {1,2,3,4,...}

### CHAPTER 5: MODULAR ARITHMETIC

CHAPTER 5: MODULAR ARITHMETIC LECTURE NOTES FOR MATH 378 (CSUSM, SPRING 2009). WAYNE AITKEN 1. Introduction In this chapter we will consider congruence modulo m, and explore the associated arithmetic called

### Congruences. Robert Friedman

Congruences Robert Friedman Definition of congruence mod n Congruences are a very handy way to work with the information of divisibility and remainders, and their use permeates number theory. Definition

### 8 Primes and Modular Arithmetic

8 Primes and Modular Arithmetic 8.1 Primes and Factors Over two millennia ago already, people all over the world were considering the properties of numbers. One of the simplest concepts is prime numbers.

### Chapter 6. Number Theory. 6.1 The Division Algorithm

Chapter 6 Number Theory The material in this chapter offers a small glimpse of why a lot of facts that you ve probably nown and used for a long time are true. It also offers some exposure to generalization,

### Continued Fractions and the Euclidean Algorithm

Continued Fractions and the Euclidean Algorithm Lecture notes prepared for MATH 326, Spring 997 Department of Mathematics and Statistics University at Albany William F Hammond Table of Contents Introduction

### Homework until Test #2

MATH31: Number Theory Homework until Test # Philipp BRAUN Section 3.1 page 43, 1. It has been conjectured that there are infinitely many primes of the form n. Exhibit five such primes. Solution. Five such

### I. GROUPS: BASIC DEFINITIONS AND EXAMPLES

I GROUPS: BASIC DEFINITIONS AND EXAMPLES Definition 1: An operation on a set G is a function : G G G Definition 2: A group is a set G which is equipped with an operation and a special element e G, called

### Stanford University Educational Program for Gifted Youth (EPGY) Number Theory. Dana Paquin, Ph.D.

Stanford University Educational Program for Gifted Youth (EPGY) Dana Paquin, Ph.D. paquin@math.stanford.edu Summer 2010 Note: These lecture notes are adapted from the following sources: 1. Ivan Niven,

### ORDERS OF ELEMENTS IN A GROUP

ORDERS OF ELEMENTS IN A GROUP KEITH CONRAD 1. Introduction Let G be a group and g G. We say g has finite order if g n = e for some positive integer n. For example, 1 and i have finite order in C, since

### Theorem (The division theorem) Suppose that a and b are integers with b > 0. There exist unique integers q and r so that. a = bq + r and 0 r < b.

Theorem (The division theorem) Suppose that a and b are integers with b > 0. There exist unique integers q and r so that a = bq + r and 0 r < b. We re dividing a by b: q is the quotient and r is the remainder,

### ALGEBRA HANDOUT 2: IDEALS AND QUOTIENTS. 1. Ideals in Commutative Rings In this section all groups and rings will be commutative.

ALGEBRA HANDOUT 2: IDEALS AND QUOTIENTS PETE L. CLARK 1. Ideals in Commutative Rings In this section all groups and rings will be commutative. 1.1. Basic definitions and examples. Let R be a (commutative!)

### Course notes on Number Theory

Course notes on Number Theory In Number Theory, we make the decision to work entirely with whole numbers. There are many reasons for this besides just mathematical interest, not the least of which is that

### Practice Problems for First Test

Mathematicians have tried in vain to this day to discover some order in the sequence of prime numbers, and we have reason to believe that it is a mystery into which the human mind will never penetrate.-

### Oh Yeah? Well, Prove It.

Oh Yeah? Well, Prove It. MT 43A - Abstract Algebra Fall 009 A large part of mathematics consists of building up a theoretical framework that allows us to solve problems. This theoretical framework is built

### MAT2400 Analysis I. A brief introduction to proofs, sets, and functions

MAT2400 Analysis I A brief introduction to proofs, sets, and functions In Analysis I there is a lot of manipulations with sets and functions. It is probably also the first course where you have to take

### 2. Methods of Proof Types of Proofs. Suppose we wish to prove an implication p q. Here are some strategies we have available to try.

2. METHODS OF PROOF 69 2. Methods of Proof 2.1. Types of Proofs. Suppose we wish to prove an implication p q. Here are some strategies we have available to try. Trivial Proof: If we know q is true then

### Math 3000 Running Glossary

Math 3000 Running Glossary Last Updated on: July 15, 2014 The definition of items marked with a must be known precisely. Chapter 1: 1. A set: A collection of objects called elements. 2. The empty set (

### Chapter 4, Arithmetic in F [x] Polynomial arithmetic and the division algorithm.

Chapter 4, Arithmetic in F [x] Polynomial arithmetic and the division algorithm. We begin by defining the ring of polynomials with coefficients in a ring R. After some preliminary results, we specialize

### Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.

Elementary Number Theory and Methods of Proof CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.edu/~cse215 1 Number theory Properties: 2 Properties of integers (whole

### 1 Die hard, once and for all

ENGG 2440A: Discrete Mathematics for Engineers Lecture 4 The Chinese University of Hong Kong, Fall 2014 6 and 7 October 2014 Number theory is the branch of mathematics that studies properties of the integers.

### 5.1 Commutative rings; Integral Domains

5.1 J.A.Beachy 1 5.1 Commutative rings; Integral Domains from A Study Guide for Beginner s by J.A.Beachy, a supplement to Abstract Algebra by Beachy / Blair 23. Let R be a commutative ring. Prove the following

### Finite Sets. Theorem 5.1. Two non-empty finite sets have the same cardinality if and only if they are equivalent.

MATH 337 Cardinality Dr. Neal, WKU We now shall prove that the rational numbers are a countable set while R is uncountable. This result shows that there are two different magnitudes of infinity. But we

### Discrete Mathematics, Chapter 4: Number Theory and Cryptography

Discrete Mathematics, Chapter 4: Number Theory and Cryptography Richard Mayr University of Edinburgh, UK Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 4 1 / 35 Outline 1 Divisibility

### Prime Numbers. Chapter Primes and Composites

Chapter 2 Prime Numbers The term factoring or factorization refers to the process of expressing an integer as the product of two or more integers in a nontrivial way, e.g., 42 = 6 7. Prime numbers are

### Discrete Mathematics Lecture 3 Elementary Number Theory and Methods of Proof. Harper Langston New York University

Discrete Mathematics Lecture 3 Elementary Number Theory and Methods of Proof Harper Langston New York University Proof and Counterexample Discovery and proof Even and odd numbers number n from Z is called

### Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 5

CS 70 Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 5 Modular Arithmetic One way to think of modular arithmetic is that it limits numbers to a predefined range {0,1,...,N

### CS103X: Discrete Structures Homework Assignment 2: Solutions

CS103X: Discrete Structures Homework Assignment 2: Solutions Due February 1, 2008 Exercise 1 (10 Points). Prove or give a counterexample for the following: Use the Fundamental Theorem of Arithmetic to

### Solutions to Homework Problems from Chapter 3

Solutions to Homework Problems from Chapter 3 31 311 The following subsets of Z (with ordinary addition and multiplication satisfy all but one of the axioms for a ring In each case, which axiom fails (a

### Chapter Three. Functions. In this section, we study what is undoubtedly the most fundamental type of relation used in mathematics.

Chapter Three Functions 3.1 INTRODUCTION In this section, we study what is undoubtedly the most fundamental type of relation used in mathematics. Definition 3.1: Given sets X and Y, a function from X to

### Elementary Number Theory

Elementary Number Theory Ahto Buldas December 3, 2016 Ahto Buldas Elementary Number Theory December 3, 2016 1 / 1 Division For any m > 0, we define Z m = {0, 1,... m 1} For any n, m Z (m > 0), there are

### 3. Applications of Number Theory

3. APPLICATIONS OF NUMBER THEORY 163 3. Applications of Number Theory 3.1. Representation of Integers. Theorem 3.1.1. Given an integer b > 1, every positive integer n can be expresses uniquely as n = a

3. QUADRATIC CONGRUENCES 3.1. Quadratics Over a Finite Field We re all familiar with the quadratic equation in the context of real or complex numbers. The formula for the solutions to ax + bx + c = 0 (where

### Number Theory: A Mathemythical Approach. Student Resources. Printed Version

Number Theory: A Mathemythical Approach Student Resources Printed Version ii Contents 1 Appendix 1 2 Hints to Problems 3 Chapter 1 Hints......................................... 3 Chapter 2 Hints.........................................

### Algebra for Digital Communication

EPFL - Section de Mathématiques Algebra for Digital Communication Fall semester 2008 Solutions for exercise sheet 1 Exercise 1. i) We will do a proof by contradiction. Suppose 2 a 2 but 2 a. We will obtain

### Lecture 13 - Basic Number Theory.

Lecture 13 - Basic Number Theory. Boaz Barak March 22, 2010 Divisibility and primes Unless mentioned otherwise throughout this lecture all numbers are non-negative integers. We say that A divides B, denoted

### Elementary Number Theory

Elementary Number Theory A revision by Jim Hefferon, St Michael s College, 2003-Dec of notes by W. Edwin Clark, University of South Florida, 2002-Dec L A TEX source compiled on January 5, 2004 by Jim Hefferon,

### 4. Number Theory (Part 2)

4. Number Theory (Part 2) Terence Sim Mathematics is the queen of the sciences and number theory is the queen of mathematics. Reading Sections 4.8, 5.2 5.4 of Epp. Carl Friedrich Gauss, 1777 1855 4.3.

### CHAPTER 6: RATIONAL NUMBERS AND ORDERED FIELDS

CHAPTER 6: RATIONAL NUMBERS AND ORDERED FIELDS LECTURE NOTES FOR MATH 378 (CSUSM, SPRING 2009). WAYNE AITKEN 1. Introduction In this chapter we construct the set of rational numbers Q using equivalence

### ABSTRACT ALGEBRA: A STUDY GUIDE FOR BEGINNERS

ABSTRACT ALGEBRA: A STUDY GUIDE FOR BEGINNERS John A. Beachy Northern Illinois University 2014 ii J.A.Beachy This is a supplement to Abstract Algebra, Third Edition by John A. Beachy and William D. Blair

### Integers and Rational Numbers

Chapter 6 Integers and Rational Numbers In this chapter, we will see constructions of the integers and the rational numbers; and we will see that our number system still has gaps (equations we can t solve)

### Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2

CS 70 Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2 Proofs Intuitively, the concept of proof should already be familiar We all like to assert things, and few of us

### The last three chapters introduced three major proof techniques: direct,

CHAPTER 7 Proving Non-Conditional Statements The last three chapters introduced three major proof techniques: direct, contrapositive and contradiction. These three techniques are used to prove statements

### U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, 2009. Notes on Algebra

U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, 2009 Notes on Algebra These notes contain as little theory as possible, and most results are stated without proof. Any introductory

### 2 The Euclidean algorithm

2 The Euclidean algorithm Do you understand the number 5? 6? 7? At some point our level of comfort with individual numbers goes down as the numbers get large For some it may be at 43, for others, 4 In

### A farmer raises rabbits. Each rabbit gives birth when 2 months old and then each month there after.

Fibonacci Problem: A farmer raises rabbits. Each rabbit gives birth when 2 months old and then each month there after. Question: How many rabbits will the farmer have after n months? Try it on small numbers.

### MATH 321 EQUIVALENCE RELATIONS, WELL-DEFINEDNESS, MODULAR ARITHMETIC, AND THE RATIONAL NUMBERS

MATH 321 EQUIVALENCE RELATIONS, WELL-DEFINEDNESS, MODULAR ARITHMETIC, AND THE RATIONAL NUMBERS ALLAN YASHINSKI Abstract. We explore the notion of well-definedness when defining functions whose domain is

### 3.1 The Definition and Some Basic Properties. We identify the natural class of integral domains in which unique factorization of ideals is possible.

Chapter 3 Dedekind Domains 3.1 The Definition and Some Basic Properties We identify the natural class of integral domains in which unique factorization of ideals is possible. 3.1.1 Definition A Dedekind

### This section demonstrates some different techniques of proving some general statements.

Section 4. Number Theory 4.. Introduction This section demonstrates some different techniques of proving some general statements. Examples: Prove that the sum of any two odd numbers is even. Firstly you

### Chapter 1 Basic Number Concepts

Draft of September 2014 Chapter 1 Basic Number Concepts 1.1. Introduction No problems in this section. 1.2. Factors and Multiples 1. Determine whether the following numbers are divisible by 3, 9, and 11:

### CHAPTER 2. Inequalities

CHAPTER 2 Inequalities In this section we add the axioms describe the behavior of inequalities (the order axioms) to the list of axioms begun in Chapter 1. A thorough mastery of this section is essential

### Mathematics of Cryptography Part I

CHAPTER 2 Mathematics of Cryptography Part I (Solution to Odd-Numbered Problems) Review Questions 1. The set of integers is Z. It contains all integral numbers from negative infinity to positive infinity.

### An Investigation of Erd s Method: A Scheme for Generating Carmichael Numbers

An Investigation of Erd s Method: A Scheme for Generating Carmichael Numbers By: Trevor Brennan Advisor: John Greene 1 Contents Chapter 1: Introduction. 1 Chapter 2: Number and Group Theory Principles.

### Handout NUMBER THEORY

Handout of NUMBER THEORY by Kus Prihantoso Krisnawan MATHEMATICS DEPARTMENT FACULTY OF MATHEMATICS AND NATURAL SCIENCES YOGYAKARTA STATE UNIVERSITY 2012 Contents Contents i 1 Some Preliminary Considerations

### = 2 + 1 2 2 = 3 4, Now assume that P (k) is true for some fixed k 2. This means that

Instructions. Answer each of the questions on your own paper, and be sure to show your work so that partial credit can be adequately assessed. Credit will not be given for answers (even correct ones) without

### Algebra. Sample Solutions for Test 1

EPFL - Section de Mathématiques Algebra Fall semester 2008-2009 Sample Solutions for Test 1 Question 1 (english, 30 points) 1) Let n 11 13 17. Find the number of units of the ring Z/nZ. 2) Consider the

### Number Theory. Proof. Suppose otherwise. Then there would be a finite number n of primes, which we may

Number Theory Divisibility and Primes Definition. If a and b are integers and there is some integer c such that a = b c, then we say that b divides a or is a factor or divisor of a and write b a. Definition

### Section 3.3 Equivalence Relations

1 Section 3.3 Purpose of Section To introduce the concept of an equivalence relation and show how it subdivides or partitions a set into distinct categories. Introduction Classifying objects and placing

### Basic Properties of Rings

Basic Properties of Rings A ring is an algebraic structure with an addition operation and a multiplication operation. These operations are required to satisfy many (but not all!) familiar properties. Some

### Proof: A logical argument establishing the truth of the theorem given the truth of the axioms and any previously proven theorems.

Math 232 - Discrete Math 2.1 Direct Proofs and Counterexamples Notes Axiom: Proposition that is assumed to be true. Proof: A logical argument establishing the truth of the theorem given the truth of the

### STUDY GUIDE FOR SOME BASIC INTERMEDIATE ALGEBRA SKILLS

STUDY GUIDE FOR SOME BASIC INTERMEDIATE ALGEBRA SKILLS The intermediate algebra skills illustrated here will be used extensively and regularly throughout the semester Thus, mastering these skills is an

### 9 abcd = dcba. 9 ( b + 10c) = c + 10b b + 90c = c + 10b b = 10c.

In this session, we ll learn how to solve problems related to place value. This is one of the fundamental concepts in arithmetic, something every elementary and middle school mathematics teacher should

### MATH REVIEW KIT. Reproduced with permission of the Certified General Accountant Association of Canada.

MATH REVIEW KIT Reproduced with permission of the Certified General Accountant Association of Canada. Copyright 00 by the Certified General Accountant Association of Canada and the UBC Real Estate Division.

### Today s Topics. Primes & Greatest Common Divisors

Today s Topics Primes & Greatest Common Divisors Prime representations Important theorems about primality Greatest Common Divisors Least Common Multiples Euclid s algorithm Once and for all, what are prime

### Introduction to Modern Algebra

Introduction to Modern Algebra David Joyce Clark University Version 0.0.6, 3 Oct 2008 1 1 Copyright (C) 2008. ii I dedicate this book to my friend and colleague Arthur Chou. Arthur encouraged me to write

### APPLICATIONS OF THE ORDER FUNCTION

APPLICATIONS OF THE ORDER FUNCTION LECTURE NOTES: MATH 432, CSUSM, SPRING 2009. PROF. WAYNE AITKEN In this lecture we will explore several applications of order functions including formulas for GCDs and

### MTH 382 Number Theory Spring 2003 Practice Problems for the Final

MTH 382 Number Theory Spring 2003 Practice Problems for the Final (1) Find the quotient and remainder in the Division Algorithm, (a) with divisor 16 and dividend 95, (b) with divisor 16 and dividend -95,

### The Prime Numbers. Definition. A prime number is a positive integer with exactly two positive divisors.

The Prime Numbers Before starting our study of primes, we record the following important lemma. Recall that integers a, b are said to be relatively prime if gcd(a, b) = 1. Lemma (Euclid s Lemma). If gcd(a,

### Number Theory Hungarian Style. Cameron Byerley s interpretation of Csaba Szabó s lectures

Number Theory Hungarian Style Cameron Byerley s interpretation of Csaba Szabó s lectures August 20, 2005 2 0.1 introduction Number theory is a beautiful subject and even cooler when you learn about it

### Instructor: Bobby Kleinberg Lecture Notes, 5 May The Miller-Rabin Randomized Primality Test

Introduction to Algorithms (CS 482) Cornell University Instructor: Bobby Kleinberg Lecture Notes, 5 May 2010 The Miller-Rabin Randomized Primality Test 1 Introduction Primality testing is an important

### Notes on Factoring. MA 206 Kurt Bryan

The General Approach Notes on Factoring MA 26 Kurt Bryan Suppose I hand you n, a 2 digit integer and tell you that n is composite, with smallest prime factor around 5 digits. Finding a nontrivial factor

### POSITIVE INTEGERS, INTEGERS AND RATIONAL NUMBERS OBTAINED FROM THE AXIOMS OF THE REAL NUMBER SYSTEM

MAT 1011 TECHNICAL ENGLISH I 03.11.2016 Dokuz Eylül University Faculty of Science Department of Mathematics Instructor: Engin Mermut Course assistant: Zübeyir Türkoğlu web: http://kisi.deu.edu.tr/engin.mermut/

### NUMBER THEORY AMIN WITNO

NUMBER THEORY AMIN WITNO ii Number Theory Amin Witno Department of Basic Sciences Philadelphia University JORDAN 19392 Originally written for Math 313 students at Philadelphia University in Jordan, this

### Chapter Two. Number Theory

Chapter Two Number Theory 2.1 INTRODUCTION Number theory is that area of mathematics dealing with the properties of the integers under the ordinary operations of addition, subtraction, multiplication and

### 11 Ideals. 11.1 Revisiting Z

11 Ideals The presentation here is somewhat different than the text. In particular, the sections do not match up. We have seen issues with the failure of unique factorization already, e.g., Z[ 5] = O Q(

### EULER S THEOREM. 1. Introduction Fermat s little theorem is an important property of integers to a prime modulus. a p 1 1 mod p.

EULER S THEOREM KEITH CONRAD. Introduction Fermat s little theorem is an important property of integers to a prime modulus. Theorem. (Fermat). For prime p and any a Z such that a 0 mod p, a p mod p. If

### a = bq + r where 0 r < b.

Lecture 5: Euclid s algorithm Introduction The fundamental arithmetic operations are addition, subtraction, multiplication and division. But there is a fifth operation which I would argue is just as fundamental

### Algebra Revision Sheet Questions 2 and 3 of Paper 1

Algebra Revision Sheet Questions and of Paper Simple Equations Step Get rid of brackets or fractions Step Take the x s to one side of the equals sign and the numbers to the other (remember to change the

### Reading 7 : Program Correctness

CS/Math 240: Introduction to Discrete Mathematics Fall 2015 Instructors: Beck Hasti, Gautam Prakriya Reading 7 : Program Correctness 7.1 Program Correctness Showing that a program is correct means that

### CLASS 3, GIVEN ON 9/27/2010, FOR MATH 25, FALL 2010

CLASS 3, GIVEN ON 9/27/2010, FOR MATH 25, FALL 2010 1. Greatest common divisor Suppose a, b are two integers. If another integer d satisfies d a, d b, we call d a common divisor of a, b. Notice that as