Form 4 Additional Mathematics Bab 7: Coordinate Geometry
The midpoint $M$ of a line segment connecting $A(x_1, y_1)$ and $B(x_2, y_2)$ is:
$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}\right)$$If point $P(x, y)$ divides the line segment joining $A(x_1, y_1)$ and $B(x_2, y_2)$ internally in the ratio $m : n$, the coordinates of $P$ are:
$$P(x, y) = \left(\frac{n x_1 + m x_2}{m + n}, \frac{n y_1 + m y_2}{m + n}\right)$$Two non-vertical lines $L_1$ and $L_2$ with gradients $m_1$ and $m_2$ are parallel ($L_1 \parallel L_2$) if and only if their gradients are equal:
$$m_1 = m_2$$Two non-vertical lines $L_1$ and $L_2$ with gradients $m_1$ and $m_2$ are perpendicular ($L_1 \perp L_2$) if and only if the product of their gradients is $-1$:
$$m_1 m_2 = -1 \quad \text{or} \quad m_2 = -\frac{1}{m_1}$$The area of a triangle with vertices $A(x_1, y_1)$, $B(x_2, y_2)$, and $C(x_3, y_3)$ arranged in counter-clockwise order is:
$$\text{Area} = \frac{1}{2} \left| \begin{matrix} x_1 & x_2 & x_3 & x_1 \\ y_1 & y_2 & y_3 & y_1 \end{matrix} \right|$$ $$\text{Area} = \frac{1}{2} |(x_1 y_2 + x_2 y_3 + x_3 y_1) - (y_1 x_2 + y_2 x_3 + y_3 x_1)|$$Three points $A$, $B$, and $C$ are collinear (lie on the same straight line) if and only if the area of triangle $ABC$ is zero:
$$\text{Area of } \triangle ABC = 0$$The area of a quadrilateral with vertices $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$, and $D(x_4, y_4)$ in counter-clockwise order is:
$$\text{Area} = \frac{1}{2} \left| \begin{matrix} x_1 & x_2 & x_3 & x_4 & x_1 \\ y_1 & y_2 & y_3 & y_4 & y_1 \end{matrix} \right|$$ $$\text{Area} = \frac{1}{2} |(x_1 y_2 + x_2 y_3 + x_3 y_4 + x_4 y_1) - (y_1 x_2 + y_2 x_3 + y_3 x_4 + y_4 x_1)|$$A locus is the path traced by a moving point $P(x, y)$ that satisfies a given geometric condition.
The distance between two points $P(x, y)$ and $A(x_1, y_1)$ is given by:
$$d = \sqrt{(x - x_1)^2 + (y - y_1)^2}$$