# Modular arithmetic

by davon806
Tags: arithmetic, modular
 P: 436 Well suppose all $$a_1,a_2,b_1,b_2,n$$ are real numbers and that $$a_1=b_1 (mod n)$$ $$a_2=b_2 (mod n)$$ then by the definition of mod n equality we can conclude that there exist integers $$k_1,k_2$$ such that $$a_1-b_1=k_1n , a_2-b_2=k_2n$$ so by adding the last 2 equations we have $$(a_1+a_2)-(b_1+b_2)=(k_1+k_2)n$$ therefore there exists the integer $$k_3=k_1+k_2$$ such that $$(a_1+a_2)-(b_1+b_2)=(k_3)n$$ hence by definition of (mod n) equality this means that $$(a_1+a_2)=(b_1+b_2) (mod n)$$. As you see in the proof we dont need anything of the a's or b's or the n to be integer. However if we want to prove that $$a_1a_2=b_1b_2 (mod n) (1)$$ we gonna need a's and b's as well n to be integers because the proof goes like this: $$a_1a_2-a_1b_2-b_1a_2+b_1b_2=k_1k_2n^2$$ so n has to be integer in order for $$(a_1a_2+b_1b_2)=(a_1b_2+b_1a_2) (mod n) (2)$$ . We will also need a's and b's to be integers in order to prove that $$a_1b_2=b_1b_2 (mod n) (3.1) b_1b_2=b_1a_2 (mod n) (3.2)$$ hold. From (2) and (3)s we can infer the (1).
 P: 436 Modular arithmetic By multiplying $$a_1-b_1=k_1n , a_2-b_2=k_2n$$ together. I have omitted some steps cause it isnt allowed here to give too much help with homework. Eventually to prove why (1) doesnt hold if all a's and b's and n are real, you ll have to construct a counter example. I just pinpointed where the proof goes wrong if a's and b's and n arent all integers, but one could claim that there might be another proof specific made for when a's and b's and n are reals.