Problem
NT-B2-M02-P015 Equal Squares
#15
★★★★☆ Level 4 of 5
Let \(p\) be prime. Prove that if \(x^2\equiv y^2\pmod p\), then \(x\equiv y\pmod p\) or \(x\equiv -y\pmod p\).
Factor the difference of squares.
From \(x^2\equiv y^2\pmod p\), we get \(p\mid (x-y)(x+y)\). Since \(p\) is prime, it divides one of the factors. Hence \(x\equiv y\pmod p\) or \(x\equiv -y\pmod p\).
It is useful to emphasise that this form requires a prime modulus.