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.Tue, 10 Jan 2023 02:10:00 +0100Matrix symbolic definition for algebrahttps://ask.sagemath.org/question/65838/matrix-symbolic-definition-for-algebra/Is there a way to define variables as matrices and then perform simplification? For instance, instead of A=var('A') being a scalar variable, can A be defined as a matrix?Mon, 09 Jan 2023 08:26:29 +0100https://ask.sagemath.org/question/65838/matrix-symbolic-definition-for-algebra/Comment by Pickle for <p>Is there a way to define variables as matrices and then perform simplification? For instance, instead of A=var('A') being a scalar variable, can A be defined as a matrix?</p>
https://ask.sagemath.org/question/65838/matrix-symbolic-definition-for-algebra/?comment=65849#post-id-65849These are similar examples of what I am thinking. Is there similar functionality in Sagemath?
https://www.diva-portal.org/smash/get/diva2:316480/FULLTEXT01.pdf
https://ieeexplore.ieee.org/document/661584Tue, 10 Jan 2023 02:10:00 +0100https://ask.sagemath.org/question/65838/matrix-symbolic-definition-for-algebra/?comment=65849#post-id-65849Answer by FrédéricC for <p>Is there a way to define variables as matrices and then perform simplification? For instance, instead of A=var('A') being a scalar variable, can A be defined as a matrix?</p>
https://ask.sagemath.org/question/65838/matrix-symbolic-definition-for-algebra/?answer=65839#post-id-65839Use the tensor algebra
sage: R = algebras.Free(QQ,['A','B','C'])
sage: A,B,C = R.gens()
sage: A*B-B*A
A*B - B*A
Mon, 09 Jan 2023 10:28:24 +0100https://ask.sagemath.org/question/65838/matrix-symbolic-definition-for-algebra/?answer=65839#post-id-65839Comment by Pickle for <p>Use the tensor algebra</p>
<pre><code>sage: R = algebras.Free(QQ,['A','B','C'])
sage: A,B,C = R.gens()
sage: A*B-B*A
A*B - B*A
</code></pre>
https://ask.sagemath.org/question/65838/matrix-symbolic-definition-for-algebra/?comment=65847#post-id-65847This is a good idea. However, it doesn't seem to allow for matrix operations like determinant and transposeTue, 10 Jan 2023 00:50:22 +0100https://ask.sagemath.org/question/65838/matrix-symbolic-definition-for-algebra/?comment=65847#post-id-65847