ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 19 Dec 2020 20:38:38 +0100tensor_product of matrices over cyclotomic fieldhttps://ask.sagemath.org/question/54762/tensor_product-of-matrices-over-cyclotomic-field/Beginner question: I have created some matrices over a cyclotomic field and attempted to compute some of their tensor products:
N = 3
k.<w> = CyclotomicField(N)
Z = diagonal_matrix(k,N,[w^j for j in range(0,N)])
X = matrix(k,N,N,[1 if (i%N - floor(i/N)) % N == N-1 else 0 for i in range(0,N*N)])
I = identity_matrix(k,N)
I.tensor_product(X)
X.tensor_product(I)
Z.tensor_product(I)
Z.tensor_product(X)
#I.tensor_product(Z)
#X.tensor_product(Z)
If I uncomment either of the last two lines I get
> AttributeError: 'sage.matrix.matrix_generic_sparse.Matrix_generic_sparse' object has no attribute '_rational_matrix'
It seems my code is working when both matrices in the tensor product are rational or when self is non-rational, but not when self is rational and the argument is non-rational. Should I be somehow instructing sagemath to regard self as a matrix over the cyclotomic field?Will OrrickSat, 19 Dec 2020 20:38:38 +0100https://ask.sagemath.org/question/54762/Tensor Product of Two Matrices coming from Algebra Representationshttps://ask.sagemath.org/question/8100/tensor-product-of-two-matrices-coming-from-algebra-representations/Is there a command in sage to compute the tensor product of two Matrices coming from Algebra representations? In groups, x(v tensor w) = xv tensor xw, and the sage command Matrix1.tensor_product(Matrix2) appears to give the matrix corresponding to this. But in an algebra x(v tensor w) = xv tensor w + v tensor xw. How can I compute the corresponding matrix here?ChrisBergTue, 03 May 2011 11:06:56 +0200https://ask.sagemath.org/question/8100/