1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How to find a vector orthogonal to a line

  1. Sep 6, 2010 #1
    I have two (two dimentional) linear equations (in the plane). and i am required to find out the angle between them. I have found the solution somewhere.
    the solution uses two vectors orthogal to the two lines.
    The problem now i have is: How to determine those orthogonal vectors?

    e.g: two equations are: 3x + y = 5 and 2x - y =4

    Now the solution goes like this:

    n1 = 3i + j and n2 = 2i - j.
    Then the angle between them is found out by using Dot product. This is the required angle.
    How did they determine n1 and n2?
    Last edited: Sep 6, 2010
  2. jcsd
  3. Sep 6, 2010 #2


    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    Look at the coefficients of x and y in an equation and compare them to the corresponding normal vector.
  4. Sep 6, 2010 #3
    I’m confused on your approach.

    Do you know these facts about vectors, if so it should be fairly easy:

    a dot b = a1b1 + a2b2 + ....

    theta = cos-1( [a dot b]/[|a||b|])

    the cross product gives you a normal vector

    A line can be represented as: <x,y> = <a,b> + tv where (a,b) is on your line and v is the same direction as the line. v is easy to find: If A = (x1, y1) and B = (x2,y2) are both on your linen the v = <x1 - x2, y1 - y2>

    How i would do your problem, find the direction vector of each line. Then use that property of the dot product i posted.
    Last edited: Sep 7, 2010
  5. Sep 7, 2010 #4


    User Avatar
    Homework Helper

    I think that you're thinking too hard, write the equations as y=mx+c, m is the tangent of the angle that the line makes with the x-axis. So to find the angle made by both of them, take the arctan of the gradient and then just subtract these two angles to get your answer.
  6. Sep 7, 2010 #5


    User Avatar
    Science Advisor

    As Hunt_Mat says, you can rewrite 3x + y = 5 and 2x - y =4 as y= -3x+ 5 and y= 2x- 4 seeing that the slopes are -3 and 2 respectively. I would NOT, however, take the arctan of each to find the angles! Remember the simplest introduction to slope: "rise/run". Slope -3 tells you "if x increases by 1 then y decreases by 3" which corresponds to the vector <1, -3>. Similarly, slope 2 tells you "if x increases by 1 then y increases by 2" which corresponds to the vector <1, 2>.

    Those are NOT the vectors given because they are vectors in the direction of the lines, not orthogonal to them. But you can use the "dot product" as you suggest: if a vector orthogonal to <1, -3> is given by <a, b> then we must have <1, -3>.<a, b>= a- 3b= 0. From that, a= 3b so if we take b= 1, a= 3- an orthogonal vector is <3, 1>. Similarly, if <a, b> is orthogonal to <1, 2> we must have <1, 2>.<a, b>= a+2b= 0 or a= -2b. Taking b= 1, a= -2 so an orthogonal vector is <-2, 1>. Those are the two vectors you give.

    However, if the original problem was to find the angle between the two lines, I cannot imagine why they have chosen to use orthogonal vectors! The simplest way to do it is to just use the angle in the direction of the lines, <1, -3> and <1, 2>. [itex]u\cdot v= |u||v|cos(\theta)[/itex] which here gives
    [tex]1(1)+ (-3)(2)= 1- 6= -5= \sqrt{1+ 9}\sqrt{1+ 4}cos(\theta)[/tex]
    [tex]= \sqrt{50}cos(\theta)= 5\sqrt{2} cos(\theta)[/itex].

    That is, [itex]cos(\theta)= \frac{-5}{5\sqrt{2}}= -\frac{1}{\sqrt{2}}[/itex] and it should be easy to get the angle from that. Of course, if l and m are lines, l' is perpendicular to l, m' is perpendicular to m, then the angle between l' and m' is exactly the same as the angle between l and m. The two methods give the same answer- I just don't see why one should go to the trouble of finding the orthogonal vectors when it is not necessary.
  7. Sep 8, 2010 #6


    User Avatar
    Homework Helper

    Or what you could do, is calculate the point at which they intersect, call this point (x,y), choose a>x (you are free to choose a, it could be x+1 for example), and consider the point (a,2a-4). Construct the nornal to y=2x-4 at this point and exanine where this intersects the line y=-3x+5, call this point (c,d).

    What you have done is created a right angled triangle from the two lines that you want to find the angle of intersection of. let l_1 be the distance from (x,y) to (a,2a-4) (you can compute this easily) and let l_2 be the distance from (a,2a-4) and (c,d), then is theta is the angle between the two lines, you know that:
    \tan\theta =\frac{l_{1}}{l_{2}}
    This method is somewhat long winded but it avoids the use of vectors and is quite clear geometrically. Food for thought.
  8. Sep 19, 2010 #7
    I thank all of you for your precious guidance. This topic is now very much clear to me now. Love you all.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook