Two congruence both be satisfied

38 Views Asked by At

Can "a is congruent to c(mod b)" and "a is congruent to -c(mod b)" both be true at the same time? I think they cannot both be true, but I am wondering the reason why they cannot.

2

There are 2 best solutions below

2
On BEST ANSWER

$a\equiv c \bmod b$ and $a\equiv -c \bmod b$ hold iff $2c \equiv 0 \bmod b$.

So, there are plenty of examples when $b$ is even: just take $a=c=b/2$.

There is also the trivial solution $c\equiv 0 \bmod b$, which works for all $b$. This is the only solution when $b$ is odd.

0
On

I Assume that $b=p$ is prime. Also I assume that p is odd prime. If $p$ is even then you have $1\equiv \pm 1 \mod 2.$ Since $a\equiv c \mod p$ and $a\equiv -c \mod p$ we get $p|\gcd(a+c,a-c)=d.$ But $d|a+c$ and $d|a-c$ thus $d|2a, d|2c$ so $d|2\gcd(a,c).$ If $\gcd(a,c)=1,$ then you get $p|2$ which is a contradiction. So $\gcd(a,c)>1$ so $p|2\gcd(a,c)$ and $\gcd(a,c)=p\cdot r.$ So $a=pr_1,c=pr_2$ (for some integers $r_1,r_2)$ and taking $\mod p$ both $a$ and $c$ zero. That is, if $b=p$ is odd prime, then $a\equiv c\equiv 0 \mod p.$