1
$\begingroup$

Are there any conventions as to how indices should be ordered when refering to an element of a multidimensional array?

To take two examples:

  1. A 3-dimensional array: I have $J$ objects (data.frames) each with $N$ rows and $K$ columns. How to refer to elements of that array?
  2. I have a matrix that contains (theoretical) covariances between each of the elements $a_{ij;1}$ (where this index order is also subject to my question) of some 2-dimensional array $A_1$ with each of the elements $a_{ij;k}$ of other 2-dimensional arrays (including itself) $A_1, A_2, \dots, A_K$. How would I name such an element. Is there a convention? Something like this? $$ s_{ij1;ijk'}$$
$\endgroup$

1 Answer 1

1
$\begingroup$

For the first one, typical convention would either be $x_{jnk}$ or $x_{nkj}$. For the second one, your notation seems fine, it is an extension of the (common) row-column-third dimension convention.

In general, once you hit specific needs for conventions that aren't common, you make your own convention, trying to base yourself on existing ones for simpler cases such as the 3D ones, and explain a bit so as to be clear to your reader. If you're asking the question, chances are that when one reads your work, they will also be asking themselves "what does this mean?".

So for example, for your second example, one would say : $s_{ij1;ijk'}$, is the covariance between the element at row $i$ and column $j$ of $A_1$ and the element at the same row and column of $A_k'$. That'll make your intent clear.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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