Re: Non-calculus vector math

*To*: mathgroup at smc.vnet.net*Subject*: [mg75737] Re: Non-calculus vector math*From*: Szabolcs <szhorvat at gmail.com>*Date*: Wed, 9 May 2007 04:40:13 -0400 (EDT)*References*: <f1pht0$iou$1@smc.vnet.net>

On May 8, 12:03 pm, "David Rees" <w3bdevilREM... at THISw3bdevil.com> wrote: > Ahoy, > > How can I perform elementary vector math in Mathematica? From what I've > found, it's all Vector Calculus, but what about trivial/elementary vector > math? > > Things like: "Particle A with position unit-vector of (3i+6j-1k) and > velocity vector (1i-4j+5k)ms^-1 collides with Particle B 35 seconds after > moving off from its initial position, where did it collide?" > > Thanks In[1]:= i={1,0,0};j={0,1,0};k={0,0,1}; In[2]:= r0=3i+6j-k v=i-4j+5k Out[2]= {3,6,-1} Out[3]= {1,-4,5} In[4]:= r0+35v Out[4]= {38,-134,174} You don't need to assign to i, j, k but then things like dot products and cross products are more difficult to do (you need to define your own functions for them instead of using the builtins).