Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My question is very similar to this one, but I don't know how to modify the answer for an angle not relative to the origin. It's been way to long since math class.

If I have the line that passes through two points, lets say 1,3 and 5,3, and intersects a line at 5,3 with an angle θ, how do I calculate the slope of the second line? The formula given (tan(arctan(y/x)−θ)) assumes the angle has a relation to the x axis, but I need a more general formula.

This image should illustrate the case.

I have known line, and a point at which it intersects another line. If I know the angle formed by the two lines, how can I find the slope of the second line.

enter image description here

share|cite|improve this question
Draw a picture! – David H Apr 5 '14 at 19:16
@DavidH Done. Let me know if that's clear – Tyrsius Apr 6 '14 at 0:03
up vote 1 down vote accepted

θ is given by $tan θ = | \frac {m – M} {1 + mM} |$

From θ = 100 degrees, tan θ is a known quantity H, say.

M, the slope of the line passing through (0, 10) and (10, 0) = … = –1

Therefore, $H = \frac {m + 1} {1 – m}$


$m = … = \frac {H – 1} {H + 1}$

Note: In case θ = 100 degrees, it is necessary to use the supplementary angle (80 degrees) instead to make sure that both sides are positive.

share|cite|improve this answer
Sorry, I didn't follow m-M. What is M? The slope of the first line? Is the formula m = ( tan(θ) -1) / ( tan(θ) + 1)? – Tyrsius Apr 6 '14 at 6:12
M is the slope of the line passing through (0, 10) and (10, 0). To find M, use the formula M = (0 - 10)/(10 - 0) and you get M = -1. – Mick Apr 6 '14 at 9:10
L(1), the line passing through (0, 10) and (10, 0) has a slope = M = ... =–1. L(2) is your dotted line and it has a slope = m. If L(1) and L(2) cut each other at angle θ, then the relation between (m, M, θ) is given by the formula as quoted. ‘m – M’ simply means ‘n minus M’. Since M and θ are known quantities, through that formula, we can obtain the value of m exactly like what you have quoted in your comment. You have to let θ be 80 degrees though. – Mick Apr 6 '14 at 9:27
So then I just do the same thing a second time for another 20 degrees then, to get the 100 degree line slope? – Tyrsius Apr 7 '14 at 4:21
Also, for a more general formula, is it m = ( tan(θ) + M) / ( tan(θ) - M)? – Tyrsius Apr 7 '14 at 4:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.