GrassmannCalculus`
ComposeScalarProductMatrix |
|
| | ||||
Details and Options
Examples
(1)
Basic Examples
(1)
In[1]:=
<<GrassmannCalculus`
Consider the following inner product in a 3-space:
In[2]:=
★A;X=(x⋀y⋀z)⊖(u⋀v⋀w);
Applying to gives a matrix of scalar products.
ComposeScalarProductMatrix
X
In[3]:=
XM=
[X];MatrixForm[M]
ComposeScalarProductMatrix |
Out[3]=
x⋀y⋀z⊖u⋀v⋀w
Out[3]//MatrixForm=
x⊖u | x⊖v | x⊖w |
y⊖u | y⊖v | y⊖w |
z⊖u | z⊖v | z⊖w |
In[4]:=
detM=Det[M]
Out[4]=
-(x⊖w)(y⊖v)(z⊖u)+(x⊖v)(y⊖w)(z⊖u)+(x⊖w)(y⊖u)(z⊖v)-(x⊖u)(y⊖w)(z⊖v)-(x⊖v)(y⊖u)(z⊖w)+(x⊖u)(y⊖v)(z⊖w)
You could also arrive at the same expansion by using .
ToScalarProducts
In[5]:=
X1=
[X]
ToScalarProducts |
Out[5]=
-(u⊖z)(v⊖y)(w⊖x)+(u⊖y)(v⊖z)(w⊖x)+(u⊖z)(v⊖x)(w⊖y)-(u⊖x)(v⊖z)(w⊖y)-(u⊖y)(v⊖x)(w⊖z)+(u⊖x)(v⊖y)(w⊖z)
This is the same as if we order the inner products, or we could compare them by using .
detM
GrassmannSimplify
In[6]:=
detM/.ip_CircleMinus
[ip]
[detMX1]
OrderInner |
★ |
Out[6]=
-(u⊖z)(v⊖y)(w⊖x)+(u⊖y)(v⊖z)(w⊖x)+(u⊖z)(v⊖x)(w⊖y)-(u⊖x)(v⊖z)(w⊖y)-(u⊖y)(v⊖x)(w⊖z)+(u⊖x)(v⊖y)(w⊖z)
Out[6]=
True
You can also use with inner products in which the 1-elements are more complicated.
ComposeScalarProductMatrix
In[7]:=
★A;X=⋀(s+t)⊖(u+2v)⋀(x⋀y)⊖z-⊖v;
e
1
w
2
In[8]:=
ComposeScalarProductMatrix |
Out[8]//MatrixForm=
e 1 | e 1 w 2 |
(s+t)⊖(u+2v) | (s+t)⊖(x⋀y⊖(z- w 2 |
You can compose with placeholders instead of 1-elements. But you will need to fill in the placeholders with 1-element expressions before your elements can be considered Grassmann expressions. (This is because the placeholder is usually reserved for general expression input).
In[9]:=
X=
⋀(s+t)⊖u⋀x⋀y⊖z-⊖
;
|
w
2
|
In[10]:=
ComposeScalarProductMatrix |
Out[10]//MatrixForm=
⊖u | ⊖(x⋀y⊖(z- w 2 |
(s+t)⊖u | (s+t)⊖(x⋀y⊖(z- w 2 |
ComposeScalarProductMatrix generates the scalar product form of the metric matrix.
In[11]:=
DeclareMetric |
In[12]:=
e
1
e
2
e
3
e
1
e
2
e
3
ComposeScalarProductMatrix |
ToMetricElements |
Out[12]=
e
1
e
2
e
3
e
1
e
2
e
3
Out[12]//MatrixForm=
e 1 e 1 | e 1 e 2 | e 1 e 3 |
e 2 e 1 | e 2 e 2 | e 2 e 3 |
e 3 e 1 | e 3 e 2 | e 3 e 3 |
Out[12]//MatrixForm=
g 1,1 | g 1,2 | g 1,3 |
g 1,2 | g 2,2 | g 2,3 |
g 1,3 | g 2,3 | g 3,3 |
|
""

