[size=150]When working with integers modulo n, addition and multiplication are performed in a way that respects the modular arithmetic rules. In modular arithmetic, the result of any operation is reduced to its remainder when divided by the modulus (n). This ensures that all results stay within the range of 0 to n-1, which forms the set of integers modulo n.[br][br]Addition (a + b) modulo n:[br]To perform addition modulo n, simply add the two integers a and b together, and then take the remainder when divided by n.[br][br]Example:[br]Let's consider addition modulo 5: Z[sub]5[/sub][br][br](2 + 4) mod 5 = 6 mod 5 = 1[br][br]In this case, the sum of 2 and 4 is 6, and when divided by 5, the remainder is 1. So, in Z[sub]5[/sub], 2 + 4 is equivalent to 1.[br][br]Multiplication (a * b) modulo n:[br]To perform multiplication modulo n, multiply the two integers a and b together, and then take the remainder when divided by n.[br][br]Example:[br]Let's consider multiplication modulo 7: Z[sub]7[/sub][br][br](3 * 5) mod 7 = 15 mod 7 = 1[br][br]Here, the product of 3 and 5 is 15, and when divided by 7, the remainder is 1. So, in Z[sub]7[/sub], 3 * 5 is equivalent to 1.[br][br]Modular arithmetic is used in various applications, including cryptography, number theory, and computer algorithms, where it provides a useful way to wrap around values within a fixed range.[/size]
[size=200]Write the addition and multiplication tables for Z[sub]7[/sub].[/size]