Linked Questions

3 votes
3 answers
7k views

Sum with Levi-Civita [duplicate]

I'm trying to write the expression $$\sum_{\alpha,\beta = 1}^{4}\epsilon_{\mu \nu\alpha\beta}a^{\nu} b^{\alpha} c^{\beta}$$ in Mathematica, where $\epsilon$ is the Levi-Civita symbol and $a$, $b$, $c$ ...
user avatar
3 votes
1 answer
966 views

Explicit Contraction of Tensor Indices [duplicate]

Is there any easy way to explicitly contract indices of several given tensors. For example, ...
jak's user avatar
  • 950
0 votes
1 answer
972 views

Contracting Levi-Civita [duplicate]

I am trying to contract two Levi-Civita symbols in tensor format like so: $\epsilon_{a b} \epsilon_{c d}$ This code generates the Levi-Civita: ...
Mark Pace's user avatar
  • 316
3 votes
1 answer
866 views

Tensor contraction for two antisymmetric tensors [duplicate]

I have SparseArray for two rank 4 antisymmetric tensors A and B, I want to compute $T_{abef}=\sum_{cd}A_{abcd}B_{efcd}$. How should I do it?
lol's user avatar
  • 687
54 votes
6 answers
46k views

How to calculate scalar curvature, Ricci tensor and Christoffel symbols in Mathematica?

I am seeking a convenient and effective way to calculate such geometric quantities. I've used packages like TensoriaCalc, but they don't work at all time. Sometimes,...
Zoe Rowa's user avatar
  • 675
73 votes
5 answers
21k views

Can Mathematica do symbolic linear algebra?

For instance, is there some way I can say "let A and B be arbitrary real $m\times n$ and $k\times m$ matrices, Simplify[Transpose[Transpose[A].Transpose[B]]]" and ...
Niki Estner's user avatar
  • 36.4k
16 votes
3 answers
7k views

How to declare a 3D vector variable?

How can I do vector calculations without telling Mathematica the vector entries? I have very many arbitrary linear combinations in $\mathbb{R}^3$ which I want to perform some general calculations on (...
Foo Bar's user avatar
  • 345
3 votes
2 answers
4k views

Using the epsilon tensor in Mathematica

I'm having a great deal of trouble getting started on a weekly homework assignment in Mathematica. The assignment requires we use the epsilon tensor which is apparently built into Mathematica as ...
Merry's user avatar
  • 85
3 votes
1 answer
2k views

Traces of products of Pauli matrices

Given a matrix $M$ of shape $2^L*2^L$, I would like to compute all the traces $\text{Tr}( M.(\sigma^{n_1}\otimes\sigma^{n_2}\otimes\ldots\otimes\sigma^{n_L})) $ for $n_1=1...4$, $n_2=1...4$, ..., $n_{...
lagoa's user avatar
  • 835
3 votes
2 answers
663 views

Tensor contraction

How do I let mathematica compute a tensor contraction like $\delta_{ab}\delta_{bc}$ with an output $\delta_{ac}$ efficiently? I tried TensorContract and TensorReduce but they were not helpful. ...
Hamurabi's user avatar
  • 199
3 votes
1 answer
557 views

Verifying the anti-symmetric tensor identity

I would like to verify ...
Physkid's user avatar
  • 680
5 votes
0 answers
1k views

Tensor product involving Levi Civita symbol

I'm working with xAct package. I've defined the tensor component values and my issue is that I want an expression involving Levi Civita symbols and tensor components, I don't know how to deal with it. ...
user25578's user avatar
  • 243
0 votes
0 answers
691 views

Symbolic tensor product calculation

I am trying to calculate the a symbolic tensor product $\langle \nabla f\otimes f,\nabla g\otimes g\rangle ^2+(\langle \nabla f\otimes g,\nabla f\otimes g\rangle +\langle \nabla g\otimes f,\nabla g\...
Zbigniew's user avatar
  • 411