📚 Lines in 2D and 3D: From Coordinates to Vectors | 二维与三维空间中的直线:从坐标到向量
Lines are the simplest geometric objects, yet they form the backbone of coordinate geometry and vector algebra. In the IB Mathematics curriculum, mastering lines in both two and three dimensions means you can describe paths, model linear relationships, and solve intersection problems with confidence. This article walks you through the essential equations, properties, and problem-solving techniques for lines in 2D and 3D – all with a focus on clarity and examination readiness.
直线是最简单的几何对象,却是坐标几何和向量代数的基础。在 IB 数学课程中,掌握二维和三维空间中的直线意味着能够自信地描述路径、建立线性关系模型并解决交点问题。本文带你梳理直线在二维和三维平面的核心方程、性质与解题技巧,所有内容以清晰易懂、紧贴考试需求为目标。
1. Slope and Inclination | 斜率与倾斜角
The steepness of a line in the plane is measured by its slope (m), defined as the change in y over the change in x between any two distinct points. For a line passing through (x₁, y₁) and (x₂, y₂), m = (y₂ − y₁)/(x₂ − x₁). The angle θ that the line makes with the positive x‑axis is related by m = tan θ, where 0° ≤ θ < 180° and θ ≠ 90° for a defined slope. A horizontal line has slope 0, while a vertical line has an undefined slope.
平面内直线的倾斜程度用斜率(m)衡量,定义为两点之间纵坐标变化量与横坐标变化量之比。对于经过 (x₁, y₁) 与 (x₂, y₂) 的直线,m = (y₂ − y₁)/(x₂ − x₁)。直线与 x 轴正方向所成的角 θ 满足 m = tan θ,其中 0° ≤ θ < 180° 且当斜率存在时 θ ≠ 90°。水平线斜率为 0,竖直线斜率不存在。
Knowing the slope allows you to quickly determine the direction of a line. A positive slope means the line rises from left to right; a negative slope means it falls. The greater the absolute value of m, the steeper the line. In IB exam questions, you often need to find the slope from an equation or from a given angle of inclination, so keep the tangent relationship in mind.
掌握斜率即可快速判断直线方向。斜率为正,表示从左到右上升;斜率为负,表示下降。|m| 越大,直线越陡。在 IB 考试中,常常需要由方程或给定的倾斜角求斜率,因此牢记 tan 的关系十分关键。
2. Standard Forms of the Equation in 2D | 二维直线方程的标准形式
In two dimensions, you will encounter three main forms of the equation of a line. The slope‑intercept form is y = mx + c, where m is the slope and c is the y‑intercept. The point‑slope form is y − y₁ = m(x − x₁), ideal for writing the equation when you know a point and the slope. The general form is Ax + By + C = 0, where A, B, and C are integers and A is typically non‑negative. Each form has its own advantages: slope‑intercept for quick graphing, point‑slope for writing equations, and general form for certain distance formulas.
在二维空间中,直线方程主要有三种形式。斜截式 y = mx + c,其中 m 为斜率,c 为 y 轴截距。点斜式 y − y₁ = m(x − x₁) 适合在已知一点和斜率时写出方程。一般式 Ax + By + C = 0,其中 A、B、C 为整数,通常要求 A ≥ 0。每种形式各有优势:斜截式便于快速作图,点斜式方便列方程,一般式常用于距离公式。
You should be comfortable converting between these forms. For instance, to change y = ⅔x − 4 into general form, multiply by 3 and rearrange: 2x − 3y − 12 = 0. Conversely, from 3x + 4y − 8 = 0 you can isolate y to get y = −¾x + 2. Such algebraic fluency is tested directly in IB Paper 1 and 2.
你需要能熟练地在这些形式间进行转换。例如将 y = ⅔x − 4 化为一般式,两边乘 3 并移项得 2x − 3y − 12 = 0。反过来,由 3x + 4y − 8 = 0 可解出 y = −¾x + 2。这类代数熟练度在 IB 试卷一和试卷二中直接考查。
3. Finding Intercepts and Drawing Lines | 求截距与画直线
The x‑intercept is found by setting y = 0 in the equation; the y‑intercept by setting x = 0. For the line 2x − 3y = 6, setting y = 0 gives x = 3, so the x‑intercept is (3,0). Setting x = 0 gives −3y = 6 → y = −2, so the y‑intercept is (0,−2). Joining these two points gives a quick sketch. If the line passes through the origin, both intercepts are zero.
x 轴截距可将方程中 y 设为 0 求得;y 轴截距则将 x 设为 0。对于直线 2x − 3y = 6,令 y = 0 得 x = 3,故 x 截距为 (3,0);令 x = 0 得 −3y = 6 → y = −2,y 截距为 (0,−2)。连接这两点即可快速画出草图。若直线经过原点,则两个截距均为零。
When the equation is given in general form, the intercepts are at (−C/A, 0) and (0, −C/B), provided A and B are non‑zero. This is a handy shortcut for sketching. Many IB questions ask you to sketch a line, shade a region, or find the area of a triangle formed by a line and the axes, so practice identifying intercepts rapidly.
当方程以一般式给出时,截距分别为 (−C/A, 0) 和 (0, −C/B),前提是 A、B 均不为零。这是一个实用的绘制草图的小窍门。许多 IB 题目要求你画出直线、标示区域,或求直线与坐标轴围成三角形的面积,因此需熟练快速求截距。
4. Parallel and Perpendicular Lines | 平行线与垂直线
Two lines in a plane are parallel if they have the same slope: m₁ = m₂. They are perpendicular if the product of their slopes is −1: m₁ × m₂ = −1, provided neither line is vertical. For example, a line with slope 2 is perpendicular to a line with slope −½. This condition is essential for constructing altitudes, medians, and solving coordinate geometry problems about right angles.
平面上两直线平行,当且仅当斜率相等:m₁ = m₂。两直线互相垂直,当且仅当斜率乘积为 −1:m₁ × m₂ = −1,且均不为竖直线。例如斜率为 2 的直线与斜率为 −½ 的直线垂直。这一条件在构造高、中线以及解决直角坐标几何问题时不可或缺。
When equations are given in general form Ax + By + C = 0, a parallel line will share the same A and B coefficients (up to a scalar multiple), while a perpendicular line can be obtained by swapping A and B and changing one sign: Bx − Ay + D = 0. This trick saves time and avoids calculation errors.
当方程以一般式 Ax + By + C = 0 给出时,平行线的 A 和 B 系数成比例,而垂直线可通过交换 A、B 并改变其中一个符号得到:Bx − Ay + D = 0。这个技巧可以节省时间并避免计算错误。
5. Distance from a Point to a Line | 点到直线的距离
The perpendicular distance from a point P(x₀, y₀) to a line Ax + By + C = 0 is given by the formula: d = |Ax₀ + By₀ + C| / √(A² + B²). This formula works for any line in general form and is a must‑memorise for IB. For example, the distance from (1,2) to the line 3x − 4y + 5 = 0 is |3·1 − 4·2 + 5|/√(9+16) = |3−8+5|/5 = 0, which means the point lies on the line.
点 P(x₀, y₀) 到直线 Ax + By + C = 0 的垂直距离公式为:d = |Ax₀ + By₀ + C| / √(A² + B²)。此公式适用于所有以一般式给出的直线,是 IB 必记公式。例如点 (1,2) 到直线 3x − 4y + 5 = 0 的距离为 |3·1 − 4·2 + 5|/√(9+16) = |3−8+5|/5 = 0,说明点在直线上。
In typical exam questions, you might be asked to find the distance between parallel lines. Convert both lines to general form so that A and B match, then use the formula with any point from one line to the other. Or use the shortcut: distance = |C₁ − C₂| / √(A² + B²) after making the coefficients of x and y identical.
常见考题可能要求计算平行线间的距离。可先将两直线化为一般式并使 A、B 一致,然后用一条直线上的任意点代入公式计算。也可以在使 x、y 系数相同后直接使用公式:距离 = |C₁ − C₂| / √(A² + B²)。
6. Introduction to Lines in 3D: Vector and Parametric Forms | 三维直线入门:向量式与参数式
In three dimensions, a line cannot be expressed by a single equation; instead, we use a vector parametric form. A line is defined by a point A (with position vector a) and a direction vector d. Any point R on the line has position vector r = a + λ d, where λ is a real parameter. For example, a line passing through (1, 0, 2) with direction (3, −1, 4) is given by r = (1, 0, 2) + λ (3, −1, 4).
在三维空间中,一条直线无法用单一方程表达;我们改用向量参数式。已知直线上一点 A(位置向量为 a)和一个方向向量 d,则直线上任意点 R 的位置向量为 r = a + λ d,其中 λ 为实数参数。例如过点 (1, 0, 2) 且方向向量为 (3, −1, 4) 的直线可写为 r = (1, 0, 2) + λ (3, −1, 4)。
From the vector form, we extract the parametric equations: x = x₀ + λd₁, y = y₀ + λd₂, z = z₀ + λd₃. These three equations are the key to solving intersection problems and finding distances in 3D. You can also write the Cartesian equations by eliminating λ, provided all direction components are non‑zero: (x − x₀)/d₁ = (y − y₀)/d₂ = (z − z₀)/d₃.
由向量式可以写出参数方程:x = x₀ + λd₁, y = y₀ + λd₂, z = z₀ + λd₃。这三组方程是求解三维交点问题与距离的关键。在方向分量均不为零时,还可消去 λ 得到对称式(笛卡尔式):(x − x₀)/d₁ = (y − y₀)/d₂ = (z − z₀)/d₃。
7. Direction Vectors and Line Segments | 方向向量与线段
A direction vector d describes the orientation of a line; any scalar multiple of d corresponds to the same line. The magnitude of d is not unique – only its direction matters. When you are asked to find the equation of a line through two points A and B, use the vector AB = b − a as the direction vector. For example, through A(2, −1, 5) and B(4, 3, 1), take d = (4−2, 3−(−1), 1−5) = (2, 4, −4) or a simplified version (1, 2, −2).
方向向量 d 描述了直线的走向;d 的任何非零标量倍数都代表同一条直线。d 的长度并不唯一——只有它的方向才起作用。当题目要求写出过两点 A 和 B 的直线方程时,可用向量 AB = b − a 作为方向向量。例如过 A(2, −1, 5) 和 B(4, 3, 1) 的直线,取 d = (4−2, 3−(−1), 1−5) = (2, 4, −4),也可简化为 (1, 2, −2)。
To find the midpoint of a segment in 3D, average the coordinates: M = ((x₁+x₂)/2, (y₁+y₂)/2, (z₁+z₂)/2). The length of segment AB is |AB| = √((x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²). These formulas extend naturally from 2D and are frequently tested together with line equations.
求三维线段中点,只需将坐标取平均值:M = ((x₁+x₂)/2, (y₁+y₂)/2, (z₁+z₂)/2)。线段 AB 的长度为 |AB| = √((x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²)。这些公式由二维直接推广而来,常与直线方程联合考查。
8. Angle Between Two Lines in 3D | 两直线在三维空间中的夹角
The angle between two lines is defined as the acute angle between their direction vectors. Given direction vectors d₁ and d₂, the cosine of the angle θ is given by the dot product formula: cos θ = |d₁·d₂| / (|d₁||d₂|). The absolute value ensures the acute angle is taken, since lines have no inherent orientation – an angle of 150° is reported as 30°.
两直线的夹角定义为它们方向向量之间的锐角。设方向向量为 d₁ 和 d₂,则夹角 θ 的余弦由点积公式给出:cos θ = |d₁·d₂| / (|d₁||d₂|)。取绝对值是为了保证得到锐角,因为直线没有固定的方向——150° 的夹角会被记为 30°。
For example, find the angle between lines with direction vectors (1, 2, 2) and (2, 3, 6). Dot product = 1×2 + 2×3 + 2×6 = 20. Magnitudes: |d₁| = √(1+4+4) = 3, |d₂| = √(4+9+36) = 7. So cos θ = 20/(3×7) = 20/21, giving θ ≈ 18.2°. This method is identical in 2D where direction vectors are (1, m) or any convenient representation.
例如,求方向向量为 (1, 2, 2) 与 (2, 3, 6) 的两直线夹角。点积 = 1×2 + 2×3 + 2×6 = 20。模长:|d₁| = √(1+4+4) = 3, |d₂| = √(4+9+36) = 7。于是 cos θ = 20/(3×7) = 20/21,θ ≈ 18.2°。在二维中,方向向量可以用 (1, m) 等便捷形式代替,方法完全相同。
9. Intersection of Two Lines in 3D and Skew Lines | 三维中两直线的交点与异面直线
To find the intersection of two lines in 3D, set their parametric equations equal and solve for the parameters. For L₁: r = a + λ d and L₂: r = b + μ e, you need a + λ d = b + μ e. Solve the three component equations simultaneously. If a unique solution for λ and μ exists, the lines intersect at a point. If no solution exists, the lines either are parallel (d ∥ e) or are skew (not parallel and not intersecting). Skew lines are a purely 3D phenomenon – in a plane, non‑parallel lines always intersect.
求三维中两直线的交点时,令其参数方程相等并解出参数。设 L₁: r = a + λ d,L₂: r = b + μ e,需要满足 a + λ d = b + μ e。同时求解三个分量方程。若存在唯一的 λ 和 μ 解,则直线相交于一点。若无解,则两直线或平行(d ∥ e),或为异面直线(不平行且不相交)。异面直线仅在三维中出现——在平面内,不平行的直线总会相交。
When solving, use two equations to find λ and μ, then verify with the third. Inconsistent values indicate skew lines. For instance, L₁: x=1+λ, y=2−λ, z=3+2λ; L₂: x=4+μ, y=1+2μ, z=2−μ. Equating x and y: 1+λ=4+μ ⇒ λ−μ=3, and 2−λ=1+2μ ⇒ −λ−2μ=−1 ⇒ λ+2μ=1. Solving gives λ=5, μ=2; checking z: 3+2·5=13 vs 2−2=0, not equal → lines are skew.
解题时,可先联立两个方程求出 λ 和 μ,再代入第三个方程验证。若数值矛盾,则为异面直线。例如 L₁: x=1+λ, y=2−λ, z=3+2λ;L₂: x=4+μ, y=1+2μ, z=2−μ。由 x 和 y 得 λ−μ=3,−λ−2μ=−1 即 λ+2μ=1,解得 λ=5, μ=2;代入 z:3+10=13 ≠ 2−2=0,故直线异面。
10. Distance from a Point to a Line in 3D | 三维空间中点到直线的距离
The distance from a point P to a line L: r = a + λ d is found using the cross product. The formula is d = |(p − a) × d| / |d|, where p is the position vector of P, and a is a point on the line. This gives the perpendicular distance, which is the shortest distance between the point and the line. Alternatively, you can minimise the square of the distance function, but the cross product method is far more efficient.
点 P 到直线 L: r = a + λ d 的距离用叉积求解。公式为 d = |(p − a) × d| / |d|,其中 p 为点 P 的位置向量,a 是直线上一点。该公式给出垂直距离,即点到直线的最短距离。另一种方法是最小化距离平方的函数,但叉积法效率远胜于此。
For example, find the distance from P(1, 2, 3) to the line through A(0, 0, 2) with direction (1, 1, 0). Then p − a = (1, 2, 1). Compute cross product: (1, 2, 1) × (1, 1, 0) = |i j k; 1 2 1; 1 1 0| = i(2·0−1·1) − j(1·0−1·1) + k(1·1−2·1) = (−1, 1, −1). Magnitude = √3. |d| = √2. So distance = √3/√2 = √(3/2) ≈ 1.225. This method is a gold standard for IB vector geometry problems.
例如,求点 P(1, 2, 3) 到过 A(0, 0, 2) 且方向为 (1, 1, 0) 的直线的距离。p − a = (1, 2, 1)。计算叉积:(1, 2, 1) × (1, 1, 0) = |i j k; 1 2 1; 1 1 0| = i(0−1) − j(0−1) + k(1−2) = (−1, 1, −1)。模长为 √3。|d| = √2。故距离 = √3/√2 = √(3/2) ≈ 1.225。该方法是 IB 向量几何问题中的黄金解法。
11. Common Applications and IB Exam Tips | 常见应用与 IB 应试技巧
Line problems in IB often appear in contexts such as finding the reflection of a point across a line, determining the foot of the perpendicular, or calculating the shortest distance between two skew lines. For the distance between two skew lines with equations r = a + λ d and r = b + μ e, use the formula d = |(b − a)·(d × e)| / |d × e|, provided the lines are not parallel. This is a classic result that rewards careful vector setup.
在 IB 考试中,直线问题常结合点关于直线的反射、求垂足,或计算两异面直线间的最短距离。对于两异面直线 r = a + λ d 和 r = b + μ e,若它们不平行,距离公式为 d = |(b − a)·(d × e)| / |d × e|。这是一个经典的结论,要求仔细建立向量。
In the exam, always check your parameter solutions. When asked about intersection of a line and a plane, you will substitute the parametric line into the plane equation, a closely related skill. Keep a clear distinction between 2D slope concepts and 3D vector concepts. Finally, draw a simple diagram whenever possible to visualise the geometry – it greatly reduces errors in sign and orientation.
考试中务必验证参数解。当遇到直线与平面交点的问题时,需将直线的参数方程代入平面方程,这是一项密切相关的技能。要清楚区分二维斜率概念和三维向量概念。最后,只要可能就画一个简图来帮助理解几何关系——这能大幅减少符号和方向上的错误。
12. Summary of Key Formulas | 核心公式总结
Below is a concise reference table for the major formulas discussed. Keep this handy for quick revision before the exam.
下面是一个简洁的核心公式参考表,供考前快速复习。
| Concept / 概念 | Formula (Unicode) / 公式 |
|---|---|
| Slope from two points (2D) | m = (y₂ − y₁)/(x₂ − x₁) |
| Point‑slope form | y − y₁ = m(x − x₁) |
| General form to slope | m = −A/B (when B ≠ 0) |
| Perpendicular slopes | m₁ · m₂ = −1 |
| Distance point to line (2D) | d = |Ax₀ + By₀ + C| / √(A² + B²) |
| Vector form (3D) | r = a + λ d |
| Angle between lines | cos θ = |d₁·d₂| / (|d₁||d₂|) |
| Distance point to line (3D) | d = |(p − a) × d| / |d| |
| Distance between skew lines | d = |(b − a)·(d × e)| / |d × e| |
Mastering these formulas, along with the conceptual understanding of how lines behave in 2D and 3D, puts you in a strong position for IB examinations. Practise with past papers, and remember: lines are everywhere – from the trajectory of a ball to the edges of a crystalline structure. Happy studying!
掌握这些公式,同时理解直线在二维和三维中的几何行为,将使你在 IB 考试中占据优势。多练习历年真题,并且记住:直线无处不在——从球的运动轨迹到晶体结构的棱边。祝学习愉快!
Published by TutorHao | IB Mathematics Revision Series | aleveler.com
Find IB Maths Textbooks on eBay UK
New, used and second-hand copies of textbooks and revision guides are often much cheaper than retail — check current listings and prices before you buy.
更多咨询请联系16621398022(同微信)
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导