MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Non-calculus vector math

  • To: mathgroup at smc.vnet.net
  • Subject: [mg75712] Re: [mg75668] Non-calculus vector math
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Wed, 9 May 2007 04:26:30 -0400 (EDT)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <200705080952.FAA18614@smc.vnet.net>
  • Reply-to: murray at math.umass.edu

Since a vector in Mathematica may be represented by a list, such vector 
algebra is just adding lists and multiplying lists by numbers.  So you 
can work your problem essentially the same way you would with paper and 
pencil (except that you use braces to enclose a list instead of

Easy:

   x0 = {3,6,-1}; v = 1000{1,-4,5};
   x0 + 35 v
{35003,-139994,174999}

Or, if you'd like to use units:

   <<Units`  (* load package *)
   x0 = {3, 6, -1}; v = {1, -4, 5}/SI[Milli Second];
   x0 + 35 Second v
{35003,-139994,174999}

In both cases, there was no actual need to give names to the initial 
position position or velocity; I used names only in order to clarify 
what was being done.  (You might also introduce a name for the time, say 
t1.)

Notice that the above did not use the x i + y j + z k format. If you 
want that, you can do it.  Start with

   {i,j,k}={{1,0,0},{0,1,0},{0,0,1}};

or, in Mathematica 6.0:

   {i, j, k} = UnitVector[3, #] & /@ {1, 2, 3};

(Probably you would not want to usurp the letters i,j,k for this, since 
they are so useful as counters, so it would be a better idea to use, 
say, DoubleStruckI, DoubleStruckJ, DoubleStruckK.  I cannot display 
those in this plain-text message without going to Unicode, so I'm not 
using them.)

Then instead of the above you could calculate:

   x0=3i+6j-k; v=1000(i-4j+5k);
   x0+35v

(or you could again do it with units).  With a bit more work, you could 
display the result in the x i + y j + z k form.

David Rees 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 
> 
> 
> 

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305


  • Prev by Date: elliptic integral
  • Next by Date: Re: Re: Pi upto a Billion Digits
  • Previous by thread: Non-calculus vector math
  • Next by thread: Re: Non-calculus vector math