Report

Help us improve this tool

Ratios of Directed Line Segments Calculator

Find internal and external division points on a directed line segment using ratio m:n with step-by-step section formula calculations.

O M T

Partitioning a Directed Line Segment: The Section Formula

In coordinate geometry, a directed line segment starts at an initial point $A(x_1, y_1)$ and ends at a terminal point $B(x_2, y_2)$. The section formula determines the exact coordinates of a point $P(x, y)$ that divides this directed segment into two parts whose lengths are in a specified ratio $m : n$.

Whether dividing a structural truss into proportional load segments, calculating computer graphics vector interpolations, or finding centers of mass, the section formula provides an exact closed-form algebraic solution for 2D and 3D spaces.

Internal Division Section Formula

When point $P$ lies on the line segment between $A$ and $B$, it divides $AB$ internally in the ratio $m : n = AP : PB$. The coordinates of $P$ are given by:

$$x = \frac{m x_2 + n x_1}{m + n}, \quad y = \frac{m y_2 + n y_1}{m + n}$$

Notice that the ratio part $m$ multiplying the second endpoint $B$ reflects the directed nature of the segment: the further along $A \to B$ the point lies, the larger $m$ is compared to $n$. When $m = n = 1$, the formula reduces directly to the familiar midpoint formula:

$$x_{\text{mid}} = \frac{x_1 + x_2}{2}, \quad y_{\text{mid}} = \frac{y_1 + y_2}{2}$$

External Division Section Formula

When point $P$ lies on the ray extended beyond segment $AB$, it divides $AB$ externally in the ratio $m : n$, where $m = AP$ and $n = BP$ with $m \neq n$. The external coordinates are computed as:

$$x = \frac{m x_2 - n x_1}{m - n}, \quad y = \frac{m y_2 - n y_1}{m - n}$$

If $m > n$, point $P$ lies beyond $B$. If $m < n$, point $P$ lies beyond $A$. If $m = n$, the denominator becomes zero ($m - n = 0$), meaning the division point is at infinity along the line.

Worked Example: Dividing in Ratio 2 : 1

Consider endpoint $A(1, 2)$ and endpoint $B(7, 8)$ divided internally in ratio $2 : 1$:

  • $x_1 = 1, y_1 = 2$
  • $x_2 = 7, y_2 = 8$
  • $m = 2, n = 1, m + n = 3$
  • $x = \frac{2(7) + 1(1)}{3} = \frac{14 + 1}{3} = \frac{15}{3} = 5$
  • $y = \frac{2(8) + 1(2)}{3} = \frac{16 + 2}{3} = \frac{18}{3} = 6$

The dividing point is $P(5, 6)$. The length of segment $AP = \sqrt{(5-1)^2 + (6-2)^2} = \sqrt{16 + 16} = \sqrt{32} \approx 5.6569$, and $PB = \sqrt{(7-5)^2 + (8-6)^2} = \sqrt{4 + 4} = \sqrt{8} \approx 2.8284$. Notice that $AP / PB = \sqrt{32}/\sqrt{8} = 2$, perfectly matching the 2 : 1 partition ratio. For proportional ratios across three numbers or values, explore our Ratio of 3 Numbers Calculator and Ratio Calculator.

Frequently Asked Questions

What is a directed line segment?

A directed line segment is a straight line segment with a designated initial point $A$ and terminal point $B$, giving it direction ($A \to B$). Partition ratios $m : n$ measure the distance from the initial point $A$ to partition point $P$ versus from $P$ to terminal point $B$.

What is the difference between internal and external division?

Internal division places the partition point $P$ directly on the segment between endpoints $A$ and $B$. External division places point $P$ on the extended collinear line outside the boundary of $AB$, such that the ratio of distances $AP / BP = m / n$.

Why does external division fail when m = n?

When $m = n$, the ratio $m/n = 1$, which would imply $AP = BP$. On a straight line, the only point equidistant from $A$ and $B$ is the internal midpoint. Outside the segment, no finite point can be equally distant from two distinct collinear endpoints, causing division by zero ($m - n = 0$).

How can I divide a line segment into three equal parts (trisection)?

To find the two trisection points of segment $AB$, evaluate internal division twice: first with ratio $1 : 2$ to find the point one-third of the way from $A$, and then with ratio $2 : 1$ to find the point two-thirds of the way from $A$.