This is a very common stumbling block for new users. Any function that ends in Form
is for presentation purposes. What they do is wrap your expression in a way that tells the front end how to display the expression. It's best to avoid doing computations directly on the presentation form. So, when you did this
minkMetric =
{{1, 0, 0, 0},
{0, -1, 0, 0},
{0, 0, -1, 0},
{0, 0, 0, 1}} // MatrixForm
you didn't actually set minkMetric
to a 2-dimensional list, but to an expression with head MatrixForm
that itself contains a 2-dimensional list. That MatrixForm
head tells the front end to "paint a pretty form" of the matrix. You can see this explicitly using FullForm
:
minkMetric // FullForm
(* MatrixForm[List[List[1, 0, 0, 0], List[0, -1, 0, 0], List[0, 0, -1, 0], List[0, 0, 0, 1]]] *)
The idiom I use looks like this:
minkMetric =
{{1, 0, 0, 0},
{0, -1, 0, 0},
{0, 0, -1, 0},
{0, 0, 0, 1}};
minkMetric // MatrixForm
Now we've assigned the 2-dimensional structure to the symbol minkMetric
and then just displayed it in a pretty form. You can see that minkMetric
now is just a plain matrix.
minkMetric // FullForm
(* List[List[1, 0, 0, 0], List[0, -1, 0, 0], List[0, 0, -1, 0], List[0, 0, 0, 1]] *)
Now you can access the items:
minkMetric[[2, 3]]
(* 0 *)
As for your follow up question, I would need more information.