0
$\begingroup$

I'm trying to create a 3-rank tensor in numpy, with python3.x.

I need to create this 3-rank tensor A in a very particular way. If I have 3 matrices, let's say that all of them are some $Y$ matrix (which is dimensionally $4x4$), then it must be of the following mathematical form:

$A((in),(jk),(lm))$ from some type of multiplication roughly like: $"Y_{4}(i,j) \otimes Y_{4}(k,l) \otimes Y_{4}(m,n)"$. So, in a sense, I must connect the "input" of a matrix to the "output" of another identical matrix, for three identical matrices.

The final 3-rank tensor $A$ should have dimensions 16x16x16.

Mathematically, I'm not sure if this corresponds to a tensor product or a kronecker product. Obviously this makes a big difference, as in numpy for python, the functions numpy.kron() and numpy.tensordot() have different meanings.

I'd appreciate any help on this problem. I understand that this question may not exactly fit into the mathematics stack exchange, but I didn't know where else to ask, since this question deals with both mathematical and computational aspects.

So, just to clarify, my questions are:

  1. What is the difference between a tensor product and a kronecker product?
  2. How would I then create the above object? Would it require a tensor product or a kronecker product, or some combination of both?
$\endgroup$
  • $\begingroup$ What does the arguments in $A$ mean? Shouldn't there be six arguments? $\endgroup$ – Emil Dec 20 '18 at 16:45
  • $\begingroup$ so the elements mean, for some cubic tensor of the form A(a,b,c), then a = in, b = jk, and c = l*m. $\endgroup$ – MatthewSteinberg13 Dec 20 '18 at 16:49
  • $\begingroup$ Umm, so the sum is over products of indices? That does not look like a tensor to me, I usually think of a tensor as something where you sum over different terms where in each term you plug in vectors as arguments and multiply the result with the tensored duals of the arguments, or something like that. $\endgroup$ – Emil Dec 20 '18 at 16:53
  • $\begingroup$ that's because I accidentally forgot the tensor products. But this is a very general form. $\endgroup$ – MatthewSteinberg13 Dec 20 '18 at 17:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.