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.Wed, 13 Nov 2013 05:57:16 +0100Tensor 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?Tue, 03 May 2011 11:06:56 +0200https://ask.sagemath.org/question/8100/tensor-product-of-two-matrices-coming-from-algebra-representations/Comment by gundamlh for <p>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?</p>
https://ask.sagemath.org/question/8100/tensor-product-of-two-matrices-coming-from-algebra-representations/?comment=16715#post-id-16715What you need is perhaps "tensor sum", "Kronecker sum".Wed, 13 Nov 2013 05:51:06 +0100https://ask.sagemath.org/question/8100/tensor-product-of-two-matrices-coming-from-algebra-representations/?comment=16715#post-id-16715Answer by vdelecroix for <p>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?</p>
https://ask.sagemath.org/question/8100/tensor-product-of-two-matrices-coming-from-algebra-representations/?answer=13893#post-id-13893Hi,
If M1 is your first matrix (of dimension n1) and M2 is your second matrix (of dimension n2), then the answer should be:
M1.tensor_product(identity_matrix(n2)) +
identity_matrix(n1).tensor_product(M2)
VincentFri, 03 Aug 2012 23:50:26 +0200https://ask.sagemath.org/question/8100/tensor-product-of-two-matrices-coming-from-algebra-representations/?answer=13893#post-id-13893Comment by gundamlh for <p>Hi,</p>
<p>If M1 is your first matrix (of dimension n1) and M2 is your second matrix (of dimension n2), then the answer should be:</p>
<pre><code>M1.tensor_product(identity_matrix(n2)) +
identity_matrix(n1).tensor_product(M2)
</code></pre>
<p>Vincent</p>
https://ask.sagemath.org/question/8100/tensor-product-of-two-matrices-coming-from-algebra-representations/?comment=16713#post-id-16713but this command is too long.. we have to write a my_function or the function "tensor_sum" is already implemented in some packages, such as maxima, Scipy ....Wed, 13 Nov 2013 05:57:16 +0100https://ask.sagemath.org/question/8100/tensor-product-of-two-matrices-coming-from-algebra-representations/?comment=16713#post-id-16713Comment by gundamlh for <p>Hi,</p>
<p>If M1 is your first matrix (of dimension n1) and M2 is your second matrix (of dimension n2), then the answer should be:</p>
<pre><code>M1.tensor_product(identity_matrix(n2)) +
identity_matrix(n1).tensor_product(M2)
</code></pre>
<p>Vincent</p>
https://ask.sagemath.org/question/8100/tensor-product-of-two-matrices-coming-from-algebra-representations/?comment=16714#post-id-16714M1 "tensor_sum" M2 = eye(n2) "tensor_product" M1 + eye(n1) "tensor_product" M2 .. the tensor product operation is not commutative, I guess. Hence, identity_matrix(n2).tensor_product(M1) + M2.tensor_product(identity_matrix(n1)) , or?Wed, 13 Nov 2013 05:54:20 +0100https://ask.sagemath.org/question/8100/tensor-product-of-two-matrices-coming-from-algebra-representations/?comment=16714#post-id-16714