GEOMETRYCoordinate GeometryMathematics Calculator

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°.

Concept Fundamentals
tan θ = |m₂−m₁|/(1+m₁m₂)
Formula
m₁ = m₂ → 0°
Parallel
m₁·m₂ = −1 → 90°
Perpendicular
min(θ, 180°−θ)
Acute/Obtuse

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.

Key quantities
tan θ = |m₂−m₁|/(1+m₁m₂)
Formula
Key relation
m₁ = m₂ → 0°
Parallel
Key relation
m₁·m₂ = −1 → 90°
Perpendicular
Key relation
min(θ, 180°−θ)
Acute/Obtuse
Key relation

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°−θ).

Perpendicular lines satisfy m₁·m₂ = −1, so m₂ = −1/m₁.Parallel lines have identical slopes; the angle is always 0°.

Run the calculator when you are ready.

Calculate AngleEnter slopes m₁ and m₂

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: tantheta=fracm2m11+m1m2\\tan\\theta = \\frac{|m_2 - m_1|}{|1 + m_1 m_2|} 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?

Origin

The formula derives from the tangent of the difference of angles: tan(θ₂−θ₁) = (tan θ₂ − tan θ₁)/(1 + tan θ₁ tan θ₂).

Perpendicular Check

Two lines are perpendicular iff m₁·m₂ = −1. So m₂ = −1/m₁.

Parallel Check

Two lines are parallel iff m₁ = m₂. They never intersect.

Vertical Lines

A vertical line has undefined slope. The angle with a horizontal line (m=0) is 90°.

Applications

Used in computer graphics, robotics, and structural engineering to compute angles between edges.

Sign Convention

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:

tantheta=fracm2m11+m1m2\\tan\\theta = \\frac{|m_2 - m_1|}{|1 + m_1 m_2|}

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

  1. Enter the slopes m₁ and m₂ of the two lines (use "Infinity" for vertical lines).
  2. Click a sample example to auto-fill and calculate, or enter your own values.
  3. Click Calculate to compute the angle between the lines.
  4. Review the acute and obtuse angles, and the visualization.
  5. Check the step-by-step solution for the derivation.
  6. 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.

👈 START HERE
⬅️Jump in and explore the concept!
AI

Related Calculators