Thursday, July 11, 2019

Distance Between Two Points, Division and Midpoint of Line Segment - Analytic Geometry


* Distance between Two Points

- if line 1 and line 2 are parallel with x and y-axis respectively, x2 minus x1 will be the distance parallel to the x-axis while y2 minus y1 will be the distance parallel to the y-axis. We will then form a right triangle whose hypotenuse is the distance between the two points :( x1, y1) and (x2, y2).





Formula:  
(Derived from Pythagorean Theorem) 






Where:
 
d = distance between the two points.
x1 = x-coordinate of point 1
x2 = x-coordinate of point 2
y1 = y-coordinate of point 1
y2 = y-coordinate of point 2

Examples:

* Find the distance between the points (1,3) and (5,3).

Given:

Let:
P1(1,3)
P2(5,2)

Required: d

Solution:

d = √[(x2 - 
x1)2 - (y2 - y1)2]

d = [(5 - 1)2 - (2 - 3)2]

d = 4.12 units








* Division of a Line Segment

            - Simply finding the coordinates of the points that divides a line segment into parts (ratio).

Formula:
x = x1 + r(x2 - x1)
y = y1 + r(y2 - y1)

Where:

x and y = coordinate of the point that divides the line segment.
x1 and x2 = x-coordinates of the line segment's end points
y1 and y2 = y-coordinates of the line segment's end points
r = ratio

Example:

* Find the coordinates of the points that divide the line into 3 parts. The end points of the line are (1, 3) and (5, 8)

Given:
Let:
P1(1,3)
P2(5,8)

Required: points that divides the line (A and B)

Solution:

(solving for 1st point: A)

* ratio: 1/3 

xA = x1 + r(x2 - x1)

= 1 + (1/3)(5 - 1)

= 1 + 1.33

xA = 1.33

yA = y1 + r(y2 - y1)

= 3 + (1/3)(8 - 3)

= 3 + 1.67

yA= 4.67


A(2.33,4.67)

* ratio: 2/3


xB = x1 + r(x2 - x1)

= 1 + (2/3)(5 - 1)

= 1 + 2.67

xB= 3.67

yB = y1 + r(y2 - y1)

= 3 +(2/3)(8 - 3)

= 3 + 3.33

yB = 6.33

B(3.67,6.33)


Note: 
- If you are dividing a line. The number of points is always less than the number of division.
 
    no. points = no. division - 1

    e.g.
    no. divisions = 5
    no. points = 4

- to check if your answer is correct, solve the distance of each part of the line segment by using distance formula. The sum of the distances of the parts must be equal with the distance between the endpoints of the line segment itself.


* Midpoint of a Line Segment
            - a point that divides a line segment into two equal parts.

Formula:

xM = (
x2 + x1)/2

yM(y2 + y1)/2

Where:

xM and yM = coordinates of midpoint
x1 and x2 = x-coordinates of the endpoints of the line segment.
y1 and y2 = y-coordinates of the endpoints of the line segment.

Example:

* Find the midpoint of the line. Endpoints: (3,4) and (4,6)

Given:
Let:
P1(3,4)
P2(4,6)

Required: M

Solution:

xM
(x2 + x1)/2

(3 + 4)/2 

= 7/2

xM = 3.5



yM
(x2 + x1)/2

= (4 + 6)/2

= 10/2

yM = 5

M(3.5,5)