What Modular Arithmetic means from Wikipedia
In mathematics, modular arithmetic is a system of arithmetic for integers, where numbers "wrap around" upon reaching a certain value
So the point of modular arithmetic is to do our normal arithmetic operations wrap around after reaching a certain value
From what I read https://www.doc.ic.ac.uk/~mrh/330tutor/ch03.html about modular arithmetic operations, they are just normal operations, same as how we use in normal arithmetic
Consider modulo n
modulo addition is defined (a+b)mod n
modulo subtraction is defined as (a-b) mod n
modulo multiplication is defined as (a*b) mod n
modulo division is defined as (a/b) mod n
After defining above arithmetic operations we just happened to have found out that this is true, (a+b)mod n =(a mod n + b mod n) mod n which is similar with multiplication and subtraction
That doesn't mean that modular addition is (a mod n + b mod n) or does it? (correct me if I am wrong) this might sound dumb to many
now consider modular division as it is defined as (a/b) mod n
ex: consider a=48,b=8,n=4 (here b is multiple of n)
now from what i understand this is perfectly fine (48/8)mod 8=6 right ! but as it says in above so when we modular division is not valid (a/b) modulo n when b is multiple of n.
but can't we just say (a/b) modulo n != (a mod n)/( b mod n) and move on.
so everything boils down to following questions
1.Does while doing modular arithmetic every number 'p' that is ever going to used in arithmetic operation should be in [0,n) so modular arithmetic is ((a mod n + b mod n) mod n)
2.It doesn't matter what numbers you are using, at the end, value should be 0<= V< n so modular arithmetic is (some long cumbersome arithmetic expressions) mod n
Explain where I am getting this wrong, this is bothering me a lot