ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 12 Nov 2013 22:57:16 -0600Tensor Product of Two Matrices coming from Algebra Representationshttp://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 04:06:56 -0500http://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>
http://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".Tue, 12 Nov 2013 22:51:06 -0600http://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>
http://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 16:50:26 -0500http://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>
http://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?Tue, 12 Nov 2013 22:54:20 -0600http://ask.sagemath.org/question/8100/tensor-product-of-two-matrices-coming-from-algebra-representations/?comment=16714#post-id-16714Comment 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>
http://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 ....Tue, 12 Nov 2013 22:57:16 -0600http://ask.sagemath.org/question/8100/tensor-product-of-two-matrices-coming-from-algebra-representations/?comment=16713#post-id-16713