Where was the Pythagorean theorem derived from?

The Pythagorean theorem was derived from ancient Babylonian and Egyptian mathematics. It was later developed by the Greek philosopher and mathematician Pythagoras in the 6th century BC.