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, 19 Nov 2013 14:05:08 +0100linear matrix equationhttps://ask.sagemath.org/question/10752/linear-matrix-equation/I want to solve the following equation for a matrix solution X:
'A*X*B == C'
# in general, they are rectangular with dimensions:
# A m-by-n, B p-by-q, and hence, X n-by-p, C m-by-q
# for simplicity, assume: they are all n-by-n square matrices
Are there any tools in SAGE (or Numpy/Scipy, Fortran, ...) for solving equations of this type?
Thanks in advance!Tue, 19 Nov 2013 04:20:46 +0100https://ask.sagemath.org/question/10752/linear-matrix-equation/Comment by Shashank for <p>I want to solve the following equation for a matrix solution X:</p>
<pre><code>'A*X*B == C'
# in general, they are rectangular with dimensions:
# A m-by-n, B p-by-q, and hence, X n-by-p, C m-by-q
# for simplicity, assume: they are all n-by-n square matrices
</code></pre>
<p>Are there any tools in SAGE (or Numpy/Scipy, Fortran, ...) for solving equations of this type?</p>
<p>Thanks in advance!</p>
https://ask.sagemath.org/question/10752/linear-matrix-equation/?comment=16678#post-id-16678Are A, B and C square matrices?Tue, 19 Nov 2013 13:35:18 +0100https://ask.sagemath.org/question/10752/linear-matrix-equation/?comment=16678#post-id-16678Comment by gundamlh for <p>I want to solve the following equation for a matrix solution X:</p>
<pre><code>'A*X*B == C'
# in general, they are rectangular with dimensions:
# A m-by-n, B p-by-q, and hence, X n-by-p, C m-by-q
# for simplicity, assume: they are all n-by-n square matrices
</code></pre>
<p>Are there any tools in SAGE (or Numpy/Scipy, Fortran, ...) for solving equations of this type?</p>
<p>Thanks in advance!</p>
https://ask.sagemath.org/question/10752/linear-matrix-equation/?comment=16677#post-id-16677It can be solved by applying tensor product of A and B, and vectorization of X and C, but it is only a direct method, inefficient. I guess there would already be a good numerical toolbox for this problem? Let's assume all matrices square, have you ever come across with a similar problem?Tue, 19 Nov 2013 14:05:08 +0100https://ask.sagemath.org/question/10752/linear-matrix-equation/?comment=16677#post-id-16677