Algebra lets us find the equations of perpendicular lines, given enough information. Using the distance formula, we can then find the length of an altitude (distance from a point to a line) and related things (like the distance between two parallel lines).