Section formula

In coordinate geometry, the  Section formula is a formula used to find the ratio in which a line segment is divided by a point internally or externally. It is used to find out the centroid, incenter and excenters of a triangle. In physics, it is used to find the center of mass of systems, equilibrium points, etc.

Internal Divisions
If point P (lying on AB) divides the line segment AB joining the points $$\mathrm{A}(x_1,y_1)$$ and $$\mathrm{B}(x_2,y_2)$$ in the ratio m:n, then

$$ P = \left(\frac{mx_2 + nx_1}{m + n},\frac{my_2 + ny_1}{m + n}\right)$$

The ratio m:n can also be written as $$m/n:1$$, or $$k:1$$, where $$k=m/n$$. So, the coordinates of point $$P$$ dividing the line segment joining the points $$\mathrm{A}(x_1,y_1)$$ and $$\mathrm{B}(x_2,y_2)$$ are:

$$\left(\frac{mx_2 + nx_1}{m + n}, \frac{my_2 + ny_1}{m + n}\right) $$

$$=\left(\frac{\frac{m}{n}x_2 +x_1}{\frac{m}{n}+1},\frac{\frac{m}{n}y_2 +y_1}{\frac{m}{n}+1} \right )$$

$$=\left ( \frac{kx_2 +x_1}{k +1},\frac{ky_2 + y_1}{k +1} \right )$$

Similarly, the ratio can also be written as $$k:k-1$$, and the coordinates of P are $$((1-k)x_1 + kx_2, (1-k)y_1 + ky_2) $$.

Proof
Triangles $$PAQ\sim BPC $$.
 * $$\begin{align}

\frac{AP}{BP}=\frac{AQ}{CP}=\frac{PQ}{BC}\\ \frac{m}{n}=\frac{x-x_1}{x_2-x}=\frac{y-y_1}{y_2-y}\\ mx_2-mx=nx-nx_1,my_2-my=ny-ny_1\\ mx+nx=mx_2+nx_1, my+ny=my_2+ny_1\\ (m+n)x=mx_2+nx_1, (m+n)y=my_2+ny_1\\ x=\frac{mx_2 + nx_1}{m + n}, y=\frac{my_2 + ny_1}{m + n}\\ \end{align} $$

External Divisions
If a point P (lying on the extension of AB) divides AB in the ratio m:n then

$$P = \left(\dfrac{mx_2 - nx_1}{m - n}, \dfrac{my_2 - ny_1}{m - n}\right)$$

Proof
Triangles $$PAC\sim PBD $$ (Let C and D be two points where A & P and B & P intersect respectively). Therefore ∠ACP = ∠BDP
 * $$\begin{align}

\frac{AB}{BP}=\frac{AC}{BD}=\frac{PC}{PD}\\ \frac{m}{n}=\frac{x-x_1}{x-x_2}=\frac{y-y_1}{y-y_2}\\ mx-mx_2=nx-nx_1,my-my_2=ny-ny_1\\ mx-nx=mx_2-nx_1, my-ny=my_2-ny_1\\ (m-n)x=mx_2-nx_1, (m-n)y=my_2-ny_1\\ x=\frac{mx_2 - nx_1}{m - n}, y=\frac{my_2 - ny_1}{m - n}\\ \end{align} $$

Midpoint formula
The midpoint of a line segment divides it internally in the ratio $1:1$. Applying the Section formula for internal division:

$$P = \left(\dfrac{x_1 + x_2}{2}, \dfrac{y_1 + y_2}{2} \right)$$

Derivation
$$P = \left(\dfrac{mx_2 + nx_1}{m + n}, \dfrac{my_2 + ny_1}{m + n}\right) $$

$$= \left ( \frac{1\cdot x_1 + 1\cdot x_2}{1+1},\frac{1 \cdot y_1 + 1\cdot y_2}{1+1} \right )$$

$$=\left(\dfrac{x_1 + x_2}{2}, \dfrac{y_1 + y_2}{2} \right)$$

Centroid
The centroid of a triangle is the intersection of the medians and divides each median in the ratio $2:1$. Let the vertices of the triangle be $$A(x_1, y_1)$$, $B(x_2, y_2)$ and $C(x_3, y_3)$. So, a median from point A will intersect BC at $\left(\frac{x_2 + x_3}{2}, \frac{y_2 + y_3}{2}\right)$. Using the section formula, the centroid becomes:

\left(\frac{x_1 + x_2 + x_3}{3},\frac{y_1 + y_2 + y_3}{3} \right)$$

In 3-Dimensions
Let A and B be two points with Cartesian coordinates (x1, y1, z1) and (x2, y2, z2) and P be a point on the line through A and B. If $$AP:PB =m:n$$. Then the section formulae give the coordinates of P as

$$\left ( \frac{mx_2 + nx_1}{m +n} ,\frac{my_2 + ny_1}{m+n}, \frac{mz_2 + nz_1}{m+n} \right )$$

If, instead, P is a point on the line such that $$AP:PB = k:1-k$$, its coordinates are $$((1-k)x_1 + kx_2, (1-k)y_1 + ky_2, (1-k)z_1 + kz_2)$$.

In vectors
The position vector of a point P dividing the line segment joining the points A and B whose position vectors are $$\vec{a}$$ and $$\vec{b}$$


 * 1) in the ratio $$m:n$$ internally, is given by $$\frac{n\vec{a} + m\vec{b}}{m+n}$$
 * 2) in the ratio $$m:n$$ externally, is given by $$\frac{m\vec{b} - n\vec{a}}{m-n}$$