# Log Det vs Tr Log numerical discrepancy?

Posted 4 years ago
2407 Views
|
2 Replies
|
1 Total Likes
|
 Hello, I was investigating the behaviour of Mathematica with matrices, and found the following very strange fact.For the following matrix V = 5 {{0.0030, 0.0008}, {0.0008, 0.0037}} with some very nice Eigenvalues[V] {0.0211161, 0.0123839} the two ways of calculation give very different results Log[Det[V]] // FullForm -8.249076274459297 Tr[Log[V]] // FullForm -8.189689624777785I wonder what is the nature of such huge discrepancy in whats should have been equal?
2 Replies
Sort By:
Posted 4 years ago
 Note that Log threads over the matrix: In[1]:= v = {a, b, c, d} Out[1]= {a, b, c, d} In[2]:= Log[v] Out[2]= {Log[a], Log[b], Log[c], Log[d]} 
 You might want to use MatrixLog instead of Log.