1. ## Congruence

Prove that a congruent b(modn) if and only if a^2 + b^2 congruent 2ab(mod n^2)

2. Originally Posted by empressA
Prove that a congruent b(modn) if and only if a^2 + b^2 congruent 2ab(mod n^2)

Hint: $\displaystyle a= b\!\!\!\pmod n\Longleftrightarrow a-b= 0\!\!\!\pmod n\Longrightarrow (a-b)^2= 0\!\!\!\pmod {n^2}\Longleftrightarrow$ ...take it from here (two little steps left).

Tonio

3. Originally Posted by empressA
Prove that a congruent b(modn) if and only if a^2 + b^2 congruent 2ab(mod n^2)

$\displaystyle a \equiv b(mod n) \Leftrightarrow a^2 + b^2 \equiv 2ab (mod n)$

let's take first $\displaystyle \Rightarrow$

we have $\displaystyle a \equiv b (mod n)$ want the right side

$\displaystyle a \equiv b (mod n )$ this mean $\displaystyle n \mid a-b$ and this mean there exist an integer x such that $\displaystyle a-b = x n$
so

$\displaystyle (a-b)^2 = x^2 n^2$

$\displaystyle n^2 \mid (a-b)^2$

$\displaystyle (a-b)^2 \equiv 0 (mod n)$ simplify the left side

now $\displaystyle \Leftarrow$ we have

$\displaystyle a^2 + b^2 = 2ab (mod n^2 )$

$\displaystyle a^2 - 2ab + b^2 \equiv 0 (mod n^2 )$

$\displaystyle (a-b)^2 \equiv 0 (mod n^2 )$

so there exist an integer y such that

$\displaystyle (a-b)^2 = y n^2$ note that y is square can you prove it ??

so we can write y=c^2

$\displaystyle (a-b)^2 = c^2 n^2$ by taking square root

$\displaystyle (a-b) = c n$

$\displaystyle a-b \equiv 0 (mod n)$ proof ends