Gradient and Line Relationships
The gradient measures the direction and steepness of a non-vertical line. It compares vertical change with horizontal change.
Subtract the coordinates in the same order in the numerator and denominator. Reversing both differences is safe; reversing only one changes the sign.
Parallel lines have the same direction. Non-vertical parallel lines have equal gradients; distinct vertical lines are also parallel. Perpendicular lines meet at . When both gradients are defined, one is the negative reciprocal of the other.