Distance or Pythagorean theorem