SamplePublisher`GrassmannCalculus`
GrassmannEquationRank |
|
| | ||||
Examples
(1)
Basic Examples
(1)
In[1]:=
<<GrassmannCalculus`
Create a 4 dimensional set of linear equations.
In[2]:=
SetCoordinateVectorSpace |
The following equation is only of rank 2. We will use this to illustrate how we generate a null space condition and solve for the remaining variables.
In[3]:=
step1=
[{{0,8,-8,1},{-9,29,-44,4},{9,-5,20,-1},{-3,7,-12,1}},{a,b,c,d}]
[%]
ComposeGrassmannLinearEquation |
GrassmannEquationRank |
Out[3]=
y(-8-44+20-12)+w(-9+9-3)+z(+4-+)+x(8+29-5+7)a+b+c+d
e
w
e
x
e
y
e
z
e
x
e
y
e
z
e
w
e
x
e
y
e
z
e
w
e
x
e
y
e
z
e
w
e
x
e
y
e
z
Out[3]=
2
Since this is only a rank 2 system, two Gaussian reductions leave us with a null space signified by missing equations on the left hand side.
In[4]:=
PivotGrassmannLinearEquation |
e
x
PivotGrassmannLinearEquation |
e
w
Out[4]=
72w
29
120y
29
3z
29
e
w
9w
29
44y
29
4z
29
e
x
216w
29
360y
29
9z
29
e
y
24w
29
40y
29
z
29
e
z
8b
29
e
w
b
e
x
29
5b
29
e
y
7b
29
e
z
Out[4]=
w+-+x-y+-++(-3a+b+c)+-+d
5y
3
z
24
e
w
z
8
e
x
29a
72
b
9
e
w
a
e
x
8
e
y
a
3
b
3
e
z
We extract the null equations and solve for and in terms of and . Then substitute in the right hand side.
c
d
a
b
In[5]:=
ExtractGrassmannEquation |
e
y
e
z
Out[5]=
0-3a+b+c,0-+d
a
3
b
3
Out[5]=
c3a-b,d(-a+b)
1
3
Out[5]=
w+-+x-y+(29a-8b)+
5y
3
z
24
e
w
z
8
e
x
1
72
e
w
a
e
x
8
We then move the and terms to the right hand side and the equations are in a solved form.
y
z
In[6]:=
step4=step3//
terms=Plus@@Cases[step4,y_|z_,2]#-terms&/@step4//
wxSolutions=Rule@@@
[%]/@{,}
ToGrassmannCoordinateForm |
ToGrassmannEquationForm |
ExtractGrassmannEquation |
e
w
e
x
Out[6]=
w+y-+x+z(-+3)(29a-8b)+
e
w
5
e
w
3
e
x
e
x
1
24
e
w
e
x
1
72
e
w
a
e
x
8
Out[6]=
y-+z(-+3)
5
e
w
3
e
x
1
24
e
w
e
x
Out[6]=
w+x--+++y-
e
w
e
x
29a
72
b
9
5y
3
z
24
e
w
a
8
z
8
e
x
Out[6]=
w--+,x+y-
29a
72
b
9
5y
3
z
24
a
8
z
8
Checking the solution.
In[7]:=
step1/.cdSolutions/.wxSolutions//Simplify
Out[7]=
True
In[8]:=
Clear[cdSolutions,wxSolutions]
|
""

