How to use tensors in Mathematica?

Hello everybody,
I am beginner in Mathematica. I would like to know how to use tensors in Mathematica in general relativity, i.e. when i have defined metric tensor, how to compute tensors that appear in Einstein and Maxwell equations and get exact form of both sides; lowering/uppering four-vectors, covariant derivate etc. Is it built in or is some package needed?

Thank you for any answer.

First read a bit

then ask more specific questions …

Regards
Udo.

“Tensorial Analysis” was created by Mrs.Renan Cabrera and modified by shinabe munehiro .This tensor calculus package was made for general purpose, easy to use with good looking formula display.

msh_tensorial.m (30.7 KB)
msh_tensorial20240720.nb (1.75 MB)

Marty,

The tensor calculus package cannot be downloaded. Can you please repost.

Thanks

I have attached “msh_tensorial.m” (the tensor calculus package) to my previous reply, and I am attaching it again.

msh_tensorial.m (30.7 KB)

Title: “Tensor Analysis and Calculus” msh_tensorial20241202.nb is a notebook file created for beginners to help them understand introductory books on tensors.
The “msh_tensorial.wl” package is easy to use with good-looking mathematical expressions.

msh_tensorial.wl (36.2 KB)
msh_tensorial20241202 .nb (4.39 MB)

Happy New Year. I will upload the latest version. If you have any comments or advice, please feel free to reply.

msh_tensorial.wl (37.6 KB)
msh_tensorial20250102.nb (6.36 MB)

“Tensorial Analysis” was originally developed by Renan Cabrera and later modified by Munehiro Shinabe (shinabe.munehiro@hotmail.co.jp). This tensor calculus package is designed for beginners and is well-suited for studying in reference to standard textbooks. Its beautifully formatted equations follow the notation commonly used in academic texts.
Last updated: September 27, 2025

P.S.: I have also attached reference materials for self-study.

New msh_tensorial20250927.nb (17.5 MB)
msh_tensorial.wl (40.4 KB)

With the release of version 14.3, examples using the new functions FindShortestCurve and ShortestCurveDistance have been added."

msh_tensorial.wl (43.8 KB)
msh_tensorial20251031.nb (19.1 MB)