Null space of a matrix?

756 views
Skip to first unread message

William Cauchois

unread,
Jun 6, 2009, 8:37:42 PM6/6/09
to sage-s...@googlegroups.com
Hi,

I needed to check the null space of the following matrix:

[ -2 7 ]
[ 0 0 ]

So I typed:

sage: matrix([[-2, 7], [0, 0]]).kernel()

And Sage 4.0.rc0 told me that the basis for the resultant vector space
was [0, 1]. But this does not seem correct -- [0, 1] does not even
satisfy the equation -2x_1 + 7x_2 = 0 that we can read off of the
matrix above (if we augment it with [0, 0] in our head).

So what's wrong? Is kernel() the right method to use for this? Or did
I read the result incorrectly? Or is my reasoning wrong (the
possibility that I fear most, since I have a linear algebra final on
Monday :D)?

Jason Grout

unread,
Jun 6, 2009, 8:41:03 PM6/6/09
to sage-s...@googlegroups.com


Sage returns the *left* nullspace, i.e., the solution to the equation
xA=0. You want the right nullspace; so do matrix(...).transpose().kernel().

Jason


William Cauchois

unread,
Jun 6, 2009, 8:50:56 PM6/6/09
to sage-s...@googlegroups.com
Thanks Jason!

I see that right_kernel() also works for this.

-- Bill
Reply all
Reply to author
Forward
0 new messages