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.Wed, 14 Dec 2011 16:45:04 -0600solving homogeneous system of linear equationshttp://ask.sagemath.org/question/8552/solving-homogeneous-system-of-linear-equations/The system is written on the form Ax=0. I know this can be done by using, for example,
solve([eq1==0,eq2==0],x1,x2)
But this is somewhat complex. I wonder if the system can be directly solved by A.solve_right or some other simpler notation? Wed, 14 Dec 2011 02:53:03 -0600http://ask.sagemath.org/question/8552/solving-homogeneous-system-of-linear-equations/Answer by kcrisman for <p>The system is written on the form Ax=0. I know this can be done by using, for example,</p>
<p>solve([eq1==0,eq2==0],x1,x2)</p>
<p>But this is somewhat complex. I wonder if the system can be directly solved by A.solve_right or some other simpler notation? </p>
http://ask.sagemath.org/question/8552/solving-homogeneous-system-of-linear-equations/?answer=13009#post-id-13009Is this what you mean? I'm not sure, because should the zero vector be a solution for you?
sage: A = matrix([[1,2],[2,4]])
sage: A.solve_right(vector([0,0]))
(0, 0)
sage: A\vector([1,2])
(1, 0)
sage: A*vector([1,0])
(1, 2)
Or maybe you wanted this.
sage: A.right_kernel()
Free module of degree 2 and rank 1 over Integer Ring
Echelon basis matrix:
[ 2 -1]
I hope I'm not misunderstanding something here. See [this Linear Algebra quickref card](http://wiki.sagemath.org/quickref?action=AttachFile&do=get&target=quickref-linalg.pdf) for a lot more information.Wed, 14 Dec 2011 03:10:22 -0600http://ask.sagemath.org/question/8552/solving-homogeneous-system-of-linear-equations/?answer=13009#post-id-13009Comment by lainme for <p>Is this what you mean? I'm not sure, because should the zero vector be a solution for you?</p>
<pre><code>sage: A = matrix([[1,2],[2,4]])
sage: A.solve_right(vector([0,0]))
(0, 0)
sage: A\vector([1,2])
(1, 0)
sage: A*vector([1,0])
(1, 2)
</code></pre>
<p>Or maybe you wanted this.</p>
<pre><code>sage: A.right_kernel()
Free module of degree 2 and rank 1 over Integer Ring
Echelon basis matrix:
[ 2 -1]
</code></pre>
<p>I hope I'm not misunderstanding something here. See <a href="http://wiki.sagemath.org/quickref?action=AttachFile&do=get&target=quickref-linalg.pdf">this Linear Algebra quickref card</a> for a lot more information.</p>
http://ask.sagemath.org/question/8552/solving-homogeneous-system-of-linear-equations/?comment=20707#post-id-20707the right_kernel is exactly what I want. Thanks very much for your answer and the resources provided!Wed, 14 Dec 2011 16:45:04 -0600http://ask.sagemath.org/question/8552/solving-homogeneous-system-of-linear-equations/?comment=20707#post-id-20707