Find the point that divides a line segment in a given ratio. Supports both internal and external division.
Last updated: April 2026 | By Patchworkr Team
A directed line segment is a line segment with a specific direction, going from one point (A) to another point (B). When a point P divides this segment in a given ratio m:n, it can be either internally (between A and B) or externally (beyond B or before A). These concepts are fundamental in coordinate geometry and are used to find dividing points on line segments.
Internal Division: Point P lies between A and B, dividing the segment so that AP:PB = m:n. The formulas are: Px = (m·x₂ + n·x₁)/(m + n) and Py = (m·y₂ + n·y₁)/(m + n). This is commonly used for finding medians, centroids, and other geometric properties.
External Division: Point P lies outside the segment (beyond B), dividing the line externally so that AP:PB = m:n with P outside AB. The formulas change to: Px = (m·x₂ - n·x₁)/(m - n). External division appears in harmonic sequences and certain geometric constructions.
Write down coordinates for A(x₁, y₁) and B(x₂, y₂), plus the ratio m:n. Decide: is P between A and B (internal) or beyond (external)?
Why: Correctly identifying the division type and input values is essential; wrong type means wrong formula, and wrong coordinates give completely incorrect results.
For internal: P = (m·B + n·A)/(m+n). For external: P = (m·B - n·A)/(m-n). The key difference is addition vs. subtraction, and m ≠ n constraint for external.
Why: These formulas derive from weighted averages (internal) or harmonic divisions (external). Using the wrong formula gives geometrically impossible results.
Apply the appropriate formula for P_x: (m·x₂ + n·x₁)/(m+n) or (m·x₂ - n·x₁)/(m-n). Do the arithmetic carefully, respecting order of operations.
Why: Coordinate calculations must be precise; even small arithmetic errors cascade through verification and create geometrically inconsistent points.
Apply the same formula structure to P_y using y-values: (m·y₂ + n·y₁)/(m+n) or (m·y₂ - n·y₁)/(m-n). Maintain the same division type throughout.
Why: X and Y must follow the same mathematical principle (both internal or both external); mixing formulas produces invalid coordinates that violate the ratio constraint.
Calculate distances AP and PB using √((x₂-x₁)² + (y₂-y₁)²). Confirm AP:PB equals m:n (or approximately equal, accounting for rounding).
Why: Verification catches arithmetic mistakes and formula errors before results are used. Matching ratios confirm the point truly divides the segment as required.
Finding an Internally Divided Point: Road Segment Division
Internal: P lies between A and B. External: P lies outside, beyond B or before A. The formulas are different (addition vs. subtraction).
A special case where m = n = 1. Midpoint = ((x₁ + x₂)/2, (y₁ + y₂)/2). It's the average of coordinates.
Yes! Ratios like 1:2, 2.5:3.5, or 1:√2 are all valid. The calculator handles decimal and fractional ratios.
The formula becomes undefined (division by zero). External division requires m ≠ n. This configuration is called harmonic division.
Finding centers of mass, dividing inheritance property, graphics interpolation, and engineering layouts all use section formulas.
Only if the ratio is 0:n or m:0 respectively, which represents a degenerate case. Typically, m and n are both positive.
The section formula is equivalent to: P = (n·A + m·B) / (m + n) using position vectors. It's a weighted vector average.
The same formulas apply! Just add a third coordinate: P_z = (m·z₂ + n·z₁) / (m + n). All 3D section formulas follow the same pattern.
Related Tools
Calculate centroid.
Calculate cross-sectional area.
Calculate cylindrical coordinates.
Calculate direction vector.
Calculate distance between points.
Calculate point-to-plane distance.