Are all hypotenuses irrational if the shorter sides are integers?

Is it sufficient to say that providing the shorter two sides of a right triangle can be expressed as integers that work out to equal the value of the hypotenuse, then the value of the hypotenuse must be irrational? For example, suppose I wish to prove that $\sqrt 5$ is irrational, if the shorter sides are 1 and 2 then the length of the hypotenuse $\sqrt 5$ must be irrational. Please tell me if I've made a mistake.

• Have you heard of Pythagorean triples? Such as 3,4,5 – A.Riesen Jun 1 '16 at 16:52
• Can't say I have. – Michael Lee Jun 1 '16 at 16:53
• @MichaelLee Well, it should answer your question. $3^2+4^2=5^2$. – Clement C. Jun 1 '16 at 16:57
• $$5^2+12^2=13^2, \;8^2+15^2=17^2,\;161^2+240^2=289^2,...$$ – DonAntonio Jun 1 '16 at 17:01
• Oh! Now I follow you! If the sides consist of 3,4,5 then the hypotenuse is indeed a rational number. I can't thank you all enough for helping me here, it would have taken me ages to figure it out by myself. – Michael Lee Jun 1 '16 at 23:59

take two integer numbers $m>n>0$, than: $$a=m^2-n^2 \qquad b=2mn \qquad c=m^2+n^2$$ are integer such that $a^2+b^2=c^2$ (easy to prove). These are called Pythagorean triples.