> This calculus is maple-right but is user-discourteous. > > M = matrix ([[a,b],[c,d]]) > 0*M = 0 with maple, and all other systems answer matrix([[0,0],[0,0]]) > > Even if you explain that for maple syntax, it's normal to get 0*A = 0 > because the right way is "evalm(0*M)", I repeat : "everyone thinks that > 0*M = matrix 0, not number 0". This 0*XYZ=0 rule isn't fine. > Only(?) an object language (as python) can treat this "multi-sens" of zero.
Yes, this is right in Sage :) > > I have an other question : how can you easily verify this theorem in > sage ? > > M = matrix([[a,b],[c,d]]) # or an nxn matrix with any parameters... > P = det (M - x*matrix ONE) # Call Cayley-Hamilton therem in France > eval (P with x=M) answers matrix([[0,0],[0,0]]). > The problem is that symbolic ring doesn't allow matrices as substitution: sage: f(x)=x sage: M [a b] [c d] sage: f(M) --------------------------------------------------------------------------- TypeError sage: f.subs(x=M) --------------------------------------------------------------------------- TypeError TypeError: no canonical coercion from Full MatrixSpace of 2 by 2 dense matrices over Symbolic Ring to Callable function ring with arguments (x,) I presume this is something which could be fixed fairly easily. > I can't evaluate matrix inside expressions. > > It was easy to do it with mupad, The choice of the right type gives the > right result in Axiom/Fricas. > > >> 5/ Some "basis" mathematics are missing in sage. [I don't yet have the > >> complete list] > > > Please let us know what basic math is not in Sage - it would be very > > important to rectify this as soon as possible. It *is* definitely > > possible that some of what you are looking for is there, but not > > optimally wrapped. > > The two first methods I don't find in sage was : > > 1/ Sum as sum(q^k, k=0..N)=(1-q^(n+1))/(1-q) and sum(x^k/k!, k=0..+oo)=e^x > This has been waiting for review for months, as whuss has a nice wrapper of the (fairly good) Maxima functionality on this. You are right that it is fairly basic and missing currently. For the second one I use .row_space().matrix().rows() and .column_space ().matrix().rows(), or whatever is appropriate. I agree that is cludgy. It would also be nice to have an automatic "orthogonal complement" or "perp" function, e.g. for getting the perp of a kernel without resorting to row/column spaces... Thanks! - kcrisman -- You received this message because you are subscribed to the Google Groups "sage-edu" group. To post to this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sage-edu?hl=.
