On Wed, Feb 4, 2015 at 1:14 AM, Chris Smith <[email protected]> wrote:

> A brief description is - the sqrt(matrix determinant) is not equal to the
>> product of the eigenvalues of matrix**(1/2).
>>
>> Could you please help a little bit in there...? Would what I am doing
>> even be mathematically correct?
>>
>
> >>> var('a:d')
> (a, b, c, d)
> >>> m=Matrix(2,2,[a,b,c,d])
> >>> m.det()
> a*d - b*c
> >>> m.eigenvals()
> {a/2 + d/2 - sqrt(a**2 - 2*a*d + 4*b*c + d**2)/2: 1, a/2 + d/2 + sqrt(a**2
> - 2*a*d + 4*b*c + d**2)/2: 1}
> >>> Mul(*_).simplify()
> a*d - b*c
>
> >>> m3=Matrix(3,3,var('x:9'))
> >>> d=m3.det()
> >>> e=Mul(*m3.eigenvals()).simplify()
> >>> d==e
> True
>
> Does someone have the identity wrong? above it appears that det(M) =
> Mul(*M.eigenvals())
>

That's a true fact. However, if the matrix is positive definite, then (by
definition) all the eigenvalues are positive, so you should be able to take
the square root on both sides. But sqrt(det(M)) !=
sqrt(eigen1)*sqrt(eigen2)*... in general, due to the fact that sqrt(x*y) !=
sqrt(x)*sqrt(y) in general.

Aaron Meurer

>  --
> You received this message because you are subscribed to the Google Groups
> "sympy" 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/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/f91aea76-e95a-4dfc-b861-06e4b2ac367f%40googlegroups.com
> <https://groups.google.com/d/msgid/sympy/f91aea76-e95a-4dfc-b861-06e4b2ac367f%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" 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/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAKgW%3D6%2BJTLNK5BoyxgyBB2PD3QGJjmWc4PRCsh-PYUaX76kRnw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to