I am studying tensor networks and tensors. A commonly described operation is the tensor product (denoted by $\otimes$) which is a generalization of the outer product (as I understand it). It makes sense to me that the outer product of two tensors of order 1 (i.e. vectors) is a matrix (tensor of order 1+1 = 2). And I can compute it by hand by doing $v u^{\text{T}}$, which helps cement what is going on when we perform this operation.

I am trying to extend my understanding to the tensor product of a matrix and a vector. I think it should result in a tensor of order 3. But how do I actually compute it? For example, if we take a 2 by 2 matrix $A$ and take the outer product with a 2 by 1 vector $b$ I'd think what I should get is a tensor, maybe two 2 by 2 matrices (each one a "page" of the tensor). If I try to do that in MATLAB using kron I get a 4 by 2 matrix (i.e. a tensor of order 2, not 3). And I've not found any formulae that show how you would perform this by hand.

I'd appreciate any insight or hints.


1 Answer 1


I think I figured it out. Not sure why it was confusing in the first place. The following equation, from here, sums it. The expression is

$$ [A \otimes B ]_{i_1,\dots,i_r,j_1,\dots,j_s} = A_{i_1,\dots,i_r} \cdot B_{j_1,\dots,j_s} $$

If you carry this out term by term it will become apparent that the result is a 2 by 2 by 1 array where the first "page" of the array is the matrix $A$ with each term multiplied by the first element of $B$. The second page is $A$ again but multiplied by the second element of $B$ and so on. I confirmed this using ncon in MATLAB.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .