The Pythagorean rule seems to have been used for practical construction problems by the Babylonians and the Egyptians from around 1800 BC (see previous post), yet we find no sources stating the theorem in full.
This changed around 800-600 BC, when Baudhayana in India stated the theorem explicitly. We read:
'If a rope is stretched along the diagonal’s length, the resulting area will be equal to the sum total of the area of horizontal and vertical sides taken together.'
Baudhayana had discovered the theorem for practical purposes. At the time, Indians began to construct religious altars in various geometric shapes. When trying to construct an altar with the same area as two smaller ones, he found the pythagorean theorem (remember the image from highschool with the triangle and the three squares attached to each side).
This type of investigation also gave him the value of the square root of 2 as 1 + 1/3 + 4x1/3 - 1/34x1/4x1/3, which is correct to five decimals! (For the mathematicians who read this, Baudhayana didnt give a proof, but the sequence suggests he used a clever geometric demonstration, which can be found with a simple google search).
Baudhayana also attempted to make a circular altar with (approximately) the same area as one of his square altars. For this he needed an rough approximate value of pi.
"The Great World History Book"