Max Alekseyev on Tue, 02 Apr 2024 20:31:40 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

kronecker product of matrices


Does PARI/GP provide functionality for Kronecker (tensor) products of matrices?
I could not find anything upon a quick search. 
If such functionality is missing, can it be added to future versions?

For now, I use a custom function:

{ matkron(A,B) = my(sa=matsize(A), sb=matsize(B)); matrix(sa[1]*sb[1], sa[2]*sb[2], i, j, A[(i-1)\sb[1]+1,(j-1)\sb[2]+1] * B[(i-1)%sb[1]+1,(j-1)%sb[2]+1]); }

Regards,
Max