math.wiki
Geometry › Coordinate geometry › Partitioning a segment in a given ratio
Open on the map
Geometry · G.GPE.B.6

Partitioning a segment in a given ratio

The midpoint cuts a segment into two equal pieces. How do you find the point that cuts it into pieces in some other ratio, such as one part to three?

Where you are 9 in Coordinate geometry

When you reach for it

The midpoint of a segment cuts it into two equal pieces, and the midpoint formula finds it from the coordinates of the ends. Often the cut you need is not in the middle. A valve goes a third of the way along a straight pipe. A walker at steady speed has used 4 of her 10 minutes. The point where the medians of a triangle meet sits two thirds of the way along each one. Each time the question is the same: where is the point that cuts a segment into two pieces whose lengths are in a given Ratio?

Stated exactly: given points A and B and positive numbers a and b, find the point P on \overline{AB} with

AP : PB = a : b

This is called partitioning the directed segment from A to B in the ratio a : b. The word directed matters. The first number belongs to the piece next to A, so the cut is counted from A; counted from B, the same ratio gives a different point unless a = b. A directed segment is exactly a segment with that choice of start built in.

The procedure

What the ratio says

AP : PB = a : b means the whole segment is made of a + b equal parts, of which AP takes a and PB takes b. So P is the fraction

k = \frac{a}{a + b}

of the way from A to B. This one number does all the work. For the ratio 1 : 3 it is \displaystyle \frac{1}{4}, not \displaystyle \frac{1}{3}: there are four parts, and the first piece is one of them. For 2 : 3 it is \displaystyle \frac{2}{5}. Equivalent ratios give the same fraction, since 4 : 6 gives \displaystyle \frac{4}{10} = \frac{2}{5}, so they give the same point, as they should.

On a number line

Put A at x_1 and B at x_2. The move from A to B is x_2 - x_1, which is negative when B lies to the left. The point the fraction k of the way along makes the fraction k of that move:

P = x_1 + k(x_2 - x_1)

Since 0 < k < 1, the point is past A and short of B, and its distance from A is k times the length AB, which is exactly what the ratio asked for.

In the plane: the same fraction of the run and of the rise

Take A(1, 2) and B(13, 10), and the ratio 1 : 3 from A. Then \displaystyle k = \frac{1}{4}. From A to B the run is 13 - 1 = 12 and the rise is 10 - 2 = 8. A quarter of each is 3 and 2, so

P = (1 + 3,\ 2 + 2) = (4, 4)
A(1,\,2)
B(13,\,10)
P(4,\,4)
3
2
12
8
Figure 1The small triangle is the big one scaled by \displaystyle \frac{1}{4}, so P is a quarter of the run and a quarter of the rise from A.

Why is taking a quarter of the run and a quarter of the rise the same as taking a quarter of the length? Draw the right triangle under \overline{AB}, with a horizontal leg from A and a vertical leg up to B, and the smaller one under \overline{AP} in the same way. Both have a right angle, and both have the same angle at A, because their slanted sides lie along the same line. By AA similarity the two triangles are similar, and the scale factor is \displaystyle \frac{AP}{AB} = \frac{1}{4}. So every side of the small triangle is a quarter of the matching side of the big one: its run is a quarter of 12 and its rise a quarter of 8. This is the same fact that makes every slope triangle on a line a scaled copy of every other.

The argument used nothing special about these numbers. For A(x_1, y_1), B(x_2, y_2) and the ratio a : b from A, the point is

\begin{aligned} x &= x_1 + k(x_2 - x_1) \\ y &= y_1 + k(y_2 - y_1) \end{aligned} \qquad k = \frac{a}{a + b}

The differences are signed. When B is to the left of A or below it, x_2 - x_1 or y_2 - y_1 is negative and the formula moves left or down, the way the segment goes.

Check. From P(4, 4) to B(13, 10) is a run of 9 and a rise of 6, three times the run of 3 and rise of 2 from A to P, in the same direction. So P is on the segment, and PB = 3 \cdot AP, which is the ratio 1 : 3.

The same point as a weighted average

Multiplying out, x_1 + k(x_2 - x_1) = (1 - k)x_1 + kx_2, and \displaystyle 1 - k = \frac{b}{a + b}. So

\begin{aligned} x &= \frac{b x_1 + a x_2}{a + b} \\ y &= \frac{b y_1 + a y_2}{a + b} \end{aligned}

Each coordinate of P is a weighted average of the matching coordinates of A and B. Notice which weight goes where: B gets the weight a, the part that belongs to \overline{AP}. The larger a is, the farther P is from A and the nearer to B, so B has to pull harder. For the example, \displaystyle \frac{3 \cdot 1 + 1 \cdot 13}{4} = 4 and \displaystyle \frac{3 \cdot 2 + 1 \cdot 10}{4} = 4, the same (4, 4). When a = b both weights are equal and this is the midpoint formula, \displaystyle \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}\right).

Which end you start from

“From B to A in the ratio a : b” means BP : PA = a : b, which is AP : PB = b : a. So either start at B and move the fraction \displaystyle \frac{a}{a + b} of the way toward A, or start at A with the fraction \displaystyle \frac{b}{a + b}. Both give the same point; Example 3 does it both ways.

Worked examples

Example 1

On a number line

On a number line, A is at -3 and B is at 12. Find the point P that partitions the directed segment from A to B in the ratio 2 : 3.

Solution

There are 2 + 3 = 5 parts and AP takes 2 of them, so \displaystyle k = \frac{2}{5}. The move from A to B is 12 - (-3) = 15, and two fifths of it is 6:

P = -3 + \frac{2}{5}(15) = -3 + 6 = 3
-3
0
3
12
A
P
B
6
9
Figure 2Example 1. AP = 6 and PB = 9, so AP : PB = 6 : 9 = 2 : 3.

Check. AP = 3 - (-3) = 6 and PB = 12 - 3 = 9, and 6 : 9 = 2 : 3, dividing both by 3.

Example 2

When the answer has fractions

Find the point P that partitions the directed segment from A(2, -1) to B(7, 3) in the ratio 2 : 1.

Solution

Three parts, AP takes two, so \displaystyle k = \frac{2}{3}. The run is 7 - 2 = 5 and the rise is 3 - (-1) = 4. Two thirds of each:

\begin{aligned} x &= 2 + \tfrac{2}{3}(5) = 2 + \tfrac{10}{3} = \tfrac{16}{3} \\ y &= -1 + \tfrac{2}{3}(4) = -1 + \tfrac{8}{3} = \tfrac{5}{3} \end{aligned}

So \displaystyle P = \left(\frac{16}{3}, \frac{5}{3}\right). Neither the run nor the rise divides by 3, and that is fine; the point simply does not sit on a grid corner.

The weighted average gives the same point in one line each. The weight on B is a = 2 and the weight on A is b = 1:

\begin{aligned} x &= \frac{1 \cdot 2 + 2 \cdot 7}{3} = \frac{16}{3} \\ y &= \frac{1 \cdot (-1) + 2 \cdot 3}{3} = \frac{5}{3} \end{aligned}
Example 3

Negative coordinates, and both directions

Let A(-4, 5) and B(6, -10).

(a) Find P, which partitions the directed segment from A to B in the ratio 3 : 2.

(b) Find Q, which partitions the directed segment from B to A in the ratio 3 : 2.

Solution

(a) From A, \displaystyle k = \frac{3}{5}. The run is 6 - (-4) = 10 and the rise is -10 - 5 = -15; the segment goes right and down. Three fifths of each is 6 and -9:

P = (-4 + 6,\ 5 - 9) = (2, -4)

(b) Now start at B and go toward A. The run from B to A is -10 and the rise is 15, and three fifths of each is -6 and 9:

Q = (6 - 6,\ -10 + 9) = (0, -1)
A(-4,\,5)
B(6,\,-10)
P(2,\,-4)
Q(0,\,-1)
Figure 3Example 3. The ratio 3 : 2 counted from A gives P; counted from B it gives Q.

The two points differ. Cut the segment into five equal parts: P is three parts from A, and Q is three parts from B, which is two parts from A. So Q is also the point that partitions the segment from A in the ratio 2 : 3. Indeed, two fifths of the run and rise from A are 4 and -6, and (-4 + 4,\ 5 - 6) = (0, -1).

Check (a) with lengths, using the distance formula: \displaystyle AP = \sqrt{6^2 + 9^2} = \sqrt{117} = 3\sqrt{13} and \displaystyle PB = \sqrt{4^2 + 6^2} = \sqrt{52} = 2\sqrt{13}. Their ratio is 3 : 2.

Example 4

Finding the ratio from the point

Let A(-2, 1) and B(10, 7). Does P(6, 5) lie on \overline{AB}, and if so, in what ratio does it partition the segment from A? Answer the same for Q(6, 4).

Solution

Run the procedure backwards. From A to B the run is 12 and the rise is 6. From A to P the run is 8 and the rise is 4.

The fraction of the run covered is \displaystyle \frac{8}{12} = \frac{2}{3}, and the fraction of the rise is \displaystyle \frac{4}{6} = \frac{2}{3}. They agree, so P is exactly the point \displaystyle \frac{2}{3} of the way from A to B, and it lies on the segment. A fraction of \displaystyle \frac{2}{3} means AP is two parts out of three and PB is the third, so AP : PB = 2 : 1.

For Q, the run from A is again 8, a fraction \displaystyle \frac{2}{3}, but the rise is 3, a fraction \displaystyle \frac{3}{6} = \frac{1}{2}. The only point of the segment with x = 6 is the one two thirds of the way along, which is (6, 5), and Q is not it. So Q is not on \overline{AB}, and no ratio describes it; it sits one unit below the segment.

Example 5

Finding a missing endpoint

The point P(7, 7) partitions the directed segment from A(1, -2) to B in the ratio 3 : 1. Find B.

Solution

The ratio says AP is 3 parts and PB is 1 part. From A to P is a run of 6 and a rise of 9, and that is three parts, so one part is a run of 2 and a rise of 3. The segment carries straight on from P for one more part:

B = (7 + 2,\ 7 + 3) = (9, 10)

Check forwards. From A(1, -2) to B(9, 10) the run is 8 and the rise is 12, and with \displaystyle k = \frac{3}{4} the point is (1 + 6,\ -2 + 9) = (7, 7), which is P.

Example 6

The centroid of a triangle

Triangle ABC has vertices A(0, 0), B(10, 2) and C(2, 10). Its centroid G lies on the median from A, the segment from A to the midpoint M of \overline{BC}, and partitions it in the ratio 2 : 1 from the vertex. Find G, and compare it with the average of the three vertices.

Solution

First the midpoint, which is the ratio 1 : 1:

M = \left(\frac{10 + 2}{2}, \frac{2 + 10}{2}\right) = (6, 6)

Then the ratio 2 : 1 from A to M, so \displaystyle k = \frac{2}{3}. The run and the rise are both 6, and two thirds of 6 is 4:

G = (0 + 4,\ 0 + 4) = (4, 4)
A(0,\,0)
B(10,\,2)
C(2,\,10)
M(6,\,6)
G(4,\,4)
Figure 4Example 6. G cuts the median \overline{AM} in the ratio 2 : 1 from the vertex.

The average of the vertices has \displaystyle x = \frac{0 + 10 + 2}{3} = 4 and \displaystyle y = \frac{0 + 2 + 10}{3} = 4, so it is (4, 4), the same point. That is no accident. With the weighted average, G puts weight 1 on A and weight 2 on M, and M is itself half B and half C, so G gives A, B and C one third each. The same reasoning on any median lands on the same average, which is why all three medians pass through one point. The Centroid lesson takes this further.

Boundaries

The two parts are positive. With a > 0 and b > 0 the fraction \displaystyle k = \frac{a}{a + b} lies strictly between 0 and 1, and the point lies strictly between A and B. The ratio a : 0 would put P at B and 0 : b at A, which is no cut at all.

Outside the segment it is no longer a partition. The formula x_1 + k(x_2 - x_1) still makes sense for k > 1 or k < 0, and gives points on the line beyond B or behind A. That is how a segment is extended, as when the far endpoint is found from a midpoint with k = 2, but such a point does not cut \overline{AB} into two pieces.

The ratio is counted from the start. AP : PB = a : b and BP : PA = a : b are different points unless a = b. A ratio with no stated direction is incomplete.

The fraction of the way is \displaystyle \frac{a}{a + b}, not \displaystyle \frac{a}{b}. The ratio compares the two pieces with each other; the fraction compares one piece with the whole.

The path must be straight. Taking the same fraction of the run and of the rise works because a straight segment has one slope throughout, so the similar triangles exist. Along a curve, or a path with a bend, the point a fraction of the way by length is not found this way.

Only the ratio matters, not its size. 2 : 3, 4 : 6 and 1 : 1.5 give the same point. The numbers a and b need not be whole; they need only be positive.

Where this goes next

The midpoint is the ratio 1 : 1, and the Centroid is the ratio 2 : 1 along a median, so both are special cases of this move. Written with vectors, the formula says P = A + k\,\overrightarrow{AB}: start at A and add the fraction k of the vector from A to B. Letting k run through every number traces out the whole line through A and B, which is how lines are described in three dimensions.

The similar-triangle argument is also a dilation in disguise: the dilation with center A and scale factor k sends B to P. And the weighted-average form is the start of the idea of a balance point. Weights b at A and a at B balance at P, and equal weights at the three corners of a triangle balance at the centroid, which is also where a triangle cut from card balances.

Exercises

On a number line

Find the point P that partitions the directed segment from A to B in the given ratio.

  1. A at 2, B at 22, ratio 1 : 4
  2. A at -9, B at 5, ratio 3 : 4
  3. A at 10, B at -2, ratio 1 : 2

Partition the segment

Find the point P that partitions the directed segment from A to B in the given ratio.

  1. A(0, 0), B(10, 15), ratio 2 : 3
  2. A(3, -1), B(11, 11), ratio 3 : 1
  3. A(-5, 2), B(7, -4), ratio 1 : 2
  4. A(4, 6), B(-6, 1), ratio 4 : 1
  5. A(1, 1), B(6, 3), ratio 1 : 2
  6. A(-2, -3), B(5, 4), ratio 5 : 2

Direction and equal parts

  1. Let A(0, 8) and B(9, 2). Find the point that partitions the directed segment from A to B in the ratio 1 : 2, and the point that partitions the directed segment from B to A in the ratio 1 : 2.
  2. Find the two points that cut the segment from A(-1, 4) to B(8, -2) into three equal parts.

Working backwards

  1. Let A(-3, 2) and B(9, 8). The point P(5, 6) lies on \overline{AB}. In what ratio does it partition the directed segment from A to B?
  2. Let A(1, 0) and B(7, 9). Decide whether Q(3, 4) and R(3, 3) lie on \overline{AB}, and for any that does, give the ratio in which it partitions the segment from A.
  3. The point P(8, 1) partitions the directed segment from A(4, -1) to B in the ratio 2 : 3. Find B.
  4. The point P(2, 5) partitions the directed segment from A to B(-7, 11) in the ratio 1 : 3. Find A.
  5. The segment from A(-6, 1) to B(4, 6) crosses the y-axis. Find the crossing point, and the ratio in which it partitions the segment from A.

Problems

  1. On a site plan with a grid in meters, a straight pipe runs from a pump at (2, 1) to a tank at (14, 10). A valve is fitted so that the pipe from the pump to the valve and the pipe from the valve to the tank are in the ratio 1 : 2. Where is the valve, and how far is it from the pump along the pipe?
  2. Triangle ABC has vertices A(1, 1), B(9, 3) and C(5, 11). Find its centroid by partitioning the median from A in the ratio 2 : 1 from the vertex, and check the answer against the average of the three vertices.
  3. A drone flies at a constant speed in a straight line from (-4, -2) to (11, 8) on a map grid, and the trip takes 10 minutes. Where is it after 4 minutes?

Reasoning

  1. Explain why the point that partitions \overline{AB} from A in the ratio 1 : 3 is a quarter of the way from A, not a third.
  2. Show that partitioning the directed segment from B to A in the ratio a : b gives the same point as partitioning the directed segment from A to B in the ratio b : a.
  3. Use similar triangles to explain why the point the fraction k of the way from A(x_1, y_1) to B(x_2, y_2) has x-coordinate x_1 + k(x_2 - x_1). What happens when the segment is vertical?
  4. In the weighted-average form, B gets the weight a and A gets the weight b. Explain why the weights are that way round, and show that the form gives the midpoint when a = b.
Answers
  1. P = 6. \displaystyle k = \frac{1}{5}, and a fifth of the move 20 is 4, so P = 2 + 4.
  2. P = -3. \displaystyle k = \frac{3}{7}, the move is 5 - (-9) = 14, and \displaystyle \frac{3}{7}(14) = 6, so P = -9 + 6.
  3. P = 6. \displaystyle k = \frac{1}{3}, the move is -2 - 10 = -12, and a third of it is -4, so P = 10 - 4.
  4. (4, 6). \displaystyle k = \frac{2}{5} of the run 10 is 4 and of the rise 15 is 6.
  5. (9, 8). \displaystyle k = \frac{3}{4} of the run 8 is 6 and of the rise 12 is 9, so (3 + 6,\ -1 + 9).
  6. (-1, 0). \displaystyle k = \frac{1}{3} of the run 12 is 4 and of the rise -6 is -2, so (-5 + 4,\ 2 - 2).
  7. (-4, 2). \displaystyle k = \frac{4}{5} of the run -10 is -8 and of the rise -5 is -4, so (4 - 8,\ 6 - 4).
  8. \displaystyle \left(\frac{8}{3}, \frac{5}{3}\right). \displaystyle k = \frac{1}{3} of the run 5 is \displaystyle \frac{5}{3} and of the rise 2 is \displaystyle \frac{2}{3}, so \displaystyle \left(1 + \frac{5}{3},\ 1 + \frac{2}{3}\right).
  9. (3, 2). \displaystyle k = \frac{5}{7} of the run 7 is 5 and of the rise 7 is 5, so (-2 + 5,\ -3 + 5).
  10. From A: (3, 6), a third of the run 9 and of the rise -6 added to A. From B: (6, 4), a third of the run -9 and of the rise 6 added to B. The second point is the ratio 2 : 1 from A.
  11. (2, 2) and (5, 0). One third of the move is a run of 3 and a rise of -2; take it once and twice from A. These are the ratios 1 : 2 and 2 : 1.
  12. 2 : 1. The run is 8 of 12 and the rise is 4 of 6, both \displaystyle \frac{2}{3} of the way.
  13. Q is not on the segment: its run is \displaystyle \frac{2}{6} = \frac{1}{3} of the way but its rise is \displaystyle \frac{4}{9}. R is on it, since both fractions are \displaystyle \frac{1}{3}, and it partitions the segment in the ratio 1 : 2.
  14. B = (14, 4). From A to P is two parts, a run of 4 and a rise of 2, so one part is a run of 2 and a rise of 1, and B is three more parts on: (8 + 6,\ 1 + 3).
  15. A = (5, 3). PB is three parts, a run of -9 and a rise of 6, so one part is a run of -3 and a rise of 2, and A is one part back from P: (2 + 3,\ 5 - 2).
  16. (0, 4), ratio 3 : 2. The run from A to the axis is 6 of 10, so \displaystyle k = \frac{3}{5}, and the rise is \displaystyle \frac{3}{5}(5) = 3, giving y = 1 + 3 = 4.
  17. The valve is at (6, 4), 5 meters from the pump. \displaystyle k = \frac{1}{3} of the run 12 and rise 9 is 4 and 3, and \displaystyle \sqrt{4^2 + 3^2} = 5, a third of the whole pipe, which is \displaystyle \sqrt{12^2 + 9^2} = 15.
  18. G = (5, 5). The midpoint of \overline{BC} is M(7, 7); two thirds of the run 6 and rise 6 from A is 4 and 4. The average of the vertices has \displaystyle x = \frac{1 + 9 + 5}{3} = 5 and \displaystyle y = \frac{1 + 3 + 11}{3} = 5.
  19. At (2, 2). At constant speed the distance covered is in proportion to the time, so after 4 of 10 minutes it is \displaystyle \frac{2}{5} of the way, the ratio 4 : 6 = 2 : 3. Two fifths of the run 15 and the rise 10 is 6 and 4, so (-4 + 6,\ -2 + 4).
  20. The ratio 1 : 3 compares the two pieces with each other, so the whole segment is 1 + 3 = 4 equal parts, and AP is one of them: a quarter of AB. A third of the way would leave two thirds for PB, which is the ratio 1 : 2.
  21. From B to A in the ratio a : b means BP : PA = a : b, which is the same statement as AP : PB = b : a. In coordinates, \displaystyle B + \frac{a}{a + b}(A - B) = \frac{aA + bB}{a + b}, and \displaystyle A + \frac{b}{a + b}(B - A) = \frac{aA + bB}{a + b} as well.
  22. Draw the right triangle with hypotenuse \overline{AB} and a horizontal leg from A, and the one with hypotenuse \overline{AP} in the same way. They share the angle at A and both have a right angle, so they are similar by AA, with scale factor \displaystyle \frac{AP}{AB} = k. So the horizontal leg of the small one is k times that of the big one, and since P is on the same side of A as B, x - x_1 = k(x_2 - x_1). If the segment is vertical there is no triangle, but then x_2 - x_1 = 0 and every point of the segment has x = x_1, which the formula also gives.
  23. x_1 + k(x_2 - x_1) = (1 - k)x_1 + kx_2, with \displaystyle k = \frac{a}{a + b} and \displaystyle 1 - k = \frac{b}{a + b}. So B gets the weight a. That is the right way round: a larger a makes AP the larger piece, so P lies nearer to B, and B must pull harder. When a = b, the form is \displaystyle \frac{a x_1 + a x_2}{2a} = \frac{x_1 + x_2}{2}, the midpoint, and the same for y.
kg1128 · updated 2026-10-04 · CC-BY-SA-4.0