Calculate the acute angle between two lines given their slopes.
The acute angle between two lines with slopes m₁ and m₂ is found via tan(θ) = |m₁−m₂| / |1+m₁m₂|. If 1+m₁m₂ = 0, the lines are perpendicular (90°).
Angle Between Lines
tan(θ) = |(m₁ − m₂) / (1 + m₁m₂)|
A vertical line has undefined slope. The angle between a vertical line and one with slope m is arctan(|1/m|).
Always the acute angle (≤ 90°). The obtuse angle is 180° minus the acute angle.