Since the article is quite diverse in its coverage, I have tried to extract the answers that work for me:
—-
A computer scientist should have no trouble to understand what multi-dimensional arrays are: v[i] vector, m[i,j] matrix, t[i,j,k] 3rd order tensor, and so on.
—-
From a CS perspective I would explain that tensors are, indeed, multi-dimensional arrays plus a number of basic operations on them that have turned out to be very useful in a lot of applications. For example, most of the operations in a popular library as numpy can be constructed from the following building blocks (not an exhaustive list):
- Reordering of indices.
- Applying a binary operator ⋆ to arrays with equal dimensions: (A⋆B)[I]=A[I]⋆B[I].
- Free tensor product of arrays: (A⊗B)[I,J]=A[I]⋅B[J].
- Introducing additional indices of any dimension: A′[I,J]=A[I].
- Contraction of two indices with equal dimension: A′[I]=∑kA[k,k,I].
Of course, there are also some not so trivial operations on certain tensors, such as inversion or QR factorization, and so on. However, understanding how a library supports the operations above will make it much easier to understand. The often countless functions that a library offers are mostly just clever and optimized combinations of these basic operations. For example, a matrix multiplication is a combination of a free tensor product and a contraction. The trace of a square matrix is a contraction. And so on.
—-
The answer is in using multi-array, but in a specific way. By using the array dimensions to represent contravariant and covariant indices, you can effectively distinguish between different types of tensors and their corresponding transformations.
Start with
int[1,3]: This represents a 1-rank tensor with contravariant indices (row indices)
int[3,1]: This represents a 1-rank tensor with covariant indices (column indices)
Then up
int[1,3][1,3]: This represents a 2-rank tensor with contravariant indices (row indices) for both dimensions.
int[1,3][3,1]: This represents a 2-rank tensor with contravariant indices (row indices) for the first dimension and covariant indices (column indices) for the second dimension.
int[3,1][1,3]: This represents a 2-rank tensor with covariant indices (column indices) for the first dimension and contravariant indices (row indices) for the second dimension.
int[3,1][3,1]: This represents a 2-rank tensor with covariant indices (column indices) for both dimensions.
And so on for higher ranks/dimensions. (All examples use size 3, but you can have any size, and of course any type not just integers.)
This notation aligns with the mathematical representation of tensors and allows for easy interpretation of the tensor's structure and transformation properties.
—-
A computer scientist should have no trouble to understand what multi-dimensional arrays are: v[i] vector, m[i,j] matrix, t[i,j,k] 3rd order tensor, and so on.
—-
From a CS perspective I would explain that tensors are, indeed, multi-dimensional arrays plus a number of basic operations on them that have turned out to be very useful in a lot of applications. For example, most of the operations in a popular library as numpy can be constructed from the following building blocks (not an exhaustive list):
Of course, there are also some not so trivial operations on certain tensors, such as inversion or QR factorization, and so on. However, understanding how a library supports the operations above will make it much easier to understand. The often countless functions that a library offers are mostly just clever and optimized combinations of these basic operations. For example, a matrix multiplication is a combination of a free tensor product and a contraction. The trace of a square matrix is a contraction. And so on.—-
The answer is in using multi-array, but in a specific way. By using the array dimensions to represent contravariant and covariant indices, you can effectively distinguish between different types of tensors and their corresponding transformations.
Start with
int[1,3]: This represents a 1-rank tensor with contravariant indices (row indices)
int[3,1]: This represents a 1-rank tensor with covariant indices (column indices)
Then up
int[1,3][1,3]: This represents a 2-rank tensor with contravariant indices (row indices) for both dimensions.
int[1,3][3,1]: This represents a 2-rank tensor with contravariant indices (row indices) for the first dimension and covariant indices (column indices) for the second dimension.
int[3,1][1,3]: This represents a 2-rank tensor with covariant indices (column indices) for the first dimension and contravariant indices (row indices) for the second dimension.
int[3,1][3,1]: This represents a 2-rank tensor with covariant indices (column indices) for both dimensions.
And so on for higher ranks/dimensions. (All examples use size 3, but you can have any size, and of course any type not just integers.)
This notation aligns with the mathematical representation of tensors and allows for easy interpretation of the tensor's structure and transformation properties.