Maths Formulae Analytical Geometry Equation of Line Joining Two Points A,B

Line Joining Two Points – Equation and Slope

Find the equation of a line joining two given points A and B using slope formula and point-slope form.
🔑

Definition

An equation of a line joining two points, A and B, in three-dimensional space defines the unique straight path that passes through both of those points. Unlike a 2D line defined by a slope, a 3D line is determined by a starting point (e.g., point A) and a direction vector. This direction vector is found by calculating the vector from point A to point B.

SymbolDescription
\[ \vec{r} \]Position vector representing any point (x, y, z) on the line.
\[ \vec{a} \]Position vector of the first known point on the line, A(x₁, y₁, z₁).
\[ \vec{b} \]Position vector of the second known point on the line, B(x₂, y₂, z₂).
\[ \vec{B} - \vec{A} \]The direction vector of the line, found by subtracting the position vectors of the two points.
\[ t \]A scalar parameter that varies to generate all points along the line.
\[ (x_1, y_1, z_1) \]Coordinates of the first point, A.
\[ (x_2, y_2, z_2) \]Coordinates of the second point, B.
\[ (l, m, n) \]Direction ratios, which are the components of the direction vector (e.g., l = x₂ - x₁, m = y₂ - y₁, n = z₂ - z₁).
📐

Key Formulas

\[ \vec{r} = \vec{a} + t(\vec{b} - \vec{a}) \]
Vector Equation
\[ \frac{x - x_1}{x_2 - x_1} = \frac{y - y_1}{y_2 - y_1} = \frac{z - z_1}{z_2 - z_1} \]
Symmetric (or Cartesian) Equation
\[ \begin{cases} x = x_1 + t(x_2 - x_1) \\ y = y_1 + t(y_2 - y_1) \\ z = z_1 + t(z_2 - z_1) \end{cases} \]
Parametric Equations
🖼️

Diagram

x y A(x₁,y₁) B(x₂,y₂) x₂−x₁ y₂−y₁ (y−y₁)/(y₂−y₁) = (x−x₁)/(x₂−x₁)
Line through two points A(x₁,y₁) and B(x₂,y₂). Slope m=(y₂−y₁)/(x₂−x₁); equation (y−y₁)/(y₂−y₁)=(x−x₁)/(x₂−x₁).

A 3D Cartesian coordinate system with x, y, and z axes. Two distinct points are shown: A with coordinates (x₁, y₁, z₁) and B with coordinates (x₂, y₂, z₂). A straight line passes through both A and B, extending infinitely. The vector originating at A and terminating at B, denoted as AB, serves as the direction vector for the line.

Properties

Uniqueness: Exactly one straight line can pass through any two distinct points in 3D space.

Direction: The direction of the line is explicitly defined by the vector connecting the two points, \[ \vec{d} = \vec{B} - \vec{A} \]. The line extends infinitely in both this direction and its opposite.

Parametric Nature: Any point on the line can be reached by starting at point A and moving a certain amount (determined by the parameter t) along the direction vector \[ \vec{AB} \]. Different values of t correspond to different points on the line (t=0 gives point A, t=1 gives point B).

Collinearity: Any third point C lies on the line defined by A and B if and only if the vector \[ \vec{AC} \] is a scalar multiple of the vector \[ \vec{AB} \].

🔍

Proof of the Vector Equation

To derive the vector equation of a line passing through two points A and B, we use the principles of vector addition and scalar multiplication.

\[ \text{Let A and B be two points with position vectors } \vec{a} \text{ and } \vec{b} \text{ respectively.} \]

Let P be any arbitrary point on the line passing through A and B, with position vector \[ \vec{r} \].

The vector from A to B defines the direction of the line. This direction vector is:

\[ \vec{AB} = \vec{b} - \vec{a} \]

Since point P lies on the same line, the vector from A to P must be parallel to the vector from A to B. This means that \[ \vec{AP} \] is a scalar multiple of \[ \vec{AB} \].

\[ \vec{AP} = t \, \vec{AB} \quad \text{for some scalar } t \]

We can express \[ \vec{AP} \] in terms of the position vectors \[ \vec{r} \] and \[ \vec{a} \]:

\[ \vec{AP} = \vec{r} - \vec{a} \]

Substituting this into the parallelism condition:

\[ \vec{r} - \vec{a} = t (\vec{b} - \vec{a}) \]

Finally, solving for \[ \vec{r} \] gives the standard vector equation of the line:

\[ \vec{r} = \vec{a} + t(\vec{b} - \vec{a}) \]
🧮

Worked Example

Find the vector and symmetric equations of the line passing through the points A(2, -1, 4) and B(5, 1, 0).
  1. First, determine the direction vector of the line by subtracting the coordinates of point A from point B: \[ \vec{d} = \vec{B} - \vec{A} = (5-2, 1-(-1), 0-4) = (3, 2, -4) \]
  2. Use point A as the position vector \( \vec{a} = (2, -1, 4) \) and the calculated direction vector to write the vector equation: \[ \vec{r} = \vec{a} + t\vec{d} \] \[ \vec{r} = (2, -1, 4) + t(3, 2, -4) \]
  3. For the symmetric equation, use the coordinates of point A (x₁, y₁, z₁) and the components of the direction vector (l, m, n): \[ \frac{x - x_1}{l} = \frac{y - y_1}{m} = \frac{z - z_1}{n} \] \[ \frac{x - 2}{3} = \frac{y - (-1)}{2} = \frac{z - 4}{-4} \]
The vector equation is \[ \vec{r} = (2, -1, 4) + t(3, 2, -4) \] and the symmetric equation is \[ \frac{x - 2}{3} = \frac{y + 1}{2} = \frac{z - 4}{-4} \].
🧮

Try It

🚀

Applications

✈️ Aviation & Navigation

Aircraft flight paths, missile trajectories, and satellite orbits use 3D line equations to calculate optimal routes between two points and ensure collision avoidance in three-dimensional space.

🎮 Computer Graphics & Gaming

Ray tracing algorithms cast lines from a viewpoint to objects to render realistic lighting and shadows. Collision detection systems model projectiles or lines-of-sight as lines between two points to determine intersections.

🏗️ Engineering & Architecture

The placement of structural elements like beams, columns, and tension cables is defined by the line connecting their two endpoints. This is crucial for creating accurate blueprints and performing structural analysis.

🔬 Physics & Robotics

The trajectory of a particle moving with constant velocity is a straight line between its initial and final positions. Robot arm movements are often planned as a series of linear segments connecting key waypoints.

🌍

Real-World Examples

A surveyor maps a straight underground pipe. The entrance is at point A(10, 50, -2) meters and the exit is at point B(130, 10, -12) meters relative to a survey marker. Find the symmetric equation of the line representing the pipe.
  1. Calculate the direction vector from A to B: \[ \vec{d} = (130-10, 10-50, -12-(-2)) = (120, -40, -10) \]
  2. Use the coordinates of the entrance point A(10, 50, -2) and the direction vector to form the symmetric equation: \[ \frac{x - 10}{120} = \frac{y - 50}{-40} = \frac{z - (-2)}{-10} \]
The equation for the pipe's path is \[ \frac{x - 10}{120} = \frac{y - 50}{-40} = \frac{z + 2}{-10} \].
In a 3D animation, a laser pulse is fired from a spaceship at (5, 8, 20) towards a target asteroid at (35, 23, 5). What is the vector equation of the laser beam's path?
  1. Identify the starting point vector: \[ \vec{a} = (5, 8, 20) \]
  2. Calculate the direction vector from the ship to the asteroid: \[ \vec{d} = (35-5, 23-8, 5-20) = (30, 15, -15) \]
  3. Combine them into the vector equation form \[ \vec{r} = \vec{a} + t\vec{d} \].
The vector equation of the laser beam is \[ \vec{r} = (5, 8, 20) + t(30, 15, -15) \].
🏙️

Real-World Scenarios

🚗 grade % road gradient survey
Road Gradient Survey
Civil engineers determine road gradient from two surveyed elevation points A(x₁,y₁) and B(x₂,y₂). The line equation gives slope m=(y₂−y₁)/(x₂−x₁), used to verify grade compliance for drainage, truck speed limits, and accessibility ramps.
Jan Dec stock trend forecast
Linear Stock Trend
Analysts draw a trend line through two price data points to forecast stock direction. The two-point line equation (y−y₁)/(y₂−y₁)=(x−x₁)/(x₂−x₁) extrapolates the trend to future dates for momentum-based trading signals.
A B ≤1:12 wheelchair ramp slope
Wheelchair Ramp Design
ADA regulations require ramp slope ≤1:12 (rise:run). Architects use the two-point line equation through the bottom and top ramp endpoints to compute the slope, ensuring compliance before construction.

Architecture and Construction. The center line of a steel beam in a building frame is defined by the coordinates of its two ends. Architects and engineers use this line equation to ensure it connects correctly with other structural elements and to calculate stresses and loads.

Robotics. A pick-and-place robot arm is programmed to move a component from a starting bin to a final assembly point. The most efficient initial path is a straight line, and its equation is calculated from the 3D coordinates of the start and end points to guide the motors.

Telecommunications. A microwave signal is transmitted in a straight line between a tower on a hill and a receiving dish on a building. The line-of-sight path is determined by the GPS coordinates of the two antennas, and this equation is used to check for obstructions like other buildings or terrain.

📋

Forms of the Line Equation

A line passing through two points can be represented in several equivalent forms, each useful for different purposes.

FormEquationDescription
Vector Form\[ \vec{r} = \vec{a} + t(\vec{b} - \vec{a}) \]Compactly expresses the line using a starting point and a direction vector. Ideal for theoretical and computational work.
Parametric Form\[ x = x_1 + t(x_2-x_1) \] \[ y = y_1 + t(y_2-y_1) \] \[ z = z_1 + t(z_2-z_1) \]Expresses each coordinate (x, y, z) as a separate function of the parameter 't'. Useful for plotting points and analyzing motion over time.
Symmetric (Cartesian) Form\[ \frac{x-x_1}{x_2-x_1} = \frac{y-y_1}{y_2-y_1} = \frac{z-z_1}{z_2-z_1} \]Eliminates the parameter 't', relating the x, y, and z coordinates directly. Defines the line as the intersection of planes.
⚠️

Common Mistakes

💡 Forgetting to Subtract Vectors for Direction: A frequent error is using one of the points (e.g., \(\vec{b}\)) as the direction vector instead of the difference (\(\vec{b} - \vec{a}\)). Always remember the direction is the path *from* one point *to* the other.
💡 Incorrect Order of Subtraction: When writing the symmetric form, ensure the point coordinates (x₁, y₁, z₁) are consistent with the point \(\vec{a}\) used in the vector form. Mismatching the point and the numerator (e.g., using \(\vec{b}\)'s coordinates in the numerator with a direction vector based on \(\vec{a}\)) will define a different, parallel line.
⚠️ Division by Zero in Symmetric Form: If any component of the direction vector is zero (e.g., x₂ - x₁ = 0), the symmetric form is not written with a zero in the denominator. If x₂ - x₁ = 0, it means x is constant, so you write that part as a separate equation: \( x = x_1 \), and the rest as a standard ratio, e.g., \( \frac{y-y_1}{y_2-y_1} = \frac{z-z_1}{z_2-z_1} \).
🚀

Study Strategy

1 🧠 Build Your Foundation
  • Review the definition of a straight line and why two distinct points are sufficient to define it.
  • Understand the concept of 'gradient' (slope) as the ratio of vertical change to horizontal change between points A and B.
  • Study the provided diagram to visually connect the points A(x₁, y₁), B(x₂, y₂), and a general point P(x, y) on the line.
  • Grasp the concept of collinearity and how it forms the basis for the two-point formula.
2 📝 Lock in the Formulas
  • Memorise the primary two-point form: (y - y₁) / (x - x₁) = (y₂ - y₁) / (x₂ - x₁).
  • Learn the vector equation form **r** = **a** + t(**b** - **a**), identifying **a** and **b** as position vectors.
  • Practise deriving the point-slope form (y - y₁) = m(x - x₁) by first calculating the slope m.
  • Understand how to rearrange the formula into the slope-intercept (y = mx + c) and general (Ax + By + C = 0) forms.
3 ✍️ Reinforce Through Practice
  • Follow the 'Worked Example' step-by-step, then solve it again independently without looking at the solution.
  • Practice with varied coordinates, including positive, negative, zero, and fractional values for A and B.
  • Work through the 'Common Mistakes' by creating specific problems that test for errors like mixing up (x₁, y₁) and (x₂, y₂).
  • Solve problems involving special cases, such as finding the equation for horizontal (y₁ = y₂) and vertical (x₁ = x₂) lines.
4 🌍 Apply to Real-World Scenarios
  • Analyze the 'Real-World Examples', like calculating a linear depreciation path between two value points over time.
  • Create a simple predictive model: given two data points (e.g., temperature at two different times), find the line equation.
  • Use the formula to model a flight path or a straight road on a map between two city coordinates.
  • Explore applications in computer graphics, where this formula is used to render a straight line between two pixels.
By systematically moving from core concepts to practical application, you can confidently master the equation of a line between any two points.

Frequently Asked Questions

×

×