TITLE: I think I have discovered a proof for the irrationality of $\sqrt{2}$, but I'm not sure
QUESTION [7 upvotes]: I'm not a mathematician/mathematics student/amateur mathematician.  I'm just some guy preparing for a GMAT-type exam. I couldn't sleep last night as I was lost in thought on bed and this proof came to me. I'm not claiming this to be a "new" proof; maybe it's already well known. But I've had my fair share of disappointments in the past when I thought I had "discovered" something, when all it was was really just a poor understanding of the problem and related elements.
Please help me understand if this proof for the irrationality of $\sqrt{2}$ is correct.
Proof:
A necessary condition to form a Pythagorean triplet is that, in its simplest form, one (and only one) of the two smaller integers of the triplet should be divisible by $4$.  (I hope this is obvious, but I can provide clarification for this if needed - edit: this condition seems to be generating confusion, so I've added an easy-to-visualize example below).
Assuming that $\sqrt{2}$ is rational violates this condition in the following way:
If $\sqrt 2= a/b$ with $a,b\in \mathbb Z$,
then $2b^2=a^2$.
This gives rise to $b^2+b^2=a^2$, a Pythagorean triplet in $(b,b,a), b<a$.
This indicates that either both the smaller numbers of the triplet are divisible by $4$, or that neither is. Either of these outcomes violates the condition for forming a Pythagorean triplet, invaldiating the assumption that $\sqrt{2}$ is rational.
Edit:  Example for the Pythagorean condition below.  This isn't a rigorous/formal proof, just an intuitive one.  The beads of the blue square must "encircle" the red square, which is the only way the aggregate of the two can form the larger square.  Since the red square has four sides, the blue square must necessarily contain a number of beads which is divisible by $4$.

REPLY [3 votes]: This is an addition to John Hughes answer that proves the necessary condition. Since $a^2 + b^2 = c^2$, if $c$ is odd we have that at least one of $a, b$ must be even, and thus at least one of $a^2$, $b^2$ divisible by 4. That part is easy.
On the other hand if $c^2$ is even both $a$ and $b$ can be odd, and without ruling this possibility out for a primitive $(a, b, c)$ the proof is not complete. It should be obvious that if $a$, $b$ are both even the triplet wasn't primitive.
There is a way to complete your proof. Consider the equation $\bmod 4$, with $a, b$ both odd:
$$a^2 + b^2 \equiv c^2 \mod 4$$
Regardless if $a \equiv 1$ or $a\equiv 3 \mod 4$, since $3^2 \equiv 1 \mod 4$ we have:
$$1 + 1 \equiv c^2 \mod 4$$
But $c$ is even, thus
$$2 \equiv 0 \mod 4$$
which shows there are no solutions, thus $a, b$ can't both be odd with even $c$.