It is not a bug, but a consequence of a different convention. In Sage, nullity means left nullity, i.e. the dimension of the left kernel. In this example, m.nullity() + m.rank() = m.nrows(). For the more common right nullity (resp. kernel), use m.right_nullity() (resp. m.right_kernel()) instead. Indeed, in the example m.right_nullity() returns 2.
Peter Rank-nullity theorem states that the rank and the nullity of a matrix add > up to the number of columns of a matrix. In the following example, the > matrix defined over R has 5 columns but its rank and nullity add up to 4. > Is this a bug? > > sage: m = matrix(RR,[[1,-1,2,0,3],[2,-1,3,-1,2],[3,0,3,0,6],[6,0,6,-1,9]]) > > sage: m.nullity() > > 1 > > sage: m.ncols() > > 5 > > sage: m.rank() > > 3 > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/groups/opt_out.
