For two points P(x₁, y₁) and Q(x₂, y₂) in a 2D plane, the Euclidean distance (d) is calculated using the Pythagorean theorem:
d = √((x₂ - x₁)² + (y₂ - y₁)² )
For points in 3D space P(x₁, y₁, z₁) and Q(x₂, y₂, z₂), the formula extends to:
d = √((x₂ - x₁)² + (y₂ - y₁)² + (z₂ - z₁)² )