Ratios of Directed Line Segments Calculator
The ratios of the directed line segments calculator will help you calculate the coordinates of the point that partition the line segment in a given proportion. This article will explore what a directed line segment is, how to partition a line segment with a given ratio with some examples, segment partition formula, and some frequently asked questions.
What is a directed line segment?
A line segment $AB$ is a part of a line bound by two endpoints $A$ and $B$ where $A \neq B$. A directed line segment $\overrightharpoon{AB}$ is a line segment with a definite direction – it is the line segment directed from $A$ to $B$.
While the line segment $AB$ can also be written as $BA$, the same is not true for the directed line segment $\overrightharpoon{AB}$. This is because $\overrightharpoon{AB}$ is directed from $A$ to $B$, whereas $\overrightharpoon{BA}$ is directed from $B$ to $A$.
🔎 Notice the similarities between a directed line segment and a vector? Not all directed line segments are vectors, but you can use a directed line segment to geometrically represent a vector with the same direction if the length of the line segment matches the magnitude of the vector.
In the next section, we shall answer that burning question in your mind: how do you divide a segment into given ratios?
Directed line segment partitioning and formula
A point $P$ lying on the directed line segment $\overrightharpoon{AB}$ will divide into two line segments. There are two ways to divide a line segment:
 Internally, when the point $P$ lies somewhere within the segment $\overrightharpoon{AB}$; and
 Externally, when the point $P$ lies somewhere on the extended line segment $\overrightharpoon{AB}$.
To partition the line segment $\overrightharpoon{AB}$ internally into the ratio $m:n$, the point $P(p_x,p_y)$ must lie on $\overrightharpoon{AB}$ such that it is $\frac{m}{m+n}$ away from $A$ and $\frac{n}{m+n}$ away from $B$.
On the other hand, to partition the line segment $\overrightharpoon{AB}$ externally into the ratio $m:n$, the point $P(p_x,p_y)$ must lie on the extended line segment $\overrightharpoon{AB}$ such that it is $\frac{m}{mn}$ away from $A$ and $\frac{n}{mn}$ away from $B$.
Now that you know the concept of breaking a line segment into a ratio let's put together a formula for a directed line segment divided by any point $P$.
For the internal partition of $\overrightharpoon{AB}$:
And for the external partition of $\overrightharpoon{AB}$:
where:
 $P$ – Any point that partitions the directed line segment $\overrightharpoon{AB}$;
 $p_x,p_y$ – The x and ycoordinates of the point $P$;
 $m,n$ – Ratio $m:n$ into which the point $P$ divides $\overrightharpoon{AB}$;
 $x_1,y_1$ – The x and ycoordinates of the endpoint $A$ of $\overrightharpoon{AB}$; and
 $x_2,y_2$ – The x and ycoordinates of the endpoint $B$ of $\overrightharpoon{AB}$.
❗ Keep in mind that in case of external division of the line segment, the ratios $m$ and $n$ cannot be equal and must be distinct to avoid a division by zero in the formula.
Now that you know the ratio of line segments formula, let's discuss it further, along with some examples of segment partition calculation.
How do I partition a line segment with a given ratio?
To find the point P(pₓ, pᵧ)
that internally divides the line segment AB
into the ratio m:n
, follow these steps:
 Calculate
pₓ
usingpₓ = (mx₂ + nx₁)/(m + n)
, wherex₁
andx₂
are the xcoordinates ofA
andB
respectively.  Determine
pᵧ
usingpᵧ = (my₂ + ny₁)/(m + n)
, wherey₁
andy₂
are the ycoordinates ofA
andB
respectively.
To find the point P(pₓ, pᵧ)
that externally divides the line segment AB
into the ratio m:n
, follow these steps:
 Compute
pₓ
usingpₓ = (mx₂  nx₁)/(m  n)
, wherex₁
andx₂
are the xcoordinates ofA
andB
respectively.  Find
pᵧ
usingpᵧ = (my₂  ny₁)/(m  n)
, wherey₁
andy₂
are the ycoordinates ofA
andB
respectively.
For example, consider a line segment $\overrightharpoon{AB}$ with the endpoints $A(1,2)$ and $B(4,6)$. The direction of this segment would be from $A$ to $B$. To find a point that divides this segment internally in the ratio $2:3$, we can use the internal partition formula as follows:
Note that to say that the point $P(2.2,3.6)$ divides $\overrightharpoon{AB}$ in the ratio $2:3$ is the same as saying that the point $P(2.2,3.6)$ lies ${\frac{2}{5}}^{th}$ away from the endpoint $A(1,2)$ and ${\frac{3}{5}}^{th}$ away from the endpoint $B(4,6)$.
Now, if we want to divide the same line segment externally in the same ratio, then we shall employ the formula for external partition of the line segment:
See how easy it is to partition a line segment in a given ratio?😉 Go ahead and try some practice problems and master this method! You can always verify your results using this calculator to divide line segments.
How to use this ratios of directed line segments calculator
This ratios of directed line segments calculator is beneficial to find the point that divides a directed line segment in a given ratio or to find the ratio in which a given point splits the line segment.

Choose the type of partition between internal and external in the The line is paritioned... field. By default, it is set to internal partition.

Enter the coordinates of the endpoints of the segment. Ensure that you're getting the direction of the line segment correct. In this calculator, the direction is always from $A(x_1,y_1)$ to $B(x_2,y_2)$.

This step depends on whether you want to find the point or the ratio:
 If the ratio is the given value, enter the given ratio in the corresponding fields, and the coordinates of the point appear in their respective fields, along with a helpful graph. Otherwise, leave the ratio fields empty.
 If the coordinates of the point are the given value, enter these coordinates in the corresponding fields, and the resulting ratio will appear at the bottom.
You now have a simple tool to help you calculate the partitioning of a line segment anytime you need! You can also use our other calculators to find out more interesting math:
FAQ
How do I find a point that divides a segment in half?
If you know the coordinates of the endpoints of the line segment, you can easily find its midpoint (xₘ, yₘ)
using these steps:
 Calculate the average of the xcoordinates of the endpoints to get the xcoordinate of the midpoint.
xₘ = (x₁ + x₂)/2
.  Determine the average of the ycoordinates of the endpoints to obtain the ycoordinate of the midpoint.
yₘ = (y₁ + y₂)/2
.  Verify these results using our Midpoint Calculator or Ratios of Directed Line Segments Calculator.
How can I divide a line segment into three equal parts?
To divide a line segment AB
into three equal parts, you need to find two points P(pₓ, pᵧ)
and Q(Qₓ, Qᵧ)
on AB
, such that they each divide AB
into the ratios 1:2
and 2:1
:

Calculate the xcoordinate
pₓ
of the pointP
using the formulapₓ = (2x₂ + x₁)/3
, wherex₁
andx₂
are the xcoordinates ofA
andB
respectively. 
Compute the ycoordinate
pᵧ
of the pointP
usingpᵧ = (2y₂ + y₁)/3
, wherey₁
andy₂
are the ycoordinates ofA
andB
respectively. 
Determine the xcoordinate
qₓ
of the pointQ
usingqₓ = (x₂ + 2x₁)/3
. 
Find the ycoordinate
qᵧ
of the pointQ
usingqᵧ = (y₂ + 2y₁)/3
. 
Put these coordinates together to get the points
P(pₓ, pᵧ)
andQ(Qₓ, Qᵧ)
.
How to find a point lying onethird of the way from an endpoint?
A point P
lying onethird of the way from the endpoint A
on the line segment AB
will divide it in the ratio 1:2
. To find this point, follow these simple steps:

Calculate the xcoordinate
pₓ
of this point using the formulapₓ = (2x₂ + x₁)/3
, wherex₁
andx₂
are the xcoordinates ofA
andB
respectively. 
Compute the ycoordinate
pᵧ
of this point usingpᵧ = (2y₂ + y₁)/3
, wherey₁
andy₂
are the ycoordinates ofA
andB
respectively. 
Put them together to obtain the desired point
P(pₓ, pᵧ)
.