################################# Coordinate Geometry: The Line ################################# Revision ===================== In your previous course you will have coved some of the basics of the line such as * Plot a point such as :math:`p(3,2)` * Find the distance between two points * Find the midpoint of a line * Find the distance between two points Distance between 2 points ^^^^^^^^^^^^^^^^^^^^^^^^^^ The formula for the distance between two points :math:`p(x1, y1)` and :math:`p(x2, y2)` is: Length of :math:`\left [ ab \right ]` is :math:`\sqrt{(x_{2} -x_{1})^2 +(y_{2}-y_{1})^2}` This is because the horizontal distance of the line is given as :math:`x2-x1` while the vertical distance of the line is :math:`(y2-y1)`. Pythagorus tells us that the length of the hypotenuse of a right angled triangle is: .. math:: (hypotenuse)^2 = (base)^2 + (height)^2 hypotenuse = \sqrt{(base)^2 + (height)^2} Midpoint of a Line Segment ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The midpoint, :math:`m`, of a line segment joining :math:`a\left(x_{1},y_{1}\right)` and :math:`b\left(x_{2},y_{2}\right)` is .. math:: \left(\frac{x_{1} +x_{2}}{2},\frac{y_{1} +y_{2}}{2}\right) Example ^^^^^^^^^^^^^^^^^^^ If :math:`a\left(-1,3\right)` and :math:`b\left(5,7\right)` are 2 points in the plane, find (i) :math:`\mid ab \mid` and (ii) the midpoint of :math:`\left[ab\right]`. Solution ^^^^^^^^^^^^^^^^ :math:`(i)` The points are :math:`a\left(-1,3\right)` which corresponds to :math:`a\left(x_{1},y_{1}\right)` and :math:`b\left(5,7\right)` which corresponds to :math:`b\left(x_{2},y_{2}\right)` .. math:: :nowrap: x_{1} = -1 \\y_{1} = 3\\x_{2} = 5\\y_{2} = 7 .. math:: :nowrap: \begin{eqnarray} \mid ab \mid & = & \sqrt{(x_{2} -x_{1})^2 +(y_{2}-y_{1})^2} \\ & = & \sqrt{(5-(-1))^2 +(7-3)^2} \\ & = & \sqrt{36 +16} \\ & = & \sqrt{52} \end{eqnarray} :math:`(ii)` Midpoint of :math:`\left[ab\right]` : .. math:: & = & \left(\frac{x_{1} +x_{2}}{2},\frac{y_{1} +y_{2}}{2}\right) \\ & = & \left(\frac{-1 + 5 }{2},\frac{3 + 7}{2}\right)\\ & = & (2,5) Extras ^^^^^^^^^^^ .. math:: (a + b)^2 = a^2 + 2ab + b^2 (a - b)^2 = a^2 - 2ab + b^2 x^2=y^2 .. math:: \cos (2\theta) = \cos^2 \theta - \sin^2 \theta .. math:: (a + b)^2 &= (a + b)(a + b) \\ &= a^2 + 2ab + b^2 .. math:: :nowrap: \begin{eqnarray} y & = & ax^2 + bx + c \\ f(x) & = & x^2 + 2xy + y^2 \end{eqnarray} .. math:: :nowrap: \begin{eqnarray} \sqrt{ (k-0)^2 +( -2k + 2)^2} &=& \sqrt{(k +2)^2 +(-2k +6)^2} \\ \Rightarrow k^2 + 4k^2 -8k +4 &=& k^2 +4k +4 +4k^2 -24k +36 \\ \Rightarrow -8k +4 &=& 40 -20k \\ \Rightarrow 12k &=& 36 \\ \Rightarrow k &=& 3 \\ \end{eqnarray} .. math:: e^{i\pi} + 1 = 0 :label: euler