Results 1 to 10 of 10

Thread: Deriving a straight line equation from its slope and distance from origin

  1. #1
    New Member
    Join Date
    Nov 2015
    Posts
    4

    Deriving a straight line equation from its slope and distance from origin

    Hello everyone.
    The only data I have about a straight line is its slope and distance from origin.
    I know that it's easy to use slope to obtain the angular coefficient m if I want line in the form y + mx +c.
    Anyway, I still have no idea about how to find y-intercept c.
    Do you know how I could do that?
    Alternatively, do you know another way to get line's equation starting from slope and distance?

    Thanks for help.

  2. #2
    Elite Member
    Join Date
    Jun 2007
    Posts
    17,186
    Quote Originally Posted by ubisum View Post
    Hello everyone.
    The only data I have about a straight line is its slope and distance from origin.
    I know that it's easy to use slope to obtain the angular coefficient m if I want line in the form y + mx +c.
    Anyway, I still have no idea about how to find y-intercept c.
    Do you know how I could do that?
    Alternatively, do you know another way to get line's equation starting from slope and distance?

    Thanks for help.
    I am assuming that means - perpendicular distance from the origin.

    If that is the case - draw sketch of a line with x-intercept = a and y-intercept = b

    m = tan(180 - Θ) = -b/a

    Drop a perpendicular from the origin (O) to the line - intersecting at P. We know OP = k (given distance)

    and continue .....
    “... mathematics is only the art of saying the same thing in different words” - B. Russell

  3. #3
    New Member
    Join Date
    Nov 2015
    Posts
    4
    Quote Originally Posted by Subhotosh Khan View Post

    I am assuming that means - perpendicular distance from the origin.

    If that is the case - draw sketch of a line with x-intercept = a and y-intercept = b

    m = tan(180 - Θ) = -b/a

    Drop a perpendicular from the origin (O) to the line - intersecting at P. We know OP = k (given distance)

    and continue .....

    Thanks for answer.
    would you explain better how to derive intercept on Y axis, starting from OP distance?

  4. #4
    Full Member
    Join Date
    Aug 2014
    Posts
    385
    Alright so, if you know the slope of the line, and Subhotosh Khan is correct that by "distance from the origin" you actually mean "perpendicular distance from the origin," then let's look at how to find the y-intercept. One form of a line is: Ax + By + C = 0. If you know the slope, then you know A and B (Remember: the slope is A/B), and the only unknown is the y-intercept, or C. Now you also know the perpendicular distance from the origin. The perpendicular distance from a line to a point (m, n) is:

    [tex]d=\frac{\left|Am+Bn+C\right|}{\sqrt{A^2+B^2}}[/tex]

    Plugging in (0,0) as the point, we get:

    [tex]d=\frac{\left|C\right|}{\sqrt{A^2+B^2}}[/tex]

    As established, you know A and B, so solve for C using the known distance d.

  5. #5
    Elite Member
    Join Date
    Feb 2004
    Location
    Ottawa, Ontario
    Posts
    16,810
    Always easier (I find) if you set one up for yourself...
    Got a ruler, pencil, eraser and graph paper?

    Draw straight line intersecting x-axis at B(15,0), y-axis at A(0,20).
    Make origin C(0,0).
    Place point P on AB, such that CP is perpendicular to AB.
    This means CP = 12.

    Slope of AB = (20 - 0)/ (0 - 15) = -4/3

    So your problem becomes:
    Straight line AB has slope -4/3.
    It's distance from origin is 12.

    Now you have a CLEAR way to determine y-intercept = 20.
    Figure it out, then you can apply your method to any similar problem.
    OK?
    I'm just an imagination of your figment !

  6. #6
    Elite Member
    Join Date
    Feb 2004
    Location
    Ottawa, Ontario
    Posts
    16,810
    Btw, there will always be 2 possible y-intercepts.
    I'm just an imagination of your figment !

  7. #7
    Elite Member
    Join Date
    Jul 2014
    Posts
    3,386
    Quote Originally Posted by Denis View Post
    Btw, there will always be 2 possible y-intercepts.
    Corresponding to the negative y intercept of
    C = [tex]\pm\, d\, * \sqrt{s^2\, +\, 1}[/tex]
    where s is the slope of the original line -s x + y + C = 0.

    EDIT: Change dumb misteak of s to the proper -s in the equation for the line.
    Last edited by Ishuda; 11-18-2015 at 12:49 AM.

    -Ishuda

  8. #8
    Elite Member
    Join Date
    Feb 2004
    Location
    Ottawa, Ontario
    Posts
    16,810
    Quote Originally Posted by Ishuda View Post
    Corresponding to the negative y intercept of
    C = [tex]\pm\, d\, * \sqrt{s^2\, +\, 1}[/tex]
    where s is the slope of the original line s x + y + C = 0.
    Agree. If slope negative, endpoints of distance line are in
    1st and 3rd quadrants, if positive, then in 2nd and 4th.

    The axes crossing points are:
    (a,0), (0,b) and (-a,0), (0,-b) : slope negative
    (b,0), (0,a) and (-b,0), (0,-a) : slope positive

    ...a symmetrical beauty
    I'm just an imagination of your figment !

  9. #9
    New Member
    Join Date
    Nov 2015
    Posts
    4
    Thanks everyone for answering.
    My professor suggested me a solution. He wrote it to me by mail, so I can't tell you how he derived it.
    Given the couple <rho, theta>, where rho is the distance from origin and theta is the angle between the line and X axis, he told me to derive line's coefficents acconding to the following formulae:

    a = cos(theta)
    b = sin(theta)
    c = -rho

    Using this coefficients, I derived that line must certainly pass through points A(-c/a, 0) and B(0, -c/b).
    I should handle cases when a or b are equal to zero, but at the moment I'm just performing a test.

    Do you think all this makes sense?

  10. #10
    New Member
    Join Date
    Nov 2015
    Posts
    4
    Quote Originally Posted by Ishuda View Post
    Corresponding to the negative y intercept of
    C = [tex]\pm\, d\, * \sqrt{s^2\, +\, 1}[/tex]
    where s is the slope of the original line -s x + y + C = 0.

    EDIT: Change dumb misteak of s to the proper -s in the equation for the line.
    I divided the expression under the root operator by [tex]B^2[/tex] and I got [tex]B\sqrt{s^2+1}[/tex]. What happened to [tex]B^2[/tex] in your calculations?

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •