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.
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.
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.)
Just expand $y^2=(n-x)^2$ and fill in the expression. The rest should be straightforward.
${\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.
a \pmod n
drastically simplified the formatting necessary, and produced a nicer-looking result :) – pjs36 Apr 09 '15 at 14:22