# Computations in the exterior algebra

I want to be able to compute with explicit exterior algebras of vector spaces. For example, given a real vector space $V$ of $3 \times 3$ matrices, I want to consider expressions of the form $v\wedge w\in \Lambda^2 V$ and would like Mathematica to understand that $v\wedge w=-w\wedge v$, and $v\wedge w+v\wedge t=v\wedge (w+t)$ etc. In particular, I want to be able to define linear operators on $\Lambda^2 V$ on a basis of decomposable elements and extend it by linearity to all elements. As an example, I would like to define an inner product $$B(x\wedge y,z\wedge w)=\langle x,y\rangle \langle z,w\rangle-\langle x,w\rangle\langle y,z\rangle$$ and have Mathematica understand that $$B(e_1\wedge e_2+e_3\wedge e_4,e_1\wedge e_2-e_3\wedge e_4)=0,$$ where $e_1,e_2,e_3,e_4\in V$ are orthonormal.

So far, my attempts were tricking Mathematica into thinking that $v\wedge w$ is the ordered pair {v,w}, but the problem is that this only makes computations work for decomposable vectors, since it thinks that $e_1\wedge e_2+e_3\wedge e_4=(e_1+e_3)\wedge (e_2+ e_4)$, i.e., {e1,e2}+{e3,e4}={e1+e3,e2+e4}, but I want to rule this out.

The command \wedge in Mathematica does not have a meaning (only makes for a nice display), and I tried using TensorWedge[,] but I can't get it to answer back results of expressions explicitly. I also gave a couple Packages a try, like "Grassmann" and "Ricci", but I feel there should be an easier way of doing this... Any thoughts?

• I don't have v9, so I'm not sure, but it looks like Normal and declaring your symbols to be vectors using $Assumptions may be what you need. Check out the example for TensorWedge here. What do you think? Nov 26, 2013 at 12:22 • I suspect that listability of Plus will play havoc with any attempt to represent the operation as an ordered List. Also, might try some ideas from the nb available here, in the section "Some noncommutative algebraic manipulation". Nov 26, 2013 at 15:27 ## 1 Answer Suppose we work with objects in some symbolic dimension dim: In:=$Assumptions = (e | e | e | e) \[Element] Vectors[dim]
&& (a | b) \[Element] Matrices[{dim, dim}, Antisymmetric[{1, 2}]];


Now we can do something like

In:= TensorRank[e\[TensorWedge]e]
Out= 2


and basic manipulations like

In:= a\[TensorWedge](a + 2 b) // TensorExpand
Out= a\[TensorWedge]a + 2 a\[TensorWedge]b

In:= e\[TensorWedge]e + e\[TensorWedge]e // TensorReduce
Out= 0

In:= a\[TensorWedge]b + a\[TensorWedge]b // TensorReduce
Out= 2 a\[TensorWedge]b


We can define your scalar product as follows:

In:= vectorQ[v_] := SameQ[TensorRank[v], 1];

In:= B[TensorWedge[v1_?vectorQ, v2_?vectorQ],
TensorWedge[v3_?vectorQ, v4_?vectorQ]] := v1.v2 v3.v4 - v1.v4 v2.v3


We also need linearity relations:

In:= B[x_Plus, y_] := B[#, y] & /@ x;
B[x_, y_Plus] := B[x, #] & /@ y;
B[c_?NumberQ x_, y_] := c B[x, y];
B[x_, c_?NumberQ y_] := c B[x, y];


Finally:

In:= B[e\[TensorWedge]e + e\[TensorWedge]e,
e\[TensorWedge]e - e\[TensorWedge]e] // TensorExpand
Out= 0


Orthonormality of the basis was not required for that. You can impose it as

In:= e /: e[i_].e[j_] := KroneckerDelta[i, j]

In:= Outer[Dot, {e, e}, {e, e}]
Out= {{1, 0}, {0, 1}}