On Thursday, November 7, 2013 9:00:36 AM UTC-8, ccandide wrote:
>
> I dont' understand why Sage is unable to give an exact expression for the 
> eigenvalues of the following matrix :
>
> sage: A= matrix([[0,1],[1,-2]])
> sage: [a for a,_,_ in A.eigenvectors_right()]
> [-2.414213562373095?, 0.4142135623730951?]
>

I think it is an exact expression, but it's not printed very well.

sage: b = A.eigenvectors_right()[0][0]
sage: b
-2.414213562373095?

sage: parent(b)
Algebraic Field
sage: (b+1)^2  # note no imprecision in this answer
2
sage: b == -sqrt(2) - 1
True
sage: b.degree()
2
sage: b.as_number_field_element()
(Number Field in a with defining polynomial y^2 - 2,
 a - 1,
 Ring morphism:
  From: Number Field in a with defining polynomial y^2 - 2
  To:   Algebraic Real Field
  Defn: a |--> -1.414213562373095?)

sage: b._exact_value()
a - 1 where a^2 - 2 = 0 and a in -1.414213562373095?



-- 
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.

Reply via email to