I am just getting started with tensor algebra using Mathematica. I could use some help with a simple problem I am starting with at my website:


An acquaintance of mine showed me how to solve this problem using the "FeynCalc" add-on to Mathematica, and his solution is also at my website:


How can I solve this problem using Mathematica without any add-on like FeynCalc, just using Mathematica's built-in tensor software?

The problem I'm having with FeynCalc is that it seems to require me to be online to some extent, even after downloading the software, whereas I would like to just work offline. Please feel free to contact me by email too, andrewthyman@gmail.com. Thanks.

  • $\begingroup$ Are you asking how to introduce tensors so you can perform computations without add-ons? $\endgroup$ Sep 11 '20 at 19:34
  • $\begingroup$ Hi disp0sable-h3r0, I am hoping that someone can write up some Mathematica code to solve the problem WITHOUT FeynCalc, just like my acquaintance did WITH FeynCalc. The problem is very simple and brief, and if I can see how it’s solved without FeynCalc, then that will help me toward solving much more complicated problems offline. $\endgroup$ Sep 11 '20 at 19:51
  • $\begingroup$ I am quite busy now to attempt the full solution. I will try when I find some time. I did write how to correctly introduce tensors without a package. Then you can think of sums and multiplications. If you cannot come up with the answer, I will try to get back as I said but I am pretty swamped $\endgroup$ Sep 11 '20 at 20:01
  • $\begingroup$ Thanks, if you can do it that would be fantastic. It’s beyond my novice abilities. I’m happy to reciprocate somehow.😊 Please feel free to use the email address I gave. Cheers, Andrew $\endgroup$ Sep 11 '20 at 20:14
  • $\begingroup$ There is some tensor documentation here that might be of use. $\endgroup$ Sep 12 '20 at 18:46

Assuming that the answer to my question in the comment is yes, the following is the flat space metric that you have in four spacetime dimensions.

metric = { {-1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1}};

The simple command

metric // MatrixForm

will show it in matrix notation. Note, however, that if you include the MatrixForm you will not be able to perform computations.

In general, tensors are lists of lists and you can perform all the usual manipulations amongst them.

If this does not help -or you want a more explicit example- please let me know.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.