Foot of Perpendicular: Step-by-Step Guide
In this article
Finding the foot of the perpendicular is a core geometry problem: given a point and a line, you locate the exact point on the line that is closest to the given point. This is useful in coordinate geometry, physics (reflection), computer graphics, and distance calculations. You'll need basic algebra and, for some methods, a simple formula. Below are clear steps for both 2D and 3D cases.
What You'll Need
- Coordinates of the point (e.g., (x₁, y₁) in 2D, (x₁, y₁, z₁) in 3D)
- Equation of the line (either slope-intercept, general form, or parametric)
- Paper and pencil, or a calculator for arithmetic
- Basic knowledge of slopes and dot products
Step-by-Step
There are two common scenarios: a line in 2D (given by an equation) and a line in 3D (given parametrically). We'll cover both.
Case 1: Line in 2D (Cartesian Equation)
Assume the line is given by ax + by + c = 0 and the point is P(x₁, y₁).
- Identify the coefficients. Write the line in the form ax + by + c = 0. For example, if the line is y = 2x + 3, rewrite as 2x - y + 3 = 0 so a=2, b=-1, c=3.
- Use the foot formula. The foot of the perpendicular (x₀, y₀) is given by:
x₀ = x₁ - a*(a*x₁ + b*y₁ + c) / (a² + b²)
y₀ = y₁ - b*(a*x₁ + b*y₁ + c) / (a² + b²) - Calculate the numerator term. Compute a*x₁ + b*y₁ + c. This is the signed distance (unnormalized) from the point to the line.
- Compute the denominator. Calculate a² + b².
- Plug into the formula. Subtract the fraction from the point's coordinates. The result is the foot of the perpendicular.
- Verify. Check that the foot lies on the line by substituting (x₀, y₀) into the line equation; it should equal 0 (or very close).
Case 2: Line in 3D (Parametric Form)
Assume the line is given by a point A(a₁, a₂, a₃) and a direction vector d = (d₁, d₂, d₃). The point is P(p₁, p₂, p₃).
- Write the parametric equation. The line is L(t) = A + t*d, where t is a scalar parameter.
- Define the vector from A to P. Compute AP = P - A = (p₁-a₁, p₂-a₂, p₃-a₃).
- Compute the projection scalar. The parameter t for the foot is given by:
t = (AP · d) / (d · d)
where · is the dot product. - Calculate dot products. Compute AP · d = (p₁-a₁)*d₁ + (p₂-a₂)*d₂ + (p₃-a₃)*d₃ and d · d = d₁² + d₂² + d₃².
- Find t. Divide the first dot product by the second.
- Substitute t back. The foot is F = A + t*d. Compute each coordinate: F₁ = a₁ + t*d₁, F₂ = a₂ + t*d₂, F₃ = a₃ + t*d₃.
- Verify. The vector from the foot to the point (P - F) should be perpendicular to the direction vector d; their dot product should be 0.
Common Mistakes
- Using the wrong form of the line. For the 2D formula, the line must be in standard form ax + by + c = 0. If you have slope-intercept, convert first.
- Forgetting to square the coefficients. In the denominator, it's a² + b², not (a+b)².
- Sign errors in the 2D formula. The formula subtracts the fraction from the point's coordinates. A common mistake is adding instead of subtracting.
- Mixing up the direction vector. In 3D, ensure the direction vector is correct, not a point on the line.
- Not simplifying the dot product. In 3D, forgetting to multiply each component and sum them leads to wrong t.
- Assuming the foot is always between two points. The foot is the closest point on the infinite line, not necessarily on a segment.
Tips
- Check perpendicularity. After finding the foot, verify that the line connecting the point to the foot is perpendicular to the original line. In 2D, the slopes should be negative reciprocals (if the line is not vertical).
- Use the distance formula as a sanity check. The distance from the point to the foot should equal the perpendicular distance from the point to the line.
- For vertical or horizontal lines. If the line is vertical (x = k), the foot is (k, y₁). If horizontal (y = k), the foot is (x₁, k). This is a quick shortcut.
- In 3D, if the direction vector has a zero component, the projection formula still works; just be careful with arithmetic.
- Round only at the end. Keep fractions or decimals throughout to avoid rounding errors.
Troubleshooting
If the foot doesn't lie on the line: Recheck your arithmetic. Substitute the foot into the line equation; you should get 0. If not, you likely made a sign error or used the wrong coefficients.
If the dot product in 3D is not zero after verification: Double-check the direction vector and the point A. Also ensure you computed the vector AP correctly (P - A, not A - P).
If you get a division by zero: In 2D, if a² + b² = 0, the line equation is invalid (both a and b cannot be zero). In 3D, if d · d = 0, the direction vector is the zero vector, meaning the line is not defined.
If the numbers are messy: Use fractions instead of decimals. For example, keep 1/3 instead of 0.333. This reduces rounding errors.
If the line is given in a different form (e.g., two points): Convert to the required form first. For 2D, find the equation from two points. For 3D, derive the direction vector from the two points and use one as point A.
Frequently Asked Questions
What is the foot of the perpendicular?
It is the point on a given line that is closest to a given point. The line segment from the given point to that foot is perpendicular to the original line.
How do I find the foot if the line is given by two points?
In 2D, first find the equation of the line through the two points, then use the standard formula. In 3D, use one point as A and the vector between them as the direction vector, then apply the projection method.
Can the foot be outside the segment between two points?
Yes, if the line is infinite. The foot is the closest point on the entire line, not necessarily on the segment. If you need the closest point on a segment, you must check if the foot lies within the segment; if not, the closest endpoint is the answer.
What is the difference between foot of perpendicular and projection?
They are essentially the same. The foot of the perpendicular is the geometric point, while projection often refers to the scalar or vector projection. The foot is the result of projecting the point onto the line.
How does this relate to distance from a point to a line?
The distance is the length of the perpendicular segment from the point to the foot. Once you have the foot, you can use the distance formula between the two points to find the distance.
Can I use this method for a line in 3D given by two planes?
Yes, but you first need to convert the line to parametric form. Find a point on the line (solving the plane equations) and a direction vector (cross product of the plane normals), then apply the 3D method.