the distance from a point to a plane
How far is a fly from the tabletop? Not along some slanting path, but straight down — the shortest possible gap. The distance from a point to a plane is exactly that shortest distance, measured along the perpendicular dropped from the point to the plane. Any other route from the point to the plane is longer, so this perpendicular distance is the one that deserves the name 'the distance'.
The clean way to get it uses the plane's normal vector. Write the plane as Ax + By + Cz = D, so its normal is n = (A, B, C). For a point P_0 = (x_0, y_0, z_0), the distance is dist = |A x_0 + B y_0 + C z_0 - D| / sqrt(A^2 + B^2 + C^2). Why does this work? Pick any point Q on the plane; the distance from P_0 to the plane is the length of the projection of the vector QP_0 onto the unit normal n-hat. That projection is (QP_0 . n) / |n|, and writing it out in coordinates collapses to the formula above. The numerator is just 'plug the point into the plane equation and see how far off zero you are'; the denominator normalises the normal to unit length; the absolute value discards the sign (which side you are on) to leave a non-negative distance.
This formula is a daily tool: clearance checks in engineering, finding the closest point on a plane, and the building block for distances to lines and between skew lines. A common slip is forgetting to divide by the length of the normal — if (A, B, C) is not a unit vector (it usually is not), skipping sqrt(A^2 + B^2 + C^2) gives a wrong, scale-dependent answer. Another is dropping the absolute value: distance is never negative, though the signed version (without the bars) is itself useful when you care which side of the plane the point lies on.
Distance from P_0(1, 2, 3) to the plane 2x - y + 2z = 5: numerator |2(1) - 2 + 2(3) - 5| = |2 - 2 + 6 - 5| = |1| = 1; denominator sqrt(2^2 + (-1)^2 + 2^2) = sqrt(9) = 3. So the distance is 1/3. The origin to the same plane: |0 - 0 + 0 - 5|/3 = 5/3.
Plug the point into the equation, then divide by the normal's length.
Always divide by sqrt(A^2 + B^2 + C^2) — that denominator is what makes the answer a true perpendicular distance rather than a number that changes if you scale the plane equation. The numerator alone is not the distance.