Angle Between Lines
The angle θ between two lines with slopes m₁ and m₂ satisfies tan θ = |m₂−m₁|/(1+m₁m₂). Parallel lines (m₁=m₂) have angle 0°; perpendicular lines (m₁·m₂=−1) have angle 90°.
Did our AI summary help? Let us know.
Perpendicular lines satisfy m₁·m₂ = −1, so m₂ = −1/m₁. Parallel lines have identical slopes; the angle is always 0°. The formula derives from the tangent-of-difference identity.
Ready to run the numbers?
Why: Finding the angle between lines is essential in geometry, construction, robotics, and computer graphics. The slope-based formula avoids needing explicit line equations.
How: Use tan θ = |m₂−m₁|/(1+m₁m₂). For vertical lines, enter 'Infinity'. The acute angle is min(θ, 180°−θ).
Run the calculator when you are ready.
Line Slopes
For educational and informational purposes only. Verify with a qualified professional.
🧮 Fascinating Math Facts
tan θ = |m₂−m₁|/(1+m₁m₂) for slopes m₁, m₂.
— Coordinate Geometry
Perpendicular: m₁·m₂ = −1. Example: m₁=2, m₂=−½.
— Example
Key Takeaways
- • Formula: for slopes m₁, m₂
- • Parallel lines (m₁ = m₂) → angle 0°
- • Perpendicular lines (m₁·m₂ = -1) → angle 90°
- • The acute angle is the smaller of θ and 180° − θ
- • Vertical lines have undefined (infinite) slope
Did You Know?
The formula derives from the tangent of the difference of angles: tan(θ₂−θ₁) = (tan θ₂ − tan θ₁)/(1 + tan θ₁ tan θ₂).
Two lines are perpendicular iff m₁·m₂ = −1. So m₂ = −1/m₁.
Two lines are parallel iff m₁ = m₂. They never intersect.
A vertical line has undefined slope. The angle with a horizontal line (m=0) is 90°.
Used in computer graphics, robotics, and structural engineering to compute angles between edges.
The formula uses absolute values, so the angle is always between 0° and 90° (acute) or 90° and 180° (obtuse).
Understanding the Formula
For two lines with slopes m₁ and m₂, the angle θ between them satisfies:
Then θ = arctan(tan θ). The acute angle is min(θ, 180° − θ).
Expert Tips
Quick Perpendicular
If m₁ = 2, then m₂ = −½ makes them perpendicular. Always m₂ = −1/m₁.
Parallel = Same Slope
For parallel lines, just ensure m₁ = m₂. The angle is always 0°.
Vertical Line
Enter 'Infinity' or 'inf' for a vertical line's slope.
45° Angle
When one slope is 0 and the other is 1 (or −1), the angle is 45°.
Frequently Asked Questions
What is the angle between perpendicular lines?
90°. Perpendicular lines satisfy m₁·m₂ = −1.
What is the angle between parallel lines?
0°. Parallel lines have the same slope (m₁ = m₂).
How do I enter a vertical line?
Use 'Infinity', 'inf', or '∞' for the slope of a vertical line.
Why do we use absolute values?
The formula gives the magnitude of the angle. We take |m₂−m₁| and |1+m₁m₂| to get a positive angle.
What if both lines are vertical?
Two vertical lines are parallel, so the angle is 0°.
Can the angle be greater than 90°?
Yes. The formula can yield θ > 90°. We also report the acute angle (smaller) and obtuse angle (larger).
How is this used in real life?
In construction, robotics, and graphics to find angles between walls, robot arms, or edges.
How to Use This Calculator
- Enter the slopes m₁ and m₂ of the two lines (use "Infinity" for vertical lines).
- Click a sample example to auto-fill and calculate, or enter your own values.
- Click Calculate to compute the angle between the lines.
- Review the acute and obtuse angles, and the visualization.
- Check the step-by-step solution for the derivation.
- Use Copy Results to share your answer.
Disclaimer: This calculator is for educational use. For vertical lines, enter "Infinity" or "inf". Results may have minor rounding.
Related Calculators
Angle Between Planes Calculator
Angle Between Planes Calculator - Calculate and learn about coordinate-geometry concepts
MathematicsIntersection Of Two Lines Calculator
Intersection Of Two Lines Calculator - Calculate and learn about coordinate-geometry concepts
MathematicsLines To Line Distance Calculator
Lines To Line Distance Calculator - Calculate and learn about coordinate-geometry concepts
MathematicsCentroid Calculator
Centroid Calculator - Calculate and learn about coordinate-geometry concepts
MathematicsEndpoint Calculator
Endpoint Calculator - Calculate and learn about coordinate-geometry concepts
MathematicsGradient Calculator
Gradient Calculator - Calculate and learn about coordinate-geometry concepts
Mathematics