Theory:

The section formula is used to get the coordinates of a point by splitting a line segment into two parts with the given ratio.
Let us look at the graph carefully.
 
Fig_4.svg
 
From the graph, the line \(AB\) is divided at \(P\) in the ratio \(m : n\).
 
Therefore, APPB=mn.
 
So, \(A'P' : P'B'\) is also \(m : n\).
 
APPB=mn
 
\(n(A'P') =\) \(m(A'B')\)
 
\(n(x - x_1) =\) \(m(x_2 - x)\)
 
\(nx - nx_1 = mx_2 - mx\)
 
\(mx + nx = mx_2 + nx_1\)
 
\(x(m + n) = mx_2 + nx_1\)
 
x=mx2+nx1m+n
 
Similarly, y=my2+ny1m+n.
1. The coordinates of the point \(P(x, y)\) which divides the line segment joining the points \(A(x_1, y_1)\) and \(B(x_2, y_2)\), internally in the ratio \(m : n\) are:
 
P(x,y)=mx2+nx1m+n,my2+ny1m+n
 
This is known as the section formula.
 
 
2. If the point \(P(x, y)\) divides the line segment in the ratio \(k : 1\), then the coordinates are:
 
P(x,y)=kx2+x1k+1,ky2+y1k+1
 
 
3. If the point \(P(x, y)\) divides the line segment in the ratio \(1 : 1\), then the coordinates are:
 
P(x,y)=1×x2+1×x11+1,1×y2+1×y11+1=x2+x12,y2+y12
 
P(x,y)=x2+x12,y2+y12
 
This is known as the mid-point formula of the line segment.
 
 
4. If \(A(x_1, y_1)\), \(B(x_2, y_2)\) and \(C(x_3, y_3)\) be the vertices of a triangle, then the centroid of a triangle is:
 
G(x,y)=x1+x2+x33,y1+y2+y33
Important!
The point at which all the \(3\) medians intersect is a centroid.