Calculate Angle between Two Intersecting Line Segments

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
4
down vote

favorite












Need some help/direction, haven't had trig in several decades.



On a 2 dimensional grid, I have two line segments.



The first line Segment always starts at the origin (0,0), and extends to (1,0) along the X axis.



The second line Segment intersects the first at the origin, and can extend to potentially anywhere within (-1,-1) to (1,1).



I need to always calculate the angle to the right of the first segment...



If this is already addressed in another post, please comment me the link.



UPDATE



I will have a single input of (x,y) for the end of the 2nd segment...



so segment A would be (0,0) -> (1,0) and segment B would be (0,0) -> (x,y) where (x,y) can be anywhere inside (-1,-1) and (1,1) assuming that the scale is 0.1.



Let me know If I can provide any additional information that will help.



UPDATE



OK... assuming that the first segment is running along the Y axis... $A(0,0)$ and $B(0,1)$



And the second segment is running from $A(0,0)$ to $C(.4,.4)$ with a scale of .2....



$$theta= tan^-1dfrac.4.4= 45$$



If I change C to $C(.4,-.4)$ I get.



$$theta= tan^-1dfrac.4-.4= -45$$



Do I have to manually compensate for the quadrant because this seems to calculate based specifically on the axis... I would expect the 2nd one to come up as 135 degrees from the positive Y Axis...



What am I missing?



Just for posterity...



If I had $C(-0.4,-0.1)$ I would expect the result for the angle from the positive Y axis to this line segment to be roughly 255 degrees...



$$theta= tan^-1dfrac.4-.1= 75.9637$$



Plus 180 from starting at the positive Y axis....







share|cite|improve this question






















  • Are you taking as input a pair of coordinates? Like, (1,5), for example?
    – turkeyhundt
    Jan 9 '15 at 15:22






  • 2




    Does angel = angle? So as it extends along X axis, you are using $(y, x)$ rather than $(x, y) $ coordinates?
    – servabat
    Jan 9 '15 at 15:23











  • Thanks for pointing it out... I've updated it.
    – Patrick
    Jan 9 '15 at 15:28










  • You should try and learn Latex if you are going to use this site. It is the formatting standard everyone goes by.
    – Wintermute
    Jan 9 '15 at 15:40










  • @mtiano yeah.. I tried using it for Pi.. and it doesn't want to play nice.
    – Patrick
    Jan 9 '15 at 16:00














up vote
4
down vote

favorite












Need some help/direction, haven't had trig in several decades.



On a 2 dimensional grid, I have two line segments.



The first line Segment always starts at the origin (0,0), and extends to (1,0) along the X axis.



The second line Segment intersects the first at the origin, and can extend to potentially anywhere within (-1,-1) to (1,1).



I need to always calculate the angle to the right of the first segment...



If this is already addressed in another post, please comment me the link.



UPDATE



I will have a single input of (x,y) for the end of the 2nd segment...



so segment A would be (0,0) -> (1,0) and segment B would be (0,0) -> (x,y) where (x,y) can be anywhere inside (-1,-1) and (1,1) assuming that the scale is 0.1.



Let me know If I can provide any additional information that will help.



UPDATE



OK... assuming that the first segment is running along the Y axis... $A(0,0)$ and $B(0,1)$



And the second segment is running from $A(0,0)$ to $C(.4,.4)$ with a scale of .2....



$$theta= tan^-1dfrac.4.4= 45$$



If I change C to $C(.4,-.4)$ I get.



$$theta= tan^-1dfrac.4-.4= -45$$



Do I have to manually compensate for the quadrant because this seems to calculate based specifically on the axis... I would expect the 2nd one to come up as 135 degrees from the positive Y Axis...



What am I missing?



Just for posterity...



If I had $C(-0.4,-0.1)$ I would expect the result for the angle from the positive Y axis to this line segment to be roughly 255 degrees...



$$theta= tan^-1dfrac.4-.1= 75.9637$$



Plus 180 from starting at the positive Y axis....







share|cite|improve this question






















  • Are you taking as input a pair of coordinates? Like, (1,5), for example?
    – turkeyhundt
    Jan 9 '15 at 15:22






  • 2




    Does angel = angle? So as it extends along X axis, you are using $(y, x)$ rather than $(x, y) $ coordinates?
    – servabat
    Jan 9 '15 at 15:23











  • Thanks for pointing it out... I've updated it.
    – Patrick
    Jan 9 '15 at 15:28










  • You should try and learn Latex if you are going to use this site. It is the formatting standard everyone goes by.
    – Wintermute
    Jan 9 '15 at 15:40










  • @mtiano yeah.. I tried using it for Pi.. and it doesn't want to play nice.
    – Patrick
    Jan 9 '15 at 16:00












up vote
4
down vote

favorite









up vote
4
down vote

favorite











Need some help/direction, haven't had trig in several decades.



On a 2 dimensional grid, I have two line segments.



The first line Segment always starts at the origin (0,0), and extends to (1,0) along the X axis.



The second line Segment intersects the first at the origin, and can extend to potentially anywhere within (-1,-1) to (1,1).



I need to always calculate the angle to the right of the first segment...



If this is already addressed in another post, please comment me the link.



UPDATE



I will have a single input of (x,y) for the end of the 2nd segment...



so segment A would be (0,0) -> (1,0) and segment B would be (0,0) -> (x,y) where (x,y) can be anywhere inside (-1,-1) and (1,1) assuming that the scale is 0.1.



Let me know If I can provide any additional information that will help.



UPDATE



OK... assuming that the first segment is running along the Y axis... $A(0,0)$ and $B(0,1)$



And the second segment is running from $A(0,0)$ to $C(.4,.4)$ with a scale of .2....



$$theta= tan^-1dfrac.4.4= 45$$



If I change C to $C(.4,-.4)$ I get.



$$theta= tan^-1dfrac.4-.4= -45$$



Do I have to manually compensate for the quadrant because this seems to calculate based specifically on the axis... I would expect the 2nd one to come up as 135 degrees from the positive Y Axis...



What am I missing?



Just for posterity...



If I had $C(-0.4,-0.1)$ I would expect the result for the angle from the positive Y axis to this line segment to be roughly 255 degrees...



$$theta= tan^-1dfrac.4-.1= 75.9637$$



Plus 180 from starting at the positive Y axis....







share|cite|improve this question














Need some help/direction, haven't had trig in several decades.



On a 2 dimensional grid, I have two line segments.



The first line Segment always starts at the origin (0,0), and extends to (1,0) along the X axis.



The second line Segment intersects the first at the origin, and can extend to potentially anywhere within (-1,-1) to (1,1).



I need to always calculate the angle to the right of the first segment...



If this is already addressed in another post, please comment me the link.



UPDATE



I will have a single input of (x,y) for the end of the 2nd segment...



so segment A would be (0,0) -> (1,0) and segment B would be (0,0) -> (x,y) where (x,y) can be anywhere inside (-1,-1) and (1,1) assuming that the scale is 0.1.



Let me know If I can provide any additional information that will help.



UPDATE



OK... assuming that the first segment is running along the Y axis... $A(0,0)$ and $B(0,1)$



And the second segment is running from $A(0,0)$ to $C(.4,.4)$ with a scale of .2....



$$theta= tan^-1dfrac.4.4= 45$$



If I change C to $C(.4,-.4)$ I get.



$$theta= tan^-1dfrac.4-.4= -45$$



Do I have to manually compensate for the quadrant because this seems to calculate based specifically on the axis... I would expect the 2nd one to come up as 135 degrees from the positive Y Axis...



What am I missing?



Just for posterity...



If I had $C(-0.4,-0.1)$ I would expect the result for the angle from the positive Y axis to this line segment to be roughly 255 degrees...



$$theta= tan^-1dfrac.4-.1= 75.9637$$



Plus 180 from starting at the positive Y axis....









share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Jan 9 '15 at 16:40

























asked Jan 9 '15 at 15:19









Patrick

1213




1213











  • Are you taking as input a pair of coordinates? Like, (1,5), for example?
    – turkeyhundt
    Jan 9 '15 at 15:22






  • 2




    Does angel = angle? So as it extends along X axis, you are using $(y, x)$ rather than $(x, y) $ coordinates?
    – servabat
    Jan 9 '15 at 15:23











  • Thanks for pointing it out... I've updated it.
    – Patrick
    Jan 9 '15 at 15:28










  • You should try and learn Latex if you are going to use this site. It is the formatting standard everyone goes by.
    – Wintermute
    Jan 9 '15 at 15:40










  • @mtiano yeah.. I tried using it for Pi.. and it doesn't want to play nice.
    – Patrick
    Jan 9 '15 at 16:00
















  • Are you taking as input a pair of coordinates? Like, (1,5), for example?
    – turkeyhundt
    Jan 9 '15 at 15:22






  • 2




    Does angel = angle? So as it extends along X axis, you are using $(y, x)$ rather than $(x, y) $ coordinates?
    – servabat
    Jan 9 '15 at 15:23











  • Thanks for pointing it out... I've updated it.
    – Patrick
    Jan 9 '15 at 15:28










  • You should try and learn Latex if you are going to use this site. It is the formatting standard everyone goes by.
    – Wintermute
    Jan 9 '15 at 15:40










  • @mtiano yeah.. I tried using it for Pi.. and it doesn't want to play nice.
    – Patrick
    Jan 9 '15 at 16:00















Are you taking as input a pair of coordinates? Like, (1,5), for example?
– turkeyhundt
Jan 9 '15 at 15:22




Are you taking as input a pair of coordinates? Like, (1,5), for example?
– turkeyhundt
Jan 9 '15 at 15:22




2




2




Does angel = angle? So as it extends along X axis, you are using $(y, x)$ rather than $(x, y) $ coordinates?
– servabat
Jan 9 '15 at 15:23





Does angel = angle? So as it extends along X axis, you are using $(y, x)$ rather than $(x, y) $ coordinates?
– servabat
Jan 9 '15 at 15:23













Thanks for pointing it out... I've updated it.
– Patrick
Jan 9 '15 at 15:28




Thanks for pointing it out... I've updated it.
– Patrick
Jan 9 '15 at 15:28












You should try and learn Latex if you are going to use this site. It is the formatting standard everyone goes by.
– Wintermute
Jan 9 '15 at 15:40




You should try and learn Latex if you are going to use this site. It is the formatting standard everyone goes by.
– Wintermute
Jan 9 '15 at 15:40












@mtiano yeah.. I tried using it for Pi.. and it doesn't want to play nice.
– Patrick
Jan 9 '15 at 16:00




@mtiano yeah.. I tried using it for Pi.. and it doesn't want to play nice.
– Patrick
Jan 9 '15 at 16:00










2 Answers
2






active

oldest

votes

















up vote
0
down vote













In fact, you want to know the angle between the $x$ axis and any line going through the origin $(0,0)$ and a point $A (x_a,y_a)$, with $-1 leq x_a,y_a leq 1?$



This is fairly easy. Since there are two angles between two lines, you said you wanted the "right angle", that is, the one to the right hand side of the $x$ axis.



If $x_a times y_a<0$, $theta= tan^-1dfracy_ax_a$



If $x_a=0$, $theta=dfracpi2$



If $x_atimes y_a>0$, $theta= tan^-1dfracy_ax_a-pi$






share|cite|improve this answer




















  • Yes... you appear to know what I want more so than I do... Let me verify everything and I'll select answer.
    – Patrick
    Jan 9 '15 at 15:33











  • You can also use $theta = cos^-1left(fracxsqrtx^2+y^2 right)$ for example, as it will also work when $x = 0$
    – servabat
    Jan 9 '15 at 15:42











  • I ran (-.4, -.4) through the bottom formula and got -64.9 Degrees... that doesn't seem right to me... if the first part is running along the X axis.... I would expect a positive answer between 90 and 180 degrees... what am I missing?
    – Patrick
    Jan 9 '15 at 15:52










  • @Patrick First, angle are negative when counting them down... (that is, clockwise). Second, did you substract $pi$ or $180°$?
    – Martigan
    Jan 9 '15 at 15:54










  • OK... I can handle the negative... I subtracted by Pi
    – Patrick
    Jan 9 '15 at 15:56


















up vote
0
down vote













Not sure EXACTLY what you are asking, but I will answer this to the best of my ability. If you could include a visual that would greatly help me.



When we have two intersecting line segments like this



enter image description here



finding any single value (a, c, b, d) will reveal all other values. For example, if we have the value of a, then c = a, and we have (in degrees) b = d = 180-a.



Therefore, I can equip with the tools to find the angle between two vectors, as you have given. For example, we can treat the first vector as you have said as $[1, 0]$ and the second vector as $[1, 1]$. We take the dot product between them, which just means that we multiply the corresponding values and sum them up, or $<a, b> = sumlimits_i = 1^na_ib_i$ where $n$ is the number of elements in the vector. We use the geometric fact that $<a, b> = |a||b|cos(theta_a, b)$ where $|a|$ means its norm or magnitude (I only deal with standard inner product and norm here). This gives us that the dot product, which is $1$, is equal to $sqrt2cos(theta)$, which means $cos(theta) = frac1sqrt2$



This in turn gives us that the angle between these two is 45 degrees, and we can figure out the adjacent angle as 135, and the vertical angles all share the same degrees.






share|cite|improve this answer




















    Your Answer




    StackExchange.ifUsing("editor", function ()
    return StackExchange.using("mathjaxEditing", function ()
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    );
    );
    , "mathjax-editing");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "69"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f1097779%2fcalculate-angle-between-two-intersecting-line-segments%23new-answer', 'question_page');

    );

    Post as a guest






























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    In fact, you want to know the angle between the $x$ axis and any line going through the origin $(0,0)$ and a point $A (x_a,y_a)$, with $-1 leq x_a,y_a leq 1?$



    This is fairly easy. Since there are two angles between two lines, you said you wanted the "right angle", that is, the one to the right hand side of the $x$ axis.



    If $x_a times y_a<0$, $theta= tan^-1dfracy_ax_a$



    If $x_a=0$, $theta=dfracpi2$



    If $x_atimes y_a>0$, $theta= tan^-1dfracy_ax_a-pi$






    share|cite|improve this answer




















    • Yes... you appear to know what I want more so than I do... Let me verify everything and I'll select answer.
      – Patrick
      Jan 9 '15 at 15:33











    • You can also use $theta = cos^-1left(fracxsqrtx^2+y^2 right)$ for example, as it will also work when $x = 0$
      – servabat
      Jan 9 '15 at 15:42











    • I ran (-.4, -.4) through the bottom formula and got -64.9 Degrees... that doesn't seem right to me... if the first part is running along the X axis.... I would expect a positive answer between 90 and 180 degrees... what am I missing?
      – Patrick
      Jan 9 '15 at 15:52










    • @Patrick First, angle are negative when counting them down... (that is, clockwise). Second, did you substract $pi$ or $180°$?
      – Martigan
      Jan 9 '15 at 15:54










    • OK... I can handle the negative... I subtracted by Pi
      – Patrick
      Jan 9 '15 at 15:56















    up vote
    0
    down vote













    In fact, you want to know the angle between the $x$ axis and any line going through the origin $(0,0)$ and a point $A (x_a,y_a)$, with $-1 leq x_a,y_a leq 1?$



    This is fairly easy. Since there are two angles between two lines, you said you wanted the "right angle", that is, the one to the right hand side of the $x$ axis.



    If $x_a times y_a<0$, $theta= tan^-1dfracy_ax_a$



    If $x_a=0$, $theta=dfracpi2$



    If $x_atimes y_a>0$, $theta= tan^-1dfracy_ax_a-pi$






    share|cite|improve this answer




















    • Yes... you appear to know what I want more so than I do... Let me verify everything and I'll select answer.
      – Patrick
      Jan 9 '15 at 15:33











    • You can also use $theta = cos^-1left(fracxsqrtx^2+y^2 right)$ for example, as it will also work when $x = 0$
      – servabat
      Jan 9 '15 at 15:42











    • I ran (-.4, -.4) through the bottom formula and got -64.9 Degrees... that doesn't seem right to me... if the first part is running along the X axis.... I would expect a positive answer between 90 and 180 degrees... what am I missing?
      – Patrick
      Jan 9 '15 at 15:52










    • @Patrick First, angle are negative when counting them down... (that is, clockwise). Second, did you substract $pi$ or $180°$?
      – Martigan
      Jan 9 '15 at 15:54










    • OK... I can handle the negative... I subtracted by Pi
      – Patrick
      Jan 9 '15 at 15:56













    up vote
    0
    down vote










    up vote
    0
    down vote









    In fact, you want to know the angle between the $x$ axis and any line going through the origin $(0,0)$ and a point $A (x_a,y_a)$, with $-1 leq x_a,y_a leq 1?$



    This is fairly easy. Since there are two angles between two lines, you said you wanted the "right angle", that is, the one to the right hand side of the $x$ axis.



    If $x_a times y_a<0$, $theta= tan^-1dfracy_ax_a$



    If $x_a=0$, $theta=dfracpi2$



    If $x_atimes y_a>0$, $theta= tan^-1dfracy_ax_a-pi$






    share|cite|improve this answer












    In fact, you want to know the angle between the $x$ axis and any line going through the origin $(0,0)$ and a point $A (x_a,y_a)$, with $-1 leq x_a,y_a leq 1?$



    This is fairly easy. Since there are two angles between two lines, you said you wanted the "right angle", that is, the one to the right hand side of the $x$ axis.



    If $x_a times y_a<0$, $theta= tan^-1dfracy_ax_a$



    If $x_a=0$, $theta=dfracpi2$



    If $x_atimes y_a>0$, $theta= tan^-1dfracy_ax_a-pi$







    share|cite|improve this answer












    share|cite|improve this answer



    share|cite|improve this answer










    answered Jan 9 '15 at 15:31









    Martigan

    4,384714




    4,384714











    • Yes... you appear to know what I want more so than I do... Let me verify everything and I'll select answer.
      – Patrick
      Jan 9 '15 at 15:33











    • You can also use $theta = cos^-1left(fracxsqrtx^2+y^2 right)$ for example, as it will also work when $x = 0$
      – servabat
      Jan 9 '15 at 15:42











    • I ran (-.4, -.4) through the bottom formula and got -64.9 Degrees... that doesn't seem right to me... if the first part is running along the X axis.... I would expect a positive answer between 90 and 180 degrees... what am I missing?
      – Patrick
      Jan 9 '15 at 15:52










    • @Patrick First, angle are negative when counting them down... (that is, clockwise). Second, did you substract $pi$ or $180°$?
      – Martigan
      Jan 9 '15 at 15:54










    • OK... I can handle the negative... I subtracted by Pi
      – Patrick
      Jan 9 '15 at 15:56

















    • Yes... you appear to know what I want more so than I do... Let me verify everything and I'll select answer.
      – Patrick
      Jan 9 '15 at 15:33











    • You can also use $theta = cos^-1left(fracxsqrtx^2+y^2 right)$ for example, as it will also work when $x = 0$
      – servabat
      Jan 9 '15 at 15:42











    • I ran (-.4, -.4) through the bottom formula and got -64.9 Degrees... that doesn't seem right to me... if the first part is running along the X axis.... I would expect a positive answer between 90 and 180 degrees... what am I missing?
      – Patrick
      Jan 9 '15 at 15:52










    • @Patrick First, angle are negative when counting them down... (that is, clockwise). Second, did you substract $pi$ or $180°$?
      – Martigan
      Jan 9 '15 at 15:54










    • OK... I can handle the negative... I subtracted by Pi
      – Patrick
      Jan 9 '15 at 15:56
















    Yes... you appear to know what I want more so than I do... Let me verify everything and I'll select answer.
    – Patrick
    Jan 9 '15 at 15:33





    Yes... you appear to know what I want more so than I do... Let me verify everything and I'll select answer.
    – Patrick
    Jan 9 '15 at 15:33













    You can also use $theta = cos^-1left(fracxsqrtx^2+y^2 right)$ for example, as it will also work when $x = 0$
    – servabat
    Jan 9 '15 at 15:42





    You can also use $theta = cos^-1left(fracxsqrtx^2+y^2 right)$ for example, as it will also work when $x = 0$
    – servabat
    Jan 9 '15 at 15:42













    I ran (-.4, -.4) through the bottom formula and got -64.9 Degrees... that doesn't seem right to me... if the first part is running along the X axis.... I would expect a positive answer between 90 and 180 degrees... what am I missing?
    – Patrick
    Jan 9 '15 at 15:52




    I ran (-.4, -.4) through the bottom formula and got -64.9 Degrees... that doesn't seem right to me... if the first part is running along the X axis.... I would expect a positive answer between 90 and 180 degrees... what am I missing?
    – Patrick
    Jan 9 '15 at 15:52












    @Patrick First, angle are negative when counting them down... (that is, clockwise). Second, did you substract $pi$ or $180°$?
    – Martigan
    Jan 9 '15 at 15:54




    @Patrick First, angle are negative when counting them down... (that is, clockwise). Second, did you substract $pi$ or $180°$?
    – Martigan
    Jan 9 '15 at 15:54












    OK... I can handle the negative... I subtracted by Pi
    – Patrick
    Jan 9 '15 at 15:56





    OK... I can handle the negative... I subtracted by Pi
    – Patrick
    Jan 9 '15 at 15:56











    up vote
    0
    down vote













    Not sure EXACTLY what you are asking, but I will answer this to the best of my ability. If you could include a visual that would greatly help me.



    When we have two intersecting line segments like this



    enter image description here



    finding any single value (a, c, b, d) will reveal all other values. For example, if we have the value of a, then c = a, and we have (in degrees) b = d = 180-a.



    Therefore, I can equip with the tools to find the angle between two vectors, as you have given. For example, we can treat the first vector as you have said as $[1, 0]$ and the second vector as $[1, 1]$. We take the dot product between them, which just means that we multiply the corresponding values and sum them up, or $<a, b> = sumlimits_i = 1^na_ib_i$ where $n$ is the number of elements in the vector. We use the geometric fact that $<a, b> = |a||b|cos(theta_a, b)$ where $|a|$ means its norm or magnitude (I only deal with standard inner product and norm here). This gives us that the dot product, which is $1$, is equal to $sqrt2cos(theta)$, which means $cos(theta) = frac1sqrt2$



    This in turn gives us that the angle between these two is 45 degrees, and we can figure out the adjacent angle as 135, and the vertical angles all share the same degrees.






    share|cite|improve this answer
























      up vote
      0
      down vote













      Not sure EXACTLY what you are asking, but I will answer this to the best of my ability. If you could include a visual that would greatly help me.



      When we have two intersecting line segments like this



      enter image description here



      finding any single value (a, c, b, d) will reveal all other values. For example, if we have the value of a, then c = a, and we have (in degrees) b = d = 180-a.



      Therefore, I can equip with the tools to find the angle between two vectors, as you have given. For example, we can treat the first vector as you have said as $[1, 0]$ and the second vector as $[1, 1]$. We take the dot product between them, which just means that we multiply the corresponding values and sum them up, or $<a, b> = sumlimits_i = 1^na_ib_i$ where $n$ is the number of elements in the vector. We use the geometric fact that $<a, b> = |a||b|cos(theta_a, b)$ where $|a|$ means its norm or magnitude (I only deal with standard inner product and norm here). This gives us that the dot product, which is $1$, is equal to $sqrt2cos(theta)$, which means $cos(theta) = frac1sqrt2$



      This in turn gives us that the angle between these two is 45 degrees, and we can figure out the adjacent angle as 135, and the vertical angles all share the same degrees.






      share|cite|improve this answer






















        up vote
        0
        down vote










        up vote
        0
        down vote









        Not sure EXACTLY what you are asking, but I will answer this to the best of my ability. If you could include a visual that would greatly help me.



        When we have two intersecting line segments like this



        enter image description here



        finding any single value (a, c, b, d) will reveal all other values. For example, if we have the value of a, then c = a, and we have (in degrees) b = d = 180-a.



        Therefore, I can equip with the tools to find the angle between two vectors, as you have given. For example, we can treat the first vector as you have said as $[1, 0]$ and the second vector as $[1, 1]$. We take the dot product between them, which just means that we multiply the corresponding values and sum them up, or $<a, b> = sumlimits_i = 1^na_ib_i$ where $n$ is the number of elements in the vector. We use the geometric fact that $<a, b> = |a||b|cos(theta_a, b)$ where $|a|$ means its norm or magnitude (I only deal with standard inner product and norm here). This gives us that the dot product, which is $1$, is equal to $sqrt2cos(theta)$, which means $cos(theta) = frac1sqrt2$



        This in turn gives us that the angle between these two is 45 degrees, and we can figure out the adjacent angle as 135, and the vertical angles all share the same degrees.






        share|cite|improve this answer












        Not sure EXACTLY what you are asking, but I will answer this to the best of my ability. If you could include a visual that would greatly help me.



        When we have two intersecting line segments like this



        enter image description here



        finding any single value (a, c, b, d) will reveal all other values. For example, if we have the value of a, then c = a, and we have (in degrees) b = d = 180-a.



        Therefore, I can equip with the tools to find the angle between two vectors, as you have given. For example, we can treat the first vector as you have said as $[1, 0]$ and the second vector as $[1, 1]$. We take the dot product between them, which just means that we multiply the corresponding values and sum them up, or $<a, b> = sumlimits_i = 1^na_ib_i$ where $n$ is the number of elements in the vector. We use the geometric fact that $<a, b> = |a||b|cos(theta_a, b)$ where $|a|$ means its norm or magnitude (I only deal with standard inner product and norm here). This gives us that the dot product, which is $1$, is equal to $sqrt2cos(theta)$, which means $cos(theta) = frac1sqrt2$



        This in turn gives us that the angle between these two is 45 degrees, and we can figure out the adjacent angle as 135, and the vertical angles all share the same degrees.







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Jul 6 '17 at 16:09









        Charlie Tian

        9110




        9110



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f1097779%2fcalculate-angle-between-two-intersecting-line-segments%23new-answer', 'question_page');

            );

            Post as a guest













































































            這個網誌中的熱門文章

            How to combine Bézier curves to a surface?

            Mutual Information Always Non-negative

            Why am i infinitely getting the same tweet with the Twitter Search API?