In 3D geometry, three mutually perpendicular axes (X, Y, and Z) divide space into eight regions called octants. A point is represented by coordinates (x, y, z).
The distance between two points P(x₁, y₁, z₁) and Q(x₂, y₂, z₂) is given by:
The coordinates of the point R which divides the line segment joining points P(x₁, y₁, z₁) and Q(x₂, y₂, z₂) internally in the ratio m:n are:
If m = n (ratio 1:1), the midpoint coordinates are simply: ((x₁+x₂)/2, (y₁+y₂)/2, (z₁+z₂)/2).