The projection of a point onto a line represents one of the fundamental concepts in analytic geometry. Given a point \(P(x_0, y_0)\) and a line \(r: ax + by + c = 0\), the orthogonal projection of \(P\) onto \(r\) is that point \(H\) on the line which achieves the minimum Euclidean distance from \(P\). Geometrically, \(H\) is the foot of the perpendicular dropped from \(P\) to the line \(r\).
Table of Contents
- Definition
- Proof of the point–line distance in the plane
- Normal vector and perpendicular line
- Coordinates of the foot of the perpendicular
- Alternative Method: Vector Projection
- Exercises on Point-Line Distance
Definition
Definition. The orthogonal projection of the point \(P(x_0, y_0)\) onto the line \(r: ax + by + c = 0\) is the unique point \(H \in r\) such that the vector \(\overrightarrow{PH}\) is parallel to the normal vector \(\vec{n} = (a, b)\).
This characterization is equivalent to requiring that \(H\) minimizes the Euclidean distance \(|PQ|\) for all points \(Q \in r\).
Proof of the point–line distance in the plane
Let \( P(x_0, y_0) \) be a point and \( r: ax + by + c = 0 \) be a line. We want to calculate the distance between the point and the line, that is:
\[ d(P, r) = \frac{|ax_0 + by_0 + c|}{\sqrt{a^2 + b^2}} \]
Normal vector and perpendicular line
The line \( r \) has normal vector \( \vec{n} = (a, b) \). Consider the line perpendicular to \( r \) that passes through the point \( P(x_0, y_0) \). Its parametric equations are:
\[ \begin{cases} x = x_0 + at \\ y = y_0 + bt \end{cases} \]
Now, we impose that the point on the perpendicular line belongs to \( r \). Substituting into its equation:
\[ a(x_0 + at) + b(y_0 + bt) + c = 0 \]
\[ ax_0 + a^2t + by_0 + b^2t + c = 0 \Rightarrow (a^2 + b^2)t + (ax_0 + by_0 + c) = 0 \]
\[ t = -\frac{ax_0 + by_0 + c}{a^2 + b^2} \]
Coordinates of the foot of the perpendicular
Substituting \( t \) into the parametric equations, we obtain the coordinates of point \( H \):
\[ x_H = x_0 - a \cdot \frac{ax_0 + by_0 + c}{a^2 + b^2} \quad y_H = y_0 - b \cdot \frac{ax_0 + by_0 + c}{a^2 + b^2} \]
The distance between \( P \) and \( H \) is given by:
\[ d = \sqrt{(x_0 - x_H)^2 + (y_0 - y_H)^2} \]
We observe that:
\[ x_0 - x_H = \frac{a(ax_0 + by_0 + c)}{a^2 + b^2}, \quad y_0 - y_H = \frac{b(ax_0 + by_0 + c)}{a^2 + b^2} \]
Therefore:
\[ d = \sqrt{ \left( \frac{a(ax_0 + by_0 + c)}{a^2 + b^2} \right)^2 + \left( \frac{b(ax_0 + by_0 + c)}{a^2 + b^2} \right)^2 } \]
\[ = \frac{|ax_0 + by_0 + c|}{a^2 + b^2} \cdot \sqrt{a^2 + b^2} = \frac{|ax_0 + by_0 + c|}{\sqrt{a^2 + b^2}} \]
We have proven the formula for the distance between a point and a line:
\[ d(P, r) = \frac{|ax_0 + by_0 + c|}{\sqrt{a^2 + b^2}} \]
Alternative Method: Vector Projection
Consider a point \( P(x_0, y_0) \) and a line \( r: ax + by + c = 0 \). Let \( Q(x_1, y_1) \) be any point on the line (for example, obtained by solving \( r \) with respect to \( y \)). The vector connecting \( P \) and \( Q \) is:
\[ \vec{PQ} = (x_1 - x_0, y_1 - y_0) \]
Let \( \vec{n} = (a, b) \) be the normal vector to the line. The distance between point \( P \) and line \( r \) is given by the absolute value of the projection of vector \( \vec{PQ} \) onto the unit normal vector:
\[ d = \left| \frac{\vec{PQ} \cdot \vec{n}}{\|\vec{n}\|} \right| \]
We develop the dot product:
\[ \vec{PQ} \cdot \vec{n} = a(x_1 - x_0) + b(y_1 - y_0) = ax_1 + by_1 - ax_0 - by_0 \]
Since \( Q \in r \), then \( ax_1 + by_1 + c = 0 \), that is \( ax_1 + by_1 = -c \). We obtain:
\[ \vec{PQ} \cdot \vec{n} = -c - ax_0 - by_0 = -(ax_0 + by_0 + c) \]
Finally:
\[ d = \frac{|ax_0 + by_0 + c|}{\sqrt{a^2 + b^2}} \]
which coincides with the formula obtained geometrically.
Exercises on Point-Line Distance
Distance formula
For a line in general form \(ax + by + c = 0\) and a point \(P(x_0, y_0)\), the distance is:
\[d = \frac{|ax_0 + by_0 + c|}{\sqrt{a^2 + b^2}}\]
Exercise 1. Calculate the distance from point \(P(3, -2)\) to line \(r: 4x - 3y + 1 = 0\).
Solution. Given data:
- Point: \(P(3, -2)\), so \(x_0 = 3\) and \(y_0 = -2\)
- Line: \(4x - 3y + 1 = 0\), so \(a = 4\), \(b = -3\), \(c = 1\)
Applying the formula:
\[d = \frac{|4 \cdot 3 + (-3) \cdot (-2) + 1|}{\sqrt{4^2 + (-3)^2}}\]
\[d = \frac{|12 + 6 + 1|}{\sqrt{16 + 9}}\]
\[d = \frac{|19|}{\sqrt{25}}\]
\[d = \frac{19}{5}\]
Exercise 2. Determine the distance from point \(A(-1, 5)\) to line \(s: 2x + y - 7 = 0\).
Solution: Given data:
- Point: \(A(-1, 5)\), so \(x_0 = -1\) and \(y_0 = 5\)
- Line: \(2x + y - 7 = 0\), so \(a = 2\), \(b = 1\), \(c = -7\)
Applying the formula:
\[d = \frac{|2 \cdot (-1) + 1 \cdot 5 + (-7)|}{\sqrt{2^2 + 1^2}}\]
\[d = \frac{|-2 + 5 - 7|}{\sqrt{4 + 1}}\]
\[d = \frac{|-4|}{\sqrt{5}}\]
\[d = \frac{4}{\sqrt{5}} = \frac{4\sqrt{5}}{5}\]
Exercise 3. Find the distance from point \(B(0, 4)\) to line \(t: x - 2y + 3 = 0\).
Solution: Given data:
- Point: \(B(0, 4)\), so \(x_0 = 0\) and \(y_0 = 4\)
- Line: \(x - 2y + 3 = 0\), so \(a = 1\), \(b = -2\), \(c = 3\)
Applying the formula:
\[d = \frac{|1 \cdot 0 + (-2) \cdot 4 + 3|}{\sqrt{1^2 + (-2)^2}}\]
\[d = \frac{|0 - 8 + 3|}{\sqrt{1 + 4}}\]
\[d = \frac{|-5|}{\sqrt{5}}\]
\[d = \frac{5}{\sqrt{5}} = \frac{5\sqrt{5}}{5} = \sqrt{5}\]
Exercise 4. Calculate the distance from point \(C(2, -3)\) to line \(u: 3x + 4y - 12 = 0\).
Solution: Given data:
- Point: \(C(2, -3)\), so \(x_0 = 2\) and \(y_0 = -3\)
- Line: \(3x + 4y - 12 = 0\), so \(a = 3\), \(b = 4\), \(c = -12\)
Applying the formula:
\[d = \frac{|3 \cdot 2 + 4 \cdot (-3) + (-12)|}{\sqrt{3^2 + 4^2}}\]
\[d = \frac{|6 - 12 - 12|}{\sqrt{9 + 16}}\]
\[d = \frac{|-18|}{\sqrt{25}}\]
\[d = \frac{18}{5}\]
Exercise 5. Determine the distance from point \(D(-4, 1)\) to line \(v: 5x - 12y + 8 = 0\).
Solution: Given data:
- Point: \(D(-4, 1)\), so \(x_0 = -4\) and \(y_0 = 1\)
- Line: \(5x - 12y + 8 = 0\), so \(a = 5\), \(b = -12\), \(c = 8\)
Applying the formula:
\[d = \frac{|5 \cdot (-4) + (-12) \cdot 1 + 8|}{\sqrt{5^2 + (-12)^2}}\]
\[d = \frac{|-20 - 12 + 8|}{\sqrt{25 + 144}}\]
\[d = \frac{|-24|}{\sqrt{169}}\]
\[d = \frac{24}{13}\]