> I was expecting x^2 as the characteristic polynomial. What's gone
> wrong?
I believe that the characteristic polynomial of a matrix, M, is given as "det(\lambda I-M)" or something similar. In your case (a 12x12 matirx), you should expect a polynomial of degree 12. Perhaps you were thinking of the minimal polynomial?
HTH
Justin
--
Justin C. Walker
Curmudgeon-at-large
Director
Institute for the Absorption of Federal Funds
----
186,000 Miles per Second
Not just a good idea:
it's the law!
----
> Thanks Justin. My mistake... minimal_polynomial is what is required.
> Graham
And, in case you didn't know about these features of sage/python:
- if you have an object, procedure, ..., you can find out more about what is available for said item by following it with a '.' and the TAB character. The system will print out a list of possible "methods" associated to the name. If you follow the '.' with the (possible) beginning of a name, then the TAB, you get a list of "methods" with that beginning:
sage: M.=min[TAB]
min minimal_polynomial minpoly
min_cycles minimize
min_symbolic minimize_constrained
sage: M.=min
- similarly, if you follow a name with one or two '?'s, you get the documentation associated with that name (one '?') or both doc and implementation (if in python) (two '?'s). A caveat: once you type "[]"s or "()"s, the parser won't be able to determine the object in question (dynamic typing), so this doesn't work:
sage: MS=MatrixSpace(ZZ,2,2)
sage: MS.random_element().min[TAB]
(yields no output).
HTH
Justin
PS: to be clear, in the above, [TAB] means "press the tab key" (brackets are not typed).
--
Justin C. Walker, Curmudgeon-At-Large
Institute for the Enhancement of the Director's Income
--------
Experience is what you get
when you don't get what you want.
--------
I guess the "=" is a typo, isn't it? It should be "M", "." and then the tab key.
Just to avoid confusion.
Cheers,
Simon
> Justin C. Walker <justin <at> mac.com> writes:
>> sage: M.=min[TAB]
>> min minimal_polynomial minpoly
>> min_cycles minimize
>> min_symbolic minimize_constrained
>
> I guess the "=" is a typo, isn't it? It should be "M", "." and then the tab key.
Thanks for catching that. No idea where it came from, since I copy/pasted that from a Sage session in a terminal window...it's still there, without the '='.
However, and this is a quiz for preparser() experts, I do get the above results with "M.=min[TAB]" (sage-4.8). WT...?
Justin
--
Justin C. Walker, Curmudgeon-At-Large, Director
Institute for the Enhancement of the Director's Income
--------
The path of least resistance:
it's not just for electricity any more.
--------