# What is the best source to learn how to use tensor operations (exterior algebra) in Mathematica?

I'm specifically interested in the TensorProduct,TensorWedge, HodgeDual and certain build in functions to do tensor arithmetic like TensorReduce, TensorExpand.

I would like to do exterior algebra calculations where I can choose to work with basis vectors as symbolic objects (and where I can choose to work without basis vectors).

To be explicit, I would like mathematica to do this input:

v = {v1, v2}; w = {w1, w2};
v\[TensorWedge]w


desired output:

(v1 w2 - v2 v1) e1 \[TensorWedge] e2


actual output (in normal form):

{{0, -v2 w1 + v1 w2}, {v2 w1 - v1 w2, 0}}


If this is not possible what source gives the best advice on how to use mathematica to deal with exterior algebra related differential geometry topics ? A simple example code, video, guide or tutorial on the wolfram site would be optimal.

• I‘d also be interested in this! Good question Jun 15, 2021 at 13:07
• For operations with basis elements your can try to look at my geometric algebra package github.com/ArturasAcus/GeometricAlgebra . The wedge operation here is implemented as OuterProduct. No operations without basis vectors, no differentiation.
– Acus
Jun 15, 2021 at 13:40

Reading the posts under the tag isn't a bad choice to learn tensor operation in Mathematica. Your specific problem can be solved as follows:

Clear[e]
\$Assumptions = {v1, v2, w1, w2} ∈ Reals;
e[i_]\[TensorWedge]e[i_] ^= 0;
e[i_]\[TensorWedge]e[j_] /; ! OrderedQ@{i, j} ^:=
Signature@{i, j} e[#]\[TensorWedge]e[#2] & @@ Sort@{i, j}

v = v1 e@1 + v2 e@2; w = w1 e@1 + w2 e@2;
Simplify@TensorExpand[v\[TensorWedge]w]
(* (-v2 w1 + v1 w2) e\[TensorWedge]e *)


The keypoint is to define the orthogonal basis e[i].

Related:

Expand wedge product

Derivative of real antisymmetric matrix in mathematica

how to define unit vectors in mathematica

There should be more.