The distance between two points and the midpoint of a segment in space
Take a box with edges a, b and c. The diagonal of its base has length √(a² + b²) by Pythagoras. That diagonal and the vertical edge c form a right angle, so the space diagonal has length √(a² + b² + c²). For the box in the picture, √(4 + 9 + 36) = 7. Any two points A(x₁, y₁, z₁) and B(x₂, y₂, z₂) are opposite corners of such a box whose edges are the differences of the coordinates, so AB = √((x₂ − x₁)² + (y₂ − y₁)² + (z₂ − z₁)²). The order of the points does not matter because the differences are squared. The midpoint M of AB is found by averaging each coordinate: M = ((x₁ + x₂)/2, (y₁ + y₂)/2, (z₁ + z₂)/2). If M and one end are known, the other end is 2M − A (double M’s coordinates, then subtract A’s). To show a triangle is right-angled, square the three sides and test the Pythagoras relation: the largest square must equal the sum of the other two.
Real boxes. Measure the length, width and height of a book or a cupboard in cm. Calculate its space diagonal with the formula, then check with a string stretched from one corner to the opposite corner.