← 返回资讯屏轩教育 · 行业资讯

Shortest Distance from a Point to a Line | 点到直线的最短距离求解

2026-08-30 14:59 · 本文部分内容由AI辅助创作

📚 Shortest Distance from a Point to a Line | 点到直线的最短距离求解

In coordinate geometry, one of the most useful and frequently tested skills is finding the shortest distance from a given point to a given straight line. The shortest distance is always measured along the perpendicular segment from the point to the line.

在坐标几何中,最常用且考试中频繁出现的一个技能就是求给定点到给定直线的最短距离。最短距离总是沿着从点到直线的垂线段来度量。


1. What Does "Shortest Distance" Mean? | 什么是最短距离?

For a fixed point P and a straight line L, there are infinitely many line segments connecting P to different points on L. The shortest among all these segments is the perpendicular distance from P to L. This is because the perpendicular is the shortest path in Euclidean geometry, and the triangle inequality confirms that any other segment forms a right triangle with the perpendicular as one leg.

对于固定点 P 和一条直线 L,连接 P 与 L 上不同点的线段有无数条。所有这些线段中最短的那条就是 P 到 L 的垂线距离。这是因为在欧几里得几何中垂线段最短,并且三角不等式也确认了任何其他线段都会与垂线段构成直角三角形,其中垂线段是直角边。

If the point lies exactly on the line, the distance is zero. The concept applies in both two-dimensional and three-dimensional coordinate systems, but the formulas differ.

如果点恰好落在直线上,则距离为零。该概念既适用于二维坐标系,也适用于三维坐标系,但公式有所不同。


2. Distance Formula in Two Dimensions | 二维平面中的距离公式

Ax + By + C = 0 and a point P(x₀, y₀), the perpendicular distance d from P to the line is:

给定直线的一般式 Ax + By + C = 0 和点 P(x₀, y₀),点 P 到该直线的垂线距离 d 为:

d = |Ax₀ + By₀ + C| / √A² + B²

This formula is derived by projecting the position vector of P onto the normal vector of the line. The numerator is the absolute value of the line equation evaluated at P, and the denominator is the magnitude of the normal vector (A, B).

该公式是通过将 P 的位置向量投影到直线的法向量上而推导出来的。分子是直线方程在 P 处的取值绝对值,分母是法向量 (A, B) 的模长。

Example: Find the distance from the point P(3, -2) to the line 4x - 3y + 5 = 0.

例如:求点 P(3, -2) 到直线 4x - 3y + 5 = 0 的距离。

d = |4×3 - 3×(-2) + 5| / √(4² + (-3)²) = |12 + 6 + 5| / √25 = 23 / 5 = 4.6

Thus the shortest distance is 4.6 units.

因此最短距离为 4.6 个单位。


3. Derivation Using the Normal Vector | 利用法向量推导

Let the line L: Ax + By + C = 0 have a normal vector n se a fixed point Q(x₁, y₁) on the line. For any point P(x₀, y₀), the vector from Q to P is v - x₁, y₀ - y₁). The distance from P to L is the absolute value of the scalar projection of v onto n.

设直线 L: Ax + By + C = 0 的法向量为 n = (A, B)。在直线上取一个固定点 Q(x₁, y₁)。对于任意点 P(x₀, y₀),从 Q 到 P 的向量为 v = (x₀ - x₁, y₀ - y₁)。P 到 L 的距离等于 v 在 n 上的标量投影的绝对值。

d = |v · n| / |n| = |A(x₀ - x₁) + B(y₀ - y₁)| / √A² + B²

By₁ + C = 0, so A(x₀ - x₁) + B(y₀ - y₁) = Ax₀ + By₀ + C. This gives the standard formula.

因为 Q 在直线上,所以 Ax₁ + By₁ + C = 0,因此 A(x₀ - x₁) + B(y₀ - y₁) = Ax₀ + By₀ + C。这样就得到了标准公式。


4. Distance to a Vertical or Horizontal Line | 到竖直或水平直线的距离

asier to handle directly. For a vertical line x = a, the distance from P(x₀, y₀) is simply |x₀ - a|. For a horizontal line y = b, the distance is |y₀ - b|.

特殊情况可以直接处理。对于竖直直线 x = a,点 P(x₀, y₀) 到它的距离就是 |x₀ - a|。对于水平直线 y = b,距离就是 |y₀ - b|。

r that the general formula also works if you write the vertical line as 1·x + 0·y - a = 0.

这些情况经常出现在涉及矩形或坐标轴平行直线的坐标几何问题中。请记住,如果将竖直直线写成 1·x + 0·y - a = 0,那么一般公式同样适用。


5. Vector Method for a Line in Parametric Form | 参数方程形式下直线的向量方法

If a line is given in vector form r = a + tu, where a is a position vector of a point on the line and u is a direction vector, the distance from P to the line can be found using the cross product (in 3D) or by projection in 2D.

如果直线以向量形式给出 r = a + tu,其中 a 是直线上某点的位置向量,u 是方向向量,则 P 到直线的距离可以用叉积(三维)或投影(二维)来求。

In 2D, let w = P - a. The perpendicular distance is the length of the component of w perpendicular to u:

在二维中,设 w = P - a。垂线距离就是 w 中垂直于 u 的分量的长度:

d = |wₓ uᵧ - wᵧ uₓ| / √uₓ² + uᵧ²

In 3D, the distance is given by d = |w × u| / |u|. This vector method is particularly useful when the line equation is not in general form.

在三维中,距离由 d = |w × u| / |u| 给出。当直线方程不是一般式时,这种向量方法特别有用。


6. Distance Between Parallel Lines | 平行线之间的距离

est distance between two parallel lines Ax + By + C₁ = 0 and Ax + By + C₂ = 0 is given by:

两条平行直线 Ax + By + C₁ = 0 和 Ax + By + C₂ = 0 之间的最短距离为:

d = |C₁ - C₂| / √A² + B²

This is equivalent to choosing any point on one line and computing its distance to the other line. Since the lines are parallel, the perpendicular distance is constant everywhere.

这等价于在其中一条直线上任取一点,然后计算它到另一条直线的距离。因为两条直线平行,所以垂线距离处处相等。

Example: Lines 2x + 2y - 3 = 0 and 2x + 2y + 5 = 0 have distance d = |-3 - 5| / √4 + 4 = 8 / (2√2) = 2√2.

例如:直线 2x + 2y - 3 = 0 和 2x + 2y + 5 = 0 的距离 d = |-3 - 5| / √4 + 4 = 8 / (2√2) = 2√2。


7. Distance from a Point to a Line in 3D | 三维空间中点到直线的距离

In three-dimensional space, a line is commonly given by a point A with position vector a and a direction vector u. For a point P with position vector p, the shortest distance from P to the line is:

在三维空间中,直线通常由一个位置向量 a 的点 A 和一个方向向量 u 给出。对于位置向量为 p 的点 P,P 到该直线的最短距离为:

d = |(p - a) × u| / |u|

The cross product magnitude represents the area of the parallelogram formed by p - a and u. Dividing by |u| gives the height, which is exactly the perpendicular distance.

叉积的模长表示由 p - a 和 u 构成的平行四边形的面积。除以 |u| 得到高,即垂线距离。

This formula is essential in IB Mathematics Analysis and Approaches HL for vector geometry questions.

该公式在 IB 数学分析与方法 HL 的向量几何问题中至关重要。


广告 / Sponsored

8. Worked Example | 完整例题

Find the distance from point P(1, 2, -1) to the line passing through A(0, 1, 2) with direction u = (2, -1, 2).

求点 P(1, 2, -1) 到过点 A(0, 1, 2) 且方向向量为 u = (2, -1, 2) 的直线的距离。

First compute w = p - a = (1, 1, -3).

首先计算 w = p - a = (1, 1, -3)。

w × u 2) = (1×2 - (-3)(-1), (-3)×2 - 1×2, 1×(-1) - 1×2) = (2 - 3, -6 - 2, -1 - 2) = (-1, -8, -3)

Then |w × u| = √((-1)² + (-8)² + (-3)²) = √1 + 64 + 9 = √74. Also |u| = √4 + 1 + 4 = √9 = 3.

于是 |w × u| = √((-1)² + (-8)² + (-3)²) = √1 + 64 + 9 = √74。又 |u| = √4 + 1 + 4 = √9 = 3。

d = √74 / 3

Therefore the shortest distance is √74 / 3 units.

因此最短距离为 √74 / 3 个单位。


9. Common Mistakes to Avoid | 常见错误警示


10. Applications in IB Exam Questions | IB 考试中的应用

This distance concept appears in many IB exam problems, such as:

该距离概念出现在许多 IB 考试题目中,例如:


11. Table of Key Formulas | 关键公式汇总

Scenario Formula
Line Ax + By + C = 0, point (x₀, y₀) d = |Ax₀ + By₀ + C| / √A² + B²
Vertical line x = a d = |x₀ - a|
Horizontal line y = b d = |y₀ - b|
Parallel lines Ax + By + C₁ = 0 and Ax + By + C₂ = 0 d = |C₁ - C₂| / √A² + B²
3D line with direction u through point A, point P d = |(p - a) × u| / |u|
情境 公式
直线 Ax + By + C = 0,点 (x₀, y₀) d = |Ax₀ + By₀ + C| / √A² + B²
竖直直线 x = a d = |x₀ - a|
水平直线 y = b d = |y₀ - b|
平行直线 Ax + By + C₁ = 0 和 Ax + By + C₂ = 0 d = |C₁ - C₂| / √A² + B²
三维直线,方向向量 u,过点 A,点 P d = |(p - a) × u| / |u|

12. Conclusion and Study Tips | 总结与学习建议

Mastering the point-to-line distance formula saves time and reduces errors in coordinate geometry. Practice converting line equations into general form, and always verify whether the problem is in 2D or 3D before choosing a formula.

掌握点到直线距离公式可以在坐标几何中节省时间并减少错误。练习将直线方程转换为一般式,并在选择公式之前始终确认问题是在二维还是三维中。

For IB students, a helpful habit is to re-derive the formula quickly using the normal vector concept. This not only strengthens understanding but also serves as a memory check during exams. Remember that distance is always perpendicular, and the absolute value ensures a positive result.

对于 IB 学生来说,一个有用的习惯是利用法向量概念快速重新推导该公式。这不仅能加深理解,还能在考试中作为记忆检查。记住距离永远是垂直的,绝对值确保结果为正。

Published by TutorHao | Mathematics Revision Series | aleveler.com

广告 / Sponsored
官网正版 国际课程数学核心词汇 唯寻国际教育 全英 学科 GCSE A Level IB MYP IB IBDP 美高…
数学 备考教辅 · 正版现货 · 与本文内容相关
查看详情 / View on Taobao参考价 ¥19.7

更多咨询请联系16621398022(同微信)

备考资讯每日更新,关注不错过
考纲变化 · 科目分析 · 学习方法
扫码关注公众号 tutorhao
在微信里长按二维码识别关注
或截图后用「扫一扫 → 相册」选择本图
公众号:tutorhao