The pythagroean theorem breaks down in elliptical geometry. This is why it is a theorem and not a law.