[Rd] transpose of complex matrices in R
rksh1 at cam.ac.uk
Fri Jul 30 12:38:51 CEST 2010
thanks for this.
On 07/30/2010 11:01 AM, peter dalgaard wrote:
> What's wrong with
>> t.complex<- function(x) t.default(Conj(x))
>> M<- matrix(rnorm(4)+1i*rnorm(4),2)
> It's not going to help with the cross products though.
> As a general matter, in my book, transpose is transpose and the other thing is called "adjoint". So another option is to use adj(A) for what you call myt(A), and then just remember to transcribe A^* to adj(A).
That's a good way to think about it. Perhaps this is one case where
thinking too literally
in terms of OO-style programming [ie wanting to overload t()] is harmful.
I didn't realize until an email just now that octave has a transpose()
function which does *not*
take the complex conjugate. You live and learn!
> I forget whether the cross products A^*A and AA^* have any special names in abstract linear algebra/functional analysis.
Well they sort of do. I'd call A^* %*% A an inner product, or possibly
an Hermitian inner product.
Would it hurt to redefine crossprod(A,B) to mean t(Conj(A)) %*% B and
tcrossprod(A,B) to A %*% t(Conj(B))?
(we could include an optional 'Hermitian' argument to crossprod() in
the complex case, defaulting to TRUE?)
Robin K. S. Hankin
University of Cambridge
19 Silver Street
Cambridge CB3 9EP
More information about the R-devel