Re: Cross product with Mathematica

• To: mathgroup at smc.vnet.net
• Subject: [mg15571] Re: Cross product with Mathematica
• 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.
>
>
> 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 ==----------
>
>
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