# Can a right triangle have odd-length legs and even-length hypotenuse?

Is it possible to have an even integer hypotenuse and odd integer legs (perpendicular and base) in a right triangle? If yes, please give an example. If no then please prove that.

Hint:

Suppose you have $A^2+B^2=C^2$ where $A=2a+1, B=2b+1, C=2c$

Substitute, expand and then take out terms with factors of $4$

Suppose that you are right and there is a possible right triangle such that $a=2k+1, b=2m+1$ and $c=2n$ {legs are odd while hypotenuse is even} and you have $a^2+b^2=c^2$.

Now on expanding (substituting for $a, b, c$) you will get that: $$(2k+1)^2+(2m+1)^2=(2n)^2$$ $$4(k^2+m^2+k+m)+2=4n^2$$ On dividing the equation by $2$, you will get $$2(k^2+m^2+k+m)+1=2n^2$$

Notice that term on left is odd while the term on right is even. A contradiction. So, you were wrong and therefore there does not exist such a right triangle

• I find the contradiction even more obvious if the equation is divided by 4. The left side then clearly is not an integer (given all variables are integers, the bracketed sum is one, to which we add 1/2), while the right side clearly is. I know, it's the same statement modulo 4, but still. – Peter - Reinstate Monica Nov 29 '16 at 17:32
• I prefer dividing the equation by 2, which yields an odd integer on the left equalling an even integer on the right, violating parity. I think that's about as intuitive as equating a half-integer to an integer. – S. G. Nov 29 '16 at 17:36
• I have taken your suggestion into account as it will improve the answer.Thanks @S.G. – Vidyanshu Mishra Nov 29 '16 at 18:41
• It's a bit confusing to say "you were wrong OR there does not exist such a triangle." Logically, what is true is "you were wrong AND there does not exist such a triangle"! I know that by "OR", you mean "to put it another way"; but in a mathematical context that is not so clear. A better word is THEREFORE. – TonyK Nov 30 '16 at 0:20
• Yes @TonyK I was just saying same thing in two ways. Thanks for suggestion – Vidyanshu Mishra Nov 30 '16 at 1:18