Message Boards Message Boards

0
|
2969 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:
GROUPS:

SIgn command with dot products and vectors

Anonymous User
Anonymous User
Posted 10 years ago

How would you use the sign command with the dot product to determine whether an angle between a pair of vectors is acute right or obtuse

POSTED BY: Anonymous User
2 Replies
Posted 10 years ago

Use A dot B = |A| |B| Cos(theta) where theta is the included angle.

POSTED BY: David Keith

On uses the right hand rule: the first vector goes to the thumb, the second vector goes to the index finger, then the cross product is given perpendicular to the both as the middle finger. If one changes the sequence of the vectors, the middle finger directs to the reverse direction - move your hand, do not crash joints.

The dot product and the VectorAngle do not mark the sequence of input vectors

In[41]:= VectorAngle[ {2, -1, 1}, {3, 2, 1}] == VectorAngle[ {3, 2, 1}, {2, -1, 1}]
Out[41]= True

In[42]:= Dot[ {2, -1, 1}, {3, 2, 1}] == Dot[ {3, 2, 1}, {2, -1, 1}]
Out[42]= True

the cross product does

In[46]:= Sign[Cross[ {2, -1, 1}, {3, 2, 1}]]
Out[46]= {-1, 1, 1}

In[43]:= Sign[Cross[ {2, -1, 1}, {3, 2, 1}]] == -Sign[Cross[ {3, 2, 1}, {2, -1, 1}]]
Out[43]= True

note that there is no single sign of a vector, it really just the right hand rule.

If you want to know, whether the angle is right, use VectorAngle

In[49]:= VectorAngle[ {1, 2, 3}, {-2, 1, 0}]
Out[49]= \[Pi]/2

that's a right angle.

POSTED BY: Udo Krause
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract