Your Equation

Library / Geometry, coordinates, surveying and trigonometry / GEO-26

Geometry, coordinates, surveying and trigonometry

Point dividing a segment internally

The x-coordinate of the point P on the segment from A to B for which AP : PB = m : n.

Ref
GEO-26
Rev
v1
Field
Geometry, coordinates, surveying and trigonometry
Result
Px [cm]

The point P that divides the segment from A to B in the ratio AP : PB = m : n has coordinates ((n x₁ + m x₂)/(m + n), (n y₁ + m y₂)/(m + n)). The weight on B equals the first number of the ratio. For m = n it gives the midpoint. The x-coordinate is shown; the y-coordinate, from the y-values, is in the derived rows.

The x-coordinate of the point P on the segment from A to B for which AP : PB = m : n. The weight on B is the first part of the ratio. For the y-coordinate use y1 and y2.

Calculator

Solve for
cm
cm
−1010
cm
−1010
cm
−1020
cm
−1020
0.110
0.110
  • P y-coordinate4 cm
  • Fraction of the way from A to B, m/(m + n)0.3333
  • Distance AB10.82 cm

What drives the result

Each variable is moved across its typical range while the others stay at the values above. The longest bar is the key driver.

Point x-coordinate (cm) current value 4 cm
x1Point A, xKey driver
−3.3310
x2Point B, x
−2.677.33
nSecond part of the ratio
1.829.18
mFirst part of the ratio AP : PB
1.438.5
y1Point A, y
y2Point B, y
  • P lies 33.3 % of the way from A(1, 2) to B(10, 8), at (4, 4).
  • Setting m = n puts P at the midpoint, 5.5 cm in x.
Chart data as tables

Ranked variables

VariableTypical rangeLowest resultHighest resultSwing (cm)Local stepChange in result
x1 Point A, x−10 to 10 cm−3.3331013.33+0.4 cm+6.67 %
x2 Point B, x−10 to 20 cm−2.6677.33310+0.6 cm+5 %
n Second part of the ratio0.1 to 10 1.8189.1827.364+10%−4.69 %
m First part of the ratio AP : PB0.1 to 10 1.4298.57.071+10%+4.84 %
y1 Point A, y−10 to 10 cm440+0.4 cm0 %
y2 Point B, y−10 to 20 cm440+0.6 cm0 %

Sweep of First part of the ratio AP : PB

First part of the ratio AP : PBPoint x-coordinate (cm)
0.11.429
1.3384.607
2.5756.066
3.8136.903
5.057.447
6.2877.828
7.5258.11
8.7628.328
108.5

Sweep one variable

Point x-coordinate (cm)Hover, touch, or use the arrow keys on the chart
2468 246810 First part of the ratio AP : PB now 4

Variables and how each one contributes

Px

Point x-coordinate

Result · cm

What the equation gives you. Everything else feeds it.

x1

Point A, x

cm · typical −10 to 10

The x-coordinate of point A, in cm. Pulls the point towards A by the share n/(m + n) of the change. Raising it by 0.5 (to 1.5) moves the result by +8.33 %, from 4 to 4.333 cm.

y1

Point A, y

cm · typical −10 to 10

The y-coordinate of point A, in cm. It does not change P_x; it sets P_y. Does not change P_x. It moves P_y by n/(m + n) times the change.

x2

Point B, x

cm · typical −10 to 20

The x-coordinate of point B, in cm. Pulls the point towards B by the share m/(m + n) of the change. Raising it by 0.5 (to 10.5) moves the result by +4.17 %, from 4 to 4.167 cm.

y2

Point B, y

cm · typical −10 to 20

The y-coordinate of point B, in cm. It does not change P_x; it sets P_y. Does not change P_x. It moves P_y by m/(m + n) times the change.

m

First part of the ratio AP : PB

· typical 0.1 to 10

The first part of the ratio AP : PB, a positive number. A larger m puts P further from A and nearer B. Moves the point towards B. Raising it by 0.1 (to 1.1) moves the result by +4.84 %, from 4 to 4.194 cm.

n

Second part of the ratio

· typical 0.1 to 10

The second part of the ratio, a positive number. A larger n puts P nearer A. Moves the point towards A. Raising it by 0.1 (to 2.1) moves the result by −2.42 %, from 4 to 3.903 cm.

Worked example with the values above

  1. The ratio 1 : 2 puts P at the fraction m/(m + n) = 0.33333 of the way from A to B.
  2. x: 1 + 0.33333 × (10 − 1) = 4.
  3. P = (4, 4) cm.

Assumptions and limits

  • Plane (two-dimensional) Cartesian coordinates in one consistent unit.
  • The two points or the two direction vectors are not the same, and neither vector has zero length.

Common mistakes

  • Swapping which end of the ratio multiplies which point in the division formula.
  • Forgetting the absolute value in the distance or area formula.
  • Using the gradient when the line is vertical and the gradient is undefined.

Statistics and uncertainty

These are exact algebraic results from the coordinates, so the uncertainty comes from the inputs. Near-parallel lines and nearly collinear points are the cases where small input errors give large changes in angles or areas.

Where it is used

  • Clearances, offsets and angles between members in drawings, CAD and surveying.
  • Areas of plots, plates and polygon pieces from corner coordinates.

Maths you need

  • Gradient: rise over run of a line
  • Vector: direction and length written as (x, y)
  • Dot product: the sum of products of components

Related formulas

Practise this formula