the midpoint of the two points and is

the distance between two points and is

two lines are parallel if their gradients are equal

two lines are perpendicular if their gradients multiply to get -1