2

Prove or disprove: For all positive integers $n$ and for all integers $a$ and $b$, if $a \equiv b \mod n$, then $a^2 \equiv b^2 \mod n$.

Prove or disprove: For all positive integers $n$ and for all integers $a$ and $b$, if $a^2 \equiv b^2 \mod n$, then $a \equiv b \mod n$.

If you disprove, you should give an explicit counterexample.

To prove or disprove these would I just need to plug in a set of numbers for $a$ and $b$ and $n$, and if it works then it's true otherwise it's false?

Falko
  • 516
hello
  • 37

4 Answers4

2

You can disprove the claim if you find just one counter example.

However to prove, you will have to show it is true for every possible $a,b,n$. Luckily, that is sometimes not as onerous as it sounds.

Here, for the first one, note $a-b$ is a multiple of $n$ immediately gives you $(a-b)(a+b)=a^2-b^2$ is always a multiple as well.

For the second one, can you see a counter example?

Macavity
  • 46,381
2

The first one is true - see that $a\equiv b\mod n\to a-b\equiv 0\mod n$, so that $a^2-b^2=(a-b)(a+b)\equiv0\mod n \to a^2\equiv b^2\mod n$.

The second is false, consider $a=3,b=4,n=7$.

Disproving something can be as simple as finding a counter-example. Multiple correct responses from a computer only improves the possibility that it is true.

JMP
  • 21,771
0

To prove or disprove these would I just need to plug in a set of numbers for a and b and mod n, and if it works then it's true otherwise it's false?

If you plug in numbers and it fails, then you disproved it.

But, if you plug in numbers and it works, then you have not yet shown anything. But it might give you a lead how to find an argument.

quid
  • 42,135
0

if $a\equiv b$mod $n$ then $a = b +kn$ for some $k$.

Squaring both gives $a^2= b^2 + 2bkn + k^2n^2 = b^2 + (2bk + k^2n)n$

Therefore, $a^2\equiv b^2$ mod n.

The converse is false and I'll leave it to you to find a counter-example.

John Douma
  • 11,426
  • 2
  • 23
  • 24