I was in secondary school in Nigeria in the 60s during the transitioning from colony to independence to republic. At school we were given this formula that is now burnt into my synapses because our teacher was an Indian guy and he said the length of the hypotenuse of a right angled triangle can be found by solving the following equation

$$\sqrt{a^2 + b^2 + 2ab}$$

Reason we all remember: imagine an Indian accent repeating over and over again from year two or three till we graduated "square of the first, square of the second and twice their product" and if you forget a sharp rap across the knuckles with a 3 foot ruler (both helped as the accent was totally strange to us)

Now I come across a Pythagoras theorem question and the hypotenuse is solved by

$$\sqrt{a^2 + b^2}$$

When did the formula/proof change or were we given dud info from the very beginning? Surely not? Exams were passed using this proof and these exams were internationally validated.

No excuses but this was what triggered my panic: python program

I solved the equation (5, 12) to be 17 but this program solved it to 13 so I assumed I was wrong.

$$\sqrt{5^2 + 12^2 + 2(60)}$$

resolves to $$\sqrt{25 + 144 + 120} = \sqrt{289} = 17$$

but $$\sqrt{5^2 + 12^2}$$ resolves to $$\sqrt{25 + 144}$$ resolves to $$\sqrt{169}$$ is 13 hence my confusion.

Surely they should resolve the same?

Now I am even more baffled. Please help! What am I doing wrong?

  • 3
    $\begingroup$ The first formula is not the Pythagorean Theorem, I think you are mixing up your formulas. $\endgroup$ – lulu Dec 1 '18 at 13:31
  • 4
    $\begingroup$ I'm so very sorry to hear that you were miseducated by one of my compatriots. $\endgroup$ – user856 Dec 1 '18 at 13:33
  • 1
    $\begingroup$ No. For positive $a,b$ as here $\sqrt {a^2+2ab+b^2}=a+b$. If $a,b$ are two sides of a triangle, the only way $a+b$ could equal the third is if the "triangle" is a line segment. $\endgroup$ – lulu Dec 1 '18 at 14:29
  • 1
    $\begingroup$ $a^2 + b^2 + 2ab$ is the formula for $(a + b)^2$. Maybe that's what you're remembering. $\endgroup$ – littleO Dec 1 '18 at 20:47
  • 2
    $\begingroup$ perhaps confusion between the Pythagorean theorem and the law of cosines? $\endgroup$ – John Joy Dec 1 '18 at 21:34

You've confused two things. Pythagoras' Theorem is, and always has been, that for a right-angled triangle with hypotenuse $c$ and shorter sides $a$ and $b$, we have $c^2 = a^2 + b^2$.

The thing that you're remembering is the binomial expansion of $(a+b)^2$, which is, indeed, $a^2 + b^2 + 2ab$.

  • $\begingroup$ should they not resolve to the same answer? I know its a stupid question but I am confused. $\endgroup$ – seanbw Dec 1 '18 at 14:20
  • $\begingroup$ No. They are two entirely different things, with no connection to one another, and there's no reason whatsoever for them to be the same in any way. $\endgroup$ – user3482749 Dec 1 '18 at 17:09
  • $\begingroup$ Actually, thinking more on it, they're both special cases of the cosine law: if our angle in the cosine law is a right angle, then its cosine is $0$, so we have $c^2 = a^2 + b^2 -2ab(0) = a^2 + b^2$. If it's two right angles, however, its cosine is $-1$, so we have $c^2 = a^2 + b^2 -2ab(-1) = a^2 + b^2 + 2ab$. $\endgroup$ – user3482749 Dec 1 '18 at 17:11

If $a$ and $b$ are numbers, then $a^2+b^2+2a\times b$ is just $(a+b)^2$ and therefore (assuming that $a+b\geqslant0$), $\sqrt{a^2+b^2+2a\times b}$ is simply $a+b$.

  • $\begingroup$ indeed 5+12=17 but i am missing something . $\endgroup$ – seanbw Dec 1 '18 at 14:23

I believe your main confusion comes from the misconception that $(a+b)^2 = a^2 + b^2$. This is false because we know that $(a+b)^2 = a^2 + 2ab + b^2 \ne a^2+b^2$. So they would not produce the same answer. In general, the general length of a triangle's hypotenuse is, and will always be, $c = \sqrt{a^2+b^2}$


Your calculation is correct.

Take the clock as an example of a device where the angle between two sides changes. The min/hr hands of a clock are $(m,h)$ long, let us say.

At 3 O' Clock or 9 O' Clock Pythagoras operates and tips of hands are $ \sqrt{m^2+h^2}$ apart as its invisible hypotenuse lencorrectgth.

At 6 O' Clock the Cosine Rule operates and tips of hands are

$$ \sqrt{m^2+h^2 -2 m h \cos \pi} =(m+h)$$

distance apart, the invisible third side; they are on either side of the clock's center.

At 12 O' Clock Cosine Rule operates and tips of hands are

$$ \sqrt{m^2+h^2 -2 m h \cos 0^{\circ}} =(m-h)$$

apart, the invisible third side; they are on same side of the clock's center. These extreme distances are no more referred to as hypotenuses.

The Pythagorean theorem is a special case of Cosine Rule.

Sorry to note your teacher taught you so counter-productively.. to the extent of even leaving a painful lasting memory that did help resolve a simple confusion.


Since $(a +b)^2 = a^2 + 2ab + b^2$ then $\sqrt{a^2 + b^2 + 2ab} =\sqrt{(a+b)^2} = |a+b|$ and if $a, b$ are positive:

Solving $\sqrt{a^2 + b^2 + 2ab}$ is just a really hard way of adding $a+b$.

The only reason I can think of is that your teacher was trying to drum a bad habit out of you. It's very natural to think that $f(a + b) = f(a) + f(b)$. BUT IT IS !!!!!!!WRONG!!!!!!. So a student may think $(a + b)^2 = a^2 + b^2$. BUT IT IS !!!!!!!WRONG!!!!!! And therefore that $\sqrt{a^2 + b^2} = \sqrt a^2 + \sqrt b^2 = a + b$ BUT IT IS !!!!!!!WRONG!!!!!!.

So I think your teacher was trying to teach that $\sqrt{a^2 + b^2 + 2ab} = |a+b|$.

This has NOTHING to do the pythagorean theorem.

The pythogorean theorem is, and ALWAYS has been that if you have a right triangle with two shorter sides of length $a$ and $b$ then the third side, the hypotenuse, is of length $c = \sqrt{a^2 + b^2}$ WHICH MUST ABOSULUTELY NOT EVER BE CONFUSED WITH $\sqrt{(a + b)^2} = \sqrt{a^2 + b^2 + 2ab} = a + b\ne \sqrt{a^2 + b^2}$. Indeed if $a > 0; b> 0$ then $\sqrt{a^2 + b^2} < \sqrt{a^2 + b^2 + 2ab} = a+b$. It is strictly less than!

So maybe that is what your teacher was pounding in: "Hypotenuse = $\sqrt{a^2 + b^2}$ does NOT equal $\sqrt{a^2 + b^2 + 2ab}$".

Notice that for ANY triangle if two sides are $a$ and $b$ then the third side must be LESS than $a+b$. SO even if the triangle is not a right triangle you will ALWAYS have $c < a + b =\sqrt{a^2 + b^2 + 2ab}$


But I'm afraid your teacher was not aware of psychology. The louder you tell people that something is not. The more the will hear and remember it as it is. (This is why Trump got elected president of the US. He's so absolutely awful and unqualified everyone had to somehow think there was something qualified underneath there somewhere. There wasn't.)

I'm afraid you will just have to relearn the pythagorean thereom over again. What you have been doing will ALWAYS fail.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.