23 - Integers modulo n

!Screenshot 2023-10-31 at 10.16.32 PM.png
!Screenshot 2023-10-31 at 10.16.44 PM.png
!Screenshot 2023-10-31 at 10.17.59 PM.png
!Screenshot 2023-10-31 at 10.18.23 PM.png!Screenshot 2023-10-31 at 10.18.54 PM.png!Screenshot 2023-10-31 at 10.19.18 PM.png!Screenshot 2023-10-31 at 10.19.30 PM.png

In class practice

Modular integer equivalence proof could be on exam??
Congruence modulo n is an equivalence relation on Z.

Proof. Let n∈N.
(Reflexive)
Let a∈Z. Then a−a=0⋅n so n∣(a−a) and a≡amodn.
(Symmetric)
Let a,b∈Z. Assume that a≡bmodn. Then n∣(a−b). Hence a−b=nk for some k∈Z. Then (b−a)=n(−k) so n∣b−k and b≡amodn.
(Transitive)
Let a,b,c∈Z. Assume that a≡bmodn and b≡cmodn. Then n∣a−b so a−b=nk for some k∈Z. Also, n∣(b−c), so b−c=nj for some j∈Z. Then a−c=n(k+j). Since k+j∈Z, n∣(a−c), so a≡cmodn.



HW 23

Ben Finch

E 23.1
Let n∈N and a∈Z. Prove that 0∈a― if and only if n∣a.
Proof.
⟹
Assume that 0∈a―. Then we have 0=a+kn for some k∈Z. Then a=n(−k). Thus n∣a.

⟸
Assume that n∣a. Then a=mn for some m∈Z. We have a=mn+0n=a+kn where k is 0. Thus 0∈a―

Thus, 0∈a― if and only if n∣a. ◻

E 23.2
a) 6―+7―=13―=4―
b) 6―⋅7―=42―=0―
c) 59―⋅119―=29―⋅29―=841―=1―
d) 6―⋅5―+85―=30―+85―=115―=3―
e) 2―10=1024―=4―

E 23.3

Addition Table for Z5

+ 0― 1― 2― 3― 4―
0― 0― 1― 2― 3― 4―
1― 1― 2― 3― 4― 0―
2― 2― 3― 4― 0― 1―
3― 3― 4― 0― 1― 2―
4― 4― 0― 1― 2― 3―

Multiplication Table for Z5

× 0― 1― 2― 3― 4―
0― 0― 0― 0― 0― 0―
1― 0― 1― 2― 3― 4―
2― 0― 2― 4― 1― 3―
3― 0― 3― 1― 4― 2―
4― 0― 4― 3― 2― 1―

E 23.4
Let n∈N.
a) Proof. Let X,Y∈Zn. Then X=a― and Y=b― for some a,b∈Z. Then X+Y=a+b―. By properties of integer addition, a+b―=b+a―. We have b+a―=Y+X. Thus X+Y=Y+X. ◻

b) Proof. Let X,Y∈Zn. Then X=a― and Y=b― for some a,b∈Z. Then X⋅Y=ab―. By properties of integer multiplication, ab―=ba―. We have ba―=Y⋅X. Thus X⋅Y=Y⋅X. ◻

c) Proof. Let X∈Zn. Then X=a― for some a∈Z. Thus X⋅0―=a⋅0―=0―. ◻

d) Proof. Let X∈Zn. Then X=a― for some a∈Z. Thus X⋅1―=a⋅1―=a―=X―. ◻

e) Proof. Let X∈Zn. X=a― for some a∈Z. Then X⋅2―=a⋅2―=2a―=a+a―=a―+a―=X+X. ◻

f) Proof. Let X∈Zn. Fix Y=n−X. Then X+Y=X+(n−X)=n. Since n≡0modn, it follows that X+Y=0―. ◻

g) Proof. Let X,Y,Z∈Zn. Then X=a― and Y=b― Z=c― for some a,b,c∈Z. Thus (X+Y)⋅Z=(a―+b―)⋅c―=(a―⋅c―)+(b―⋅c―)=(X⋅Z)+(Y⋅Z). ◻

E 23.5
Let X,Y∈Z5, X≠0―. There are 4 cases

  1. Assume X=1―. Fix Y=1―. We see that X⋅Y=1―⋅1―=1―
  2. Assume X=2―. Fix Y=3―. We see that X⋅Y=2―⋅3―=6―=1―
  3. Assume X=3―. Fix Y=2―. We see that X⋅Y=3―⋅2―=6―=1―
  4. Assume X=4―. Fix Y=4―. We see that X⋅Y=4―⋅4―=16―=1―
    Thus for all X∈Z5 (where X≠0), there exists a Y such that X⋅Y=1―.

E 23.6
Multiplication Table for Z6

× 0― 1― 2― 3― 4― 5―
0― 0― 0― 0― 0― 0― 0―
1― 0― 1― 2― 3― 4― 5―
2― 0― 2― 4― 0― 2― 4―
3― 0― 3― 0― 3― 0― 3―
4― 0― 4― 2― 0― 4― 2―
5― 0― 5― 4― 3― 2― 1―

No. Fix X=2―. Based on the multiplication table, there is no Y∈Z6 such that 2―⋅Y=1―.

E 23.7
a)
Proof. Let n∈N be a composite number. By Theorem 19.3, n=ab for some ab∈Z, where 1<a<n and 1<b<n (meaning a,b ≠0). We find that a―⋅b―=ab―=n―. Since n≡0modn, n―=0―. Thus if n is a composite number, there are nonzero elements a―,b―∈Zn such that a―⋅b―=0―. ◻

b)
Proposition. If n∈N is prime, prove that a―,b―∈Zn if a―⋅b―=0―, then a―=0 or b―=0

Proof. Let n∈N be a prime number. Let a―,b―∈Zn. We work directly. Assume that a―⋅b―=0―. Then for some a′∈a― and some b′∈b―, we have a′b′=nk for some k∈Z. Thus n∣a′b′. By Euclid's Lemma, n∣a′ or n∣b′. We have two cases.

  1. If n∣a′, a′=nl for some l∈Z, so a′∈0―. Thus a―=0
  2. If n∣b′, b′=np for some p∈Z, so b′=0―. Thus b―=0
    Thus either a―=0 or b―=0.

If n=1, then Euclid's lemma does not apply. In this case, the proof is trivially true since Z1={0―}. Then a and b=0―. ◻

c)
Proposition.
If n∈N is prime, prove that for any nonzero a∈Zn, there exists b∈Zn with a·b=1.

Proof. Let n∈N be a prime number. Let a―∈Zn. Let a―≠0
Then for some a′∈a―, n∤a′. Thus by Theorem 19.4, GCD(a′,n) =1. Using the Euclidian Algorithm, we can find integers x,y such that a′x+ny=1. This can also be written as a′x=1modn. It follows that a―⋅x―=1―∈Zn. Since x― is arbitrary, we can sub this for b―. Thus we have a―⋅b―=1― for some a―,b―∈Zn.