In Number Theory, I have seen many a times the following property being used though I don't know what it's called formally (that makes it harder to Google):
(a * b) (mod n) = (a mod n) * (b mod n)
What is this called and how can it be formally proved?
Let
a=15,b=42, andn=12.(a * b) % n = 6(a % n) * (b % n) = 18However,
((a % n) * (b % n)) % n = 6.From what I read at https://www.khanacademy.org/computing/computer-science/cryptography/modarithmetic/a/modular-multiplication, the "multiplication property of modular arithmetic" is
– William John Holden Feb 09 '22 at 18:31(a * b) % n = ((a % n) * (b % n)) % n