When I first learned of Mathematica and started to use it, I soon discovered that Mathematica supported subscripted and superscripted variables such as $M_{i j}$. Naively, I first thought that I could refer to a matrix element merely by specifying it's row and column indices such as $me_{1 2}$ or whatever for a matrix named $me$.
But, that is not the case, the notation for such elements is using the Part function or the $[[row]][[col]]$ notation.
Further, as I started a self-study of General Relativity, I thought about using scripted (sub or super) variables in Mathematica to manipulate tensor equations. Not so easy and I thought it would be automatic. I have since downloaded a few tensor calculus packages and find that they did not make use of subscripts or superscripts.
Therefore, since what I few are the obvious uses of subscripting and superscripting variables in Mathematica are not being used, just why is this notation supported. Or, maybe I am missing something and there is a big area of usage I am not aware of.
I do admit that among the ilk of this forum I must consider myself still a beginner as a user of Mathematica.
[[row]][[column]]
can be written more succinctly as[[row, column]]
. As far as displaying subscripts and superscripts look at Format $\endgroup$Subscript
to behave likePart
, just defineSubscript[m_, i__] := Part[m, i]
, then it works as expected e.g.M = RandomReal[1, {4, 4}]; Subscript[M, 2, 3]
. I'm not familiar with general relativity, but I think what you need to do is similar. $\endgroup$