prove Zn addition is commutative?

To prove that addition in Zn is commutative, we need to show that for any two elements a and b in Zn, the sum of a and b is equal to the sum of b and a.

Let's consider a and b as elements in Zn. By definition, addition in Zn is done modulo n. This means that if we sum two numbers and the result is greater than n, we take the remainder when divided by n.

Now, let's calculate a + b:
- If a + b < n, then the sum is already within Zn and we are done.
- If a + b ≥ n, we need to calculate the remainder of (a + b) when divided by n. Let's call this remainder r. So we have (a + b) ≡ r (mod n), where r < n.

Similarly, let's calculate b + a:
- If b + a < n, then the sum is already within Zn and we are done.
- If b + a ≥ n, we need to calculate the remainder of (b + a) when divided by n. Let's call this remainder s. So we have (b + a) ≡ s (mod n), where s < n.

To prove that addition in Zn is commutative, we need to show that r = s.

We can write a + b as (a + b) ≡ r (mod n), and b + a as (b + a) ≡ s (mod n).

By the properties of modular arithmetic, we know that the order of addition doesn't affect the remainder. Therefore, if we swap a and b, the remainders r and s will be the same. Thus, r = s.

And since r = s, we have shown that a + b = b + a, proving that addition in Zn is commutative.