### 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.

From the graph, the line $$AB$$ is divided at $$P$$ in the ratio $$m : n$$.

Therefore, $\frac{\mathit{AP}}{\mathit{PB}}=\frac{m}{n}$.

So, $$A'P' : P'B'$$ is also $$m : n$$.

$\frac{{A}^{\prime }{P}^{\prime }}{{P}^{\prime }{B}^{\prime }}=\frac{m}{n}$

$$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=\frac{m{x}_{2}+n{x}_{1}}{m+n}$

Similarly, $y=\frac{m{y}_{2}+n{y}_{1}}{m+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\left(x,y\right)=\left(\frac{m{x}_{2}+n{x}_{1}}{m+n},\frac{m{y}_{2}+n{y}_{1}}{m+n}\right)$

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\left(x,y\right)=\left(\frac{k{x}_{2}+{x}_{1}}{k+1},\frac{k{y}_{2}+{y}_{1}}{k+1}\right)$

3. If the point $$P(x, y)$$ divides the line segment in the ratio $$1 : 1$$, then the coordinates are:

$P\left(x,y\right)=\left(\frac{1×{x}_{2}+1×{x}_{1}}{1+1},\frac{1×{y}_{2}+1×{y}_{1}}{1+1}\right)=\left(\frac{{x}_{2}+{x}_{1}}{2},\frac{{y}_{2}+{y}_{1}}{2}\right)$

$P\left(x,y\right)=\left(\frac{{x}_{2}+{x}_{1}}{2},\frac{{y}_{2}+{y}_{1}}{2}\right)$

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\left(x,y\right)=\left(\frac{{x}_{1}+{x}_{2}+{x}_{3}}{3},\frac{{y}_{1}+{y}_{2}+{y}_{3}}{3}\right)$
Important!
The point at which all the $$3$$ medians intersect is a centroid.