The formula
parallel if m₁ = m₂ · perpendicular if m₁ × m₂ = −1
Why it works
Slope is direction, so two lines with the same slope point the same way and never meet. Perpendicularity is less obvious: rotating a line by 90° turns a slope of m into −1/m, which is why the product of perpendicular slopes is always −1.
How to solve it by hand
- Compare the two slopes: equal means parallel
- Multiply them: −1 means perpendicular
- Otherwise the lines simply cross
- For the angle, take the arctangent of the difference over one plus the product
What is worth knowing
The −1 rule has one exception worth knowing: a vertical and a horizontal line are perpendicular, but the vertical one has no slope, so the product cannot be formed. It is the same edge case that makes the slope of a vertical line undefined rather than infinite. Parallel is also weaker than it sounds — two lines with the same slope and the same y-intercept are not parallel, they are the same line. Whether that counts as parallel is a convention that differs between textbooks, which is worth checking before an exam.