MathGroup Archive 2007

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

Search the Archive

Re: Non-calculus vector math

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

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


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

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

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 

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


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);

(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
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