so this is confusing, with mod arithmetic i see that you only need the remainder as an answer but i don't get how it is solved.
like
2 (equivalence sign) 4(mod 3)
(3+4)(mod 5)
2 = 4(mod3) is a true/false question and the = sign after 2 is the one with the 3 bars the equivalence sign. since i don't know the code to put that in.
like if i get something like (2-4)(mod 7) and (2+9)(mod 10) how would i go about solving those?
2 = 4 (mod 3) is false.
Modulo arithmetic really isn't too bad once you get used to the idea. In fact, we often use modulo arithmetic to tell the time; For example, 13 o'clock = 1 o'clock. And, 20:00 = 8pm. This is all modulo 12.
Two number are equal modulo n if they differ by a multiple of n.
Perhaps the best way to write a number modulo n, is to write it as a number less than n but greater than 0.
If you number is lager than n, subtract multiples of n until you reach a number less than n. If you have a negative number, add multiplies of n until you arrive at a number greater than 0 but less than n.
so what is 4 modulo 3? Well, 4 -3 = 1. So 4 = 1 mod 3.
What is -10 modulo 3? Keep adding multiples of 3 until you reach a number greater than 0 but less than 3. -10 = -7 = -4 = -1 = 2 mod (3)
Addition and subtraction are easy, just work out the answer as usual, then add or subtract multiples of 3 until you arrive at a number greater than 0 but less than n.
$\displaystyle 2 + n = 3 \ (mod\7) $
Treat like a normal equation, and subtract 2 from both sides...
$\displaystyle n = 1 \ (mod\7) $
And you're done.
Of course, this isn't the unique way of writing it, in fact:
$\displaystyle n = 1\ (mod\7) = 8\ (mod\ 7) = 15 \ (mod \7) = 22\ (mod\ 7) ... $
hmm that seems understandable,
and makes alot more sense now
how about fractions? n/2 = 4(mod7)
so n = 2(mod7)
n=2(mod7) n=9(mod7) n=16(mod7) n=23(mod 7)
would that be the solution?
then it comes regular equations like
3=(n-4)(mod7)
so 3n-12(mod7)
n=-3(mod7) n=5(mod7) n=12(mod7) n=19(mod7)
is my math correct? lol thanks in advance!
For the first one, you get the idea, but you made a small mistake.
If you have
$\displaystyle n/2 \equiv 4 (\mbox{mod } 7)$
then, as you would do usually, multiply (not divide!) both sides by 2, and you get
$\displaystyle n \equiv 8 (\mbox{mod } 7)$
Now, as Ant explained, this is not the only answer. In fact, the "best" or most "standard" answer is the one where n is equivalent to some number between 0 and 7; in this case, that would be $\displaystyle n \equiv 1 (\mbox{mod } 7)$.
For the second equation, note that
$\displaystyle 3 \equiv (n-4) (\mbox{mod } 7)$
is the same equation as
$\displaystyle n-4 \equiv 3 (\mbox{mod } 7)$.
So, we again can just solve it like we would any regular equation, by adding 4 to both sides:
$\displaystyle 7 \equiv n (\mbox{mod } 7)$
So our answer is $\displaystyle n \equiv 7 (\mbox{mod } 7)$ (or better: $\displaystyle n \equiv 0 (\mbox{mod } 7)$).