Let's say we have a rank 2 tensor $g_{ij}$. This is basically a list with a Depth of 2. Now I'd like to calculate another tensor


which is another list of Depth 2. For instance, to find a specific element, one would simply say


We also know that $g^{ij}$ (which I will call ginv is found by taking the inverse of $g_{ij}$, i.e. ginv=Inverse[g].

I'm having trouble defining $\Gamma$ index by index. I thought of using Array, but I can't really come up with a solution. Does anybody have any ideas?

  • $\begingroup$ Shouldn't there be also $g_{\text{kj}}$ in $\Gamma _{\text{ij}}$ definition? I think you may be interested in Artes answer for ... Ricci tensor ... in Mathematica $\endgroup$
    – Kuba
    Feb 15 '14 at 20:49
  • $\begingroup$ The definitions are not correct, and yes that's what I will try to implement eventually. For now, I was just trying to do some basic tensor math. $\endgroup$
    – cartonn
    Feb 15 '14 at 20:56
  • $\begingroup$ Actually, yes that answer has everything I wanted. I'll delete this question :) $\endgroup$
    – cartonn
    Feb 15 '14 at 20:59
  • $\begingroup$ You don't have to. It can be marked as duplicate and stay here as a road sign for future visitors. $\endgroup$
    – Kuba
    Feb 15 '14 at 20:59
  • $\begingroup$ All right then, I'll let it stay. I might post a basic answer, adapted from that other question you mentioned. Thanks! $\endgroup$
    – cartonn
    Feb 15 '14 at 21:03