# Homework Help: Show that for any two integers a, b , (a+b)^2 ≡ a^2 + b^2 (mod 2)

1. Sep 25, 2010

### Simkate

Show that for any two integers a, b , (a+b)^2 ≡ a^2 + b^2 (mod 2)

I have my solution below i wanted someone to help chekc if i have done anything wrong. Thank You for your help.

The thing that is going on here is that 2x = 0 (mod 2) for any x. If x = ab, then 2ab = 0 (mod 2).
We see that (a+b)^2 = a^2 + 2ab + b^2. Then this equals a^2 + 0 + b^2 (mod 2).

Therfore, the Proof:

By definition, showing (a+b)^2 = a^2 + b^2 (mod 2) is equivalent to showing that

2 divides [(a+b)^2 - (a^2+b^2)]
2 divides [(a^2 + 2ab + b^2 - a^2 - b^2]
2 divides 2ab

To show 2 divides 2ab we need to find an integer k such that 2k = 2ab. Take k = ab. Thus it is proved.

2. Sep 25, 2010

### Hurkyl

Staff Emeritus
This looks like a good proof.

However... you already know modular arithmetic, right?
Then this is a complete proof.

(For the record, you could have also proven it by exhaustion -- there are only four cases, and they're easy to check by hand. However, the argument you used generalizes to replacing 2 by any prime)
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}