10
$\begingroup$

I'm trying to figure out this problem and feel like it's something that must be so simple that I could've done in high school no problem, but for some reason my brain is frozen this morning. I would really appreciate any help, and want to say thanks in advance. I tried to draw a picture below; I want to find the slope of a line given a point $(x,y)$ and $\theta$.

enter image description here

4 Answers 4

10

$\tan \left( \tan^{-1}\left(\frac{y}{x}\right) - \theta\right)$ is the slope $m$.

Then use "point slope formula" (if you want an equation of the line, that is...)

$y-y_1 = m(x - x_1)$


For variety, I'll explain.

Labeling the origin "$O$" and the point $(x, y)$ "$P$", the segment $\overline{OP}$ makes an angle of $\tan^{-1} \left(\frac{y}{x}\right)$ with the positive x-axis. But this is the sum of $\theta$ and the angle $\phi$ that your line makes with the positive x-axis (since we have opposite interior angles).

So $\tan^{-1}\left(\frac{y}{x}\right) - \theta = \phi$.

Finally, $\tan \phi = m$.

  • 0
    Thanks for such quick answers. I think I'm still confused about, what if x is 0?2012-02-04
  • 0
    If X is 0, arctan(y/x) is 90 degrees. Thus, the formula turns out to be tan(90-$\theta$). You can think of it as pivoted at the Y axis at the point (0,y). Now, as you change $\theta$ from 0 to 90, the angle of the slope of your line changes from inf (Line parallel to X axis) to 0 (Y axis).2012-02-04
  • 0
    If $x=0$, then consider $m = \tan (90- \theta)$2012-02-04
  • 0
    Thanks again, sorry one more question, just to clarify... so, if x is 0, how do we compute arctan(y/x) without dividing by zero?2012-02-04
  • 0
    Ah, sorry. I maybe should have said, I'm trying to write code to do this, and it looks like there's an "atan2" function that checks for a special case like this. Thanks again2012-02-04
  • 0
    From how I see it, you can approach it asymptotically and state that arctan(y/x) is 90. You could have a certain eps ball around 0 which has 90 as its atan.2012-02-04
  • 1
    @all-too-human: In fact, atan2 is usually the primitive that the hardware can compute, and runtime libraries then implement the classical atan function as $\mathrm{atan2}(x,1)$.2012-02-04
  • 0
    To obtain $\overline{OP}$, type \overline{OP} in math mode.2015-07-04
5

Another method: If you know the exterior angle theorem, you know that The exterior angle is the sum of remote interior angles thus:

$ \tan^{-1}\frac{y}{x} = \theta + $ unknown angle

thus,

$ \tan^{-1}\frac{y}{x} - \theta = $ unknown angle

$ \tan(\tan^{-1}\frac{y}{x} - \theta )= \tan( $unknown angle) $$ \tan(\tan^{-1}\frac{y}{x} - \theta )= Slope$$

-1

The slope is given by the change in y for a given change in x. From trig, you have that the tangent of an angle in a right triangle is the measure of the side of the triangle opposite the angle divided by the measure of the side adjacent to the angle (not the hypotenuse). See diagram.

Then you have $$ \tan\theta = \frac{\Delta y}{\Delta x} $$ which is the slope of the line.

-1

find slope of the line you know as m1. m2 will be the slope of the unknown line and Ө the angle. The eqn tan(Ө) = (m2 - m1)/ (1 + (m1*m2))

  • 0
    Sorry I am not sure how your answer actually answers the question on the top.2018-06-12