On Tue, Mar 27, 2018 at 11:54 AM, Michael Orlitzky <mich...@orlitzky.com> wrote: > On 03/27/2018 12:22 PM, William Stein wrote: >> >> There are similar examples in MATLAB, involving rational numbers, >> implicit floating point, etc. >> > > Does multiplication by a positive scalar change the rank of a matrix? > Can two equal matrices have different ranks? > > (I'm willing to entertain the idea that we should give the wrong answer > because MATLAB does too.)
Sorry -- I'm not trying to flamebait you, but in order to have any further discussion, what exactly do you think a floating point number in a computer is? What is the mathematical meaning of >>> float(1) I just want to make sure, e.g., that you're aware that the set of floating point numbers with a given precision is not associative under addition (hence not a ring), so the notion of "wrong answer" is only meaningful with precise definitions. Also, in Sage, the definition of x and y being "equal" involves converting a and b under natural maps to a common parent structure, then comparing there. Assuming you have precise definitions, it's possible to answer one of your questions. > Can two equal matrices have different ranks? Yes, e.g., X = matrix(GF(3),[0]) Y = matrix(ZZ,[3]) [X == Y, X.rank(), Y.rank()] --> [True, 0, 1] There are probably similar examples with floats, where you change precision... -- William -- William (http://wstein.org) -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.