3

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.

user26486
  • 11,331
MrDi
  • 1,001
  • 1
    Carry on the calculation $;(n-x)^2\pmod n;$ , that's all ! – Timbuc Apr 09 '15 at 14:20
  • Note that using the command a \pmod n drastically simplified the formatting necessary, and produced a nicer-looking result :) – pjs36 Apr 09 '15 at 14:22

3 Answers3

4

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.)

Travis Willse
  • 99,363
  • Is it right to write $x^2\pmod {n}\equiv a\pmod n$ – MrDi Apr 09 '15 at 14:30
  • I don't think I've seen it written that way, and it's anyway redundant so I'd probably avoid it. – Travis Willse Apr 09 '15 at 14:38
  • 1
    So the answer $y^{2}=(n-x)^{2}=(-x \pmod{n})^{2}=x^{2}\pmod{n}^2=a\pmod{n}\pmod{n}^2=a\pmod{n}$ is that right? – MrDi Apr 09 '15 at 14:41
  • It's the right idea, but the notation is peculiar: The notation $\pmod n$ is just a reminder that we're working modulo $n$, and in particular, one shouldn't "square" it or otherwise apply algebraic operations to it. I would just write this as $$y^2 \equiv (n - x)^2 \equiv (-x)^2 \equiv x^2 \equiv a \bmod{n}.$$ – Travis Willse Apr 09 '15 at 14:44
  • how did you get $(n-x)^{2}=(-x)^2$, shouldn't that be $(n-x)^{2}=(-x \pmod n)^{2}$? – MrDi Apr 09 '15 at 14:46
  • The statement is that they are equivalent modulo $n$, not equal---this is encoded by the use of $\equiv$ (instead of $=$) and the notation $\bmod n$ at the end of the equation. We could write that particular equivalence as $$(n - x)^2 \equiv (-x)^2 \bmod n$, but again, we shouldn't "square" $\bmod n$---think of it just as a mark we make at the end of a line to denote that the equation holds modulo $n$, and not as an algebraic object that can be manipulated in its own right. – Travis Willse Apr 09 '15 at 14:50
  • I get it now, thanks. – MrDi Apr 09 '15 at 14:51
  • 1
    You're welcome, glad to help. – Travis Willse Apr 09 '15 at 14:57
1

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

W2701
  • 31
1

${\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.

Bill Dubuque
  • 272,048