Proof:
Case (i)
C divides AB internally.
Let A (x1, y1) and B (x2, y2) be the two points joined by line segment AB. Let C (x, y) be the point on the line segment such that 
Draw AP, CR and BQ perpendicular to x-axis.
AM perpendicular to CR and CM perpendicular to BQ.AM = PR = x-x1
CN = RQ = x2-xCM = y-y1
BN = y2-yFrom the similar triangles, CAM and BCN, we have



Case (ii)
C divides AB externally.
From the similar triangles, CAM and CBN, we have



ii) r<0, C divides externally.
Note:
If C divides internally in the ratio 1:1 i.e., C is the midpoint of AB, then
This formula is called the midpoint formula.
Example:
Find the coordinates of the points A (-3, -4), B (-8,7) which divides the line segment joining the points A and B in the given ratio 5:7
i) internally andii) externally.
Suggested answer:
x1 = -3, x2 = -8
y1 = -4, y2 = 7m = 5, n = 7
i) Internal division:



ii) External division:



