[sage-support] Re: Absolute value of matrices

2011-04-07 Thread Rob Beezer
On Apr 6, 8:39 pm, John Cremona wrote: > where A^* is the conjugate transpose.   You mean the "adjoint of a matrix", right? ;-) I hijacked this topic and regenerated it over on sage-devel - should have posted a link earlier: http://groups.google.com/group/sage-devel/browse_thread/thread/86329

[sage-support] Re: Absolute value of matrices

2011-04-06 Thread Keshav Kini
Indeed, this seems very reasonable. It might be better to implement it separately, though, since computing A^*A might take much longer than just squaring the elements and adding them, to get trace(A^*A). -Keshav -- To post to this group, send email to sage-support@googlegroups.com To unsubscri

[sage-support] Re: Absolute value of matrices

2011-04-06 Thread John Cremona
I agree. It makes no sense at all to me for A.abs() to return the determinant of A. For real or complex matrices it would make sense for A.abs() to be sqrt(trace(A^*A)) where A^* is the conjugate transpose. This is just the square root of the sums of the squares of the absolute values of the ent

Re: [sage-support] Re: Absolute value of matrices

2011-04-04 Thread Justin C. Walker
On Apr 4, 2011, at 15:19 , John H Palmieri wrote: > On Monday, April 4, 2011 3:00:20 PM UTC-7, pong wrote: >> >> By that I simply mean a function that on input a real matrix M returns >> the matrix N such that n[i][j] = abs(m[i][j]). >> >> This can be achieve by something like: >> >> n = le

[sage-support] Re: Absolute value of matrices

2011-04-04 Thread John H Palmieri
On Monday, April 4, 2011 3:00:20 PM UTC-7, pong wrote: > > By that I simply mean a function that on input a real matrix M returns > the matrix N such that n[i][j] = abs(m[i][j]). > > This can be achieve by something like: > > n = len(M.rows()); m =len(M.columns()); N = matrix(n,m,lambda i,j: >