MathGroup Archive 1999

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

Search the Archive

Re: Cross product with Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg15571] Re: Cross product with Mathematica
  • From: adam.smith at hillsdale.edu
  • Date: Tue, 26 Jan 1999 13:44:48 -0500 (EST)
  • Organization: Deja News - The Leader in Internet Discussion
  • References: <7813q6$p0m@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

In article <7813q6$p0m at smc.vnet.net>,
  smoisan at total.net wrote:
> Hi,
>
> I wanted to do some calculations involving cross product over the
> weekend using Mathematica.  That's when I discovered there's no way of
> doing any cross product using this software, at least, not in the
> version we have at the univerity which is 2.2 for Solaris.  Is this
> possible in another version?
>  Is there an add-on available somewhere so I can do cross product?  Any
> help would be appreciated.
>
> Thanks in advance.
>
> Sylvain Moisan
> mailto:smoisan at total.net
> The Metal Files <http://tropin.phy.ulaval.ca/smoisan/muzac.html>
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own
>
>
You need to load a package Calculus`VectorAnalysis` to do this:

In[1]:=
  a = {a1,a2,a3}
  b = {b1,b2,b3}

Out[1]=
  {a1,a2,a3}
Out[2]=
  {b1,b2,b3}

In[3]:=
  <<Calculus`VectorAnalysis`

In[4]:=
  SetCoordinates[Cartesian[x,y,z]]
Out[4]=
  Cartesian[x,y,z]

In[5]:=
  CrossProduct[a,b]
Out[5]=
  {-a3 b2+a2 b3,a3 b1-a1 b3,-a2 b1+a1 b2)

Note in <<Calculus`VectorAnalysis`, the symbol surrounding the
VectorAnalysis is not the apostrophe (the unshifted double quote), but
is the character next to the 1 key on my keyboard (unshifted ~, I don't
know the name)

Also, Version 3 defines a function Cross[a,b] that does not require
VectorAnalysis.

Hope that helps

Adam Smith

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own



  • Prev by Date: Re: CellGroupingRules?
  • Next by Date: Re: ListDensityPlot gives PostScript error
  • Previous by thread: Re: Cross product with Mathematica
  • Next by thread: Re: your post