GrassmannCalculus`
InteriorProduct (⊖) |
|
| | ||||
Details and Options
Examples
(1)
Basic Examples
(1)
In[1]:=
<<GrassmannCalculus`
In[2]:=
★A
These inputs are equivalent:
In[3]:=
{InteriorProduct[x,y],CircleMinus[x,y],x⊖y}
Out[3]=
{x⊖y,x⊖y,x⊖y}
The interior product is listable.
In[4]:=
u⊖{w,z}{u,v}⊖{w,z}{{u,v},{x,y}}⊖z{{u,v},{x,y}}⊖{w,z}
Out[4]=
{u⊖w,u⊖z}
Out[4]=
{u⊖w,v⊖z}
Out[4]=
{{u⊖z,v⊖z},{x⊖z,y⊖z}}
Out[4]=
{{u⊖w,v⊖w},{x⊖z,y⊖z}}
Note that the last is not a matrix product.
Some specific examples: The following two examples contract a trivector with a bivector to produce a vector.
In[5]:=
★P |
e
1
e
2
e
3
e
1
e
2
ToMetricElements |
Out[5]=
(⋀⋀)⊖(⋀)
e
1
e
2
e
3
e
1
e
2
Out[5]=
e
3
In[6]:=
(+2+3)⋀(-)⋀(a+b+)⊖⋀%//
e
1
e
2
e
3
e
2
e
3
e
1
e
2
e
3
e
1
e
2
ToMetricElements |
Out[6]=
((+2+3)⋀(-)⋀(a+b+))⊖(⋀)
e
1
e
2
e
3
e
2
e
3
e
1
e
2
e
3
e
1
e
2
Out[6]=
(1-5a+b)
e
3
The following is an example of a scalar product of two vectors.
In[7]:=
{1,1,1}.Basis⊖{1,2,3}.Basis%//
ToMetricElements |
Out[7]=
(++)⊖(+2+3)
e
1
e
2
e
3
e
1
e
2
e
3
Out[7]=
6
The following is an example of an inner product of two equal grade elements. An inner product, just as a scalar product, produces a scalar as a result.
In[8]:=
{1,1,1}.
[2]⊖{1,2,3}.
[2]%//
GradeBasis |
GradeBasis |
ToMetricElements |
Out[8]=
(⋀+⋀+⋀)⊖(⋀+2⋀+3⋀)
e
1
e
2
e
1
e
3
e
2
e
3
e
1
e
2
e
1
e
3
e
2
e
3
Out[8]=
6
Measure is an inner product of a Grassmann expression with itself.
In[9]:=
Measure |
e
1
e
2
e
1
e
3
Out[9]=
5
An interior product result is zero if the higher grade element is on the right. The interior product is not commutative.
In[10]:=
e
2
e
2
e
3
ToMetricElements |
Out[10]=
e
2
e
2
e
3
Out[10]=
0
In[11]:=
e
2
e
3
e
2
ToMetricElements |
Out[11]=
(⋀)⊖
e
2
e
3
e
2
Out[11]=
e
3
Because the interior product is not associative the following inputs are not equivalent, as can be seen by looking at the output form that shows precedence. The normal precedence is from left to right.
In[12]:=
★P |
★ |
Out[12]=
{(x⊖y)⊖z,x⊖(y⊖z)}
Out[12]=
{0,x(y⊖z)}
The routine is generally a faster alternative to .
ContractInteriorProducts
ToMetricElements
In[13]:=
★ℬ |
7
e
1
e
2
e
3
e
4
e
5
e
6
e
7
e
1
e
2
e
3
e
4
e
5
e
6
e
7
ContractInteriorProducts |
ToMetricElements |
Out[13]=
{0.124801,-3+a+2b+3c+d}
Out[13]=
{1.04521,-3+a+2b+3c+d}
|
""

