If $x^2\equiv a\pmod n$, then $(n-x)^2\equiv a\pmod n$

138 Views Asked by At

Given that $x$ is a solution to $x^{2}\equiv a \pmod n$, show that $y=n-x$ is also a solution.

Please don't solve, just give me a hint.

3

There are 3 best solutions below

8
On BEST ANSWER

Hint Expand $y^2 = (n - x)^2$ modulo $n$.

(This approach is perhaps easier to see intuitively if we recall that $$n - x \equiv -x \bmod n,$$ in which case we can write $$(-x)^2 \equiv a \bmod n,$$ which bears a close resemblance to the real analogue of the statement.)

0
On

Just expand $y^2=(n-x)^2$ and fill in the expression. The rest should be straightforward.

0
On

${\rm mod}\ n\!:\ \color{#c00}{\overbrace{n\!-\!x}^{\large n \color{black}{ \,\equiv\,0}}\equiv -x}\Rightarrow (\color{#c00}{n\!-\!x})^2\equiv (\color{#c00}{-x})^2 \equiv x^2 \equiv a\ $ by basic Congruence Rules.

Remark $\ $ Generally, by the linked congruence rules, congruences are preserved by replacing arguments of sums and products by any congruent argument.