Section 1: Rings and Fields



Modular Arithmetic

HW # 1-2 p. 7 at the end of the notes

In this section, we discuss the basics of modular arithmetic. As we will see later, the most basic number systems that we are accustomed to working with are examples of groups, rings and fields. First, we review some basic set notation and then the basics of modular arithmetic.

Notation for Special Sets

Recall that a set is a collection of objects enclosed in braces. The objects in the sets are call elements. If a is an element of a set, we write [pic]. For example, [pic] but [pic]. Sets can have both a finite and an infinite number of elements. The following represents special notations that are used for widely known infinite sets.

Notation for Special Sets

1. Z = the set of integers [pic]

2. Q = the set of rational numbers (numbers that can be expressed as the quotient [pic] of

two integers m and n, where [pic].

3. [pic]= the set of real numbers.

4. [pic], and [pic] represent the set of positive integers, positive rational numbers, and

positive real numbers, respectively. For example, [pic].

5. [pic] = the set of complex numbers, that is, numbers of the form [pic], were i is the

imaginary unit given by [pic]. Examples of the complex numbers include [pic] and [pic].

6. [pic], [pic], and [pic] represent the set of non-zero integers, non-zero rational numbers, non-zero real numbers, and non-zero complex numbers, respectively. For example, [pic].

7. [pic] represent the set of [pic] matrices with real entries. The matrices

[pic] and [pic] are examples.

Modular Arithmetic

To begin, we first review what it means to divide two numbers..

Definition 1.1: We say that a divides b, denoted as [pic], if [pic] for some integer a.

For instance, we know that [pic] since [pic]. However, we know that [pic] since there is no integer multiple of 5 that gives 21. Dividing two numbers gives a special case of the division algorithm, which we state next.

Division algorithm: Let [pic]be a positive integer ([pic]) and let [pic] be any integer. When computing [pic], there is exactly one pair of integers [pic] (called the quotient) and [pic] (called the remainder) such that

[pic] where [pic].

This leads into the definition of modular arithmetic.

Definition 1.2: Given two integers [pic] and a positive integer [pic], we say that a is congruent to b modulo m, written

[pic]

if [pic]. The number m is called the modulus of the congruence.

Example 1: Explain why [pic] but [pic].

Solution: [pic] since [pic] or [pic] and [pic] or [pic]. However, [pic] since [pic] or [pic].



Theorem 1.3: [pic]if and only if [pic] for some integer k

Proof:



Fact: Computationally, [pic] gives the integer remainder of [pic]. We say that

[pic] if a and b produce the same integer remainder upon division by m.

For example, [pic] since both 23 and 8 produce are remainder of 3 when divided by 5, that is [pic] and [pic]. We can write [pic].

Note: When performing modular arithmetic computationally, the remainder r should never be negative. Hence, when finding the remainder for [pic], look for the nearest integer that m divides that is less than b.

Example 2: Compare computing [pic] with [pic].

Solution:



Doing Modular Arithmetic For Larger Numbers With A Calculator

To do modular arithmetic with a calculator, we use the fact from the division algorithm that

[pic],

and solve for the remainder to obtain

[pic].

We put this result in division tableau format as follows:

[pic] (1)

Example 3: Compute [pic]

Solution:



Example 4: Compute [pic]

Solution: Using a calculator, we obtain [pic]. The largest integer less than 48.6 is 48. Hence, we assign q = floor(48.6) = 48. If we let b= 500234 and m = 10301 in (2), then

[pic].

The remainder of the division is r = 5786. Hence, [pic]. █

Example 5: Compute [pic]

Solution: Using a calculator, we obtain [pic]. The largest integer less than [pic] is [pic]. Hence, we assign q = floor(-28.7) = -29. If we let b= -3071 and m = 107 in (2), then

[pic]

Thus, [pic] █

Generalization of Modular Arithmetic

Fact: The common remainder of two numbers have when they are divided can be used to define a congruence class. The remainder r will be the smallest positive integer in the congruence class. Suppose r is the remainder of [pic] divided by m, that is

[pic]

Theorem 1 says that then

[pic], where k is an integer.

Example 6: Find all elements of the congruence class [pic].

Solution:



Example 7 Find congruence class [pic] modulo 7.

Solution:



Note: For [pic], the set of distinct congruence classes are [pic], [pic], [pic], [pic], [pic], [pic], and [pic]. This partitions the integers Z into disjoint subsets.

Fact: Given [pic], Z can be partitioned into distinct congruence classes of the form

[pic]

Definition 3: We define the set of integers modulo m, denoted by [pic], as the set

[pic]

For example, [pic] and [pic]. Informally, [pic] represents all for the possible integer remainders in modulo m arithmetic. This set will be important when we study later concepts.

Exercises

1. For the following, used the division algorithm to compute [pic]. State the quotient q and remainder r for the division. Use the result to compute [pic].

a. b = 30, m = 7.

b. b = -30, m = 7.

c. b = 100, m = 26.

d. b = -100, m = 26.

e. b = 2047, m = 137.

f. b = 123129, m = 10371.

g. b = -319212, m = 31233.

2. Find the set of elements that make up the following congruence classes.

a. The elements of the congruence class [pic].

b. The elements of the congruence class [pic].

c. The elements of the congruence class [pic].

-----------------------

Take Floor of Quotient (largest integer less than calculator value of [pic]).

Remainder

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download