Question about complex variables
Hi All, i found something strange about complex matrices/arrays. Is it true that transposing them does not yeald the mathematically correct transpose (the signs of the imaginary part is reversed)? This leads to wrong results while calculating covariances etc .. Actually i find that things go a bit wild with complex number, is it true? Warm regards karthik ----------------------------------------------------------------------- Karthikesh Raju, email: karthik@james.hut.fi Researcher, http://www.cis.hut.fi/karthik Helsinki University of Technology, Tel: +358-9-451 5389 Laboratory of Comp. & Info. Sc., Fax: +358-9-451 3277 Department of Computer Sc., P.O Box 5400, FIN 02015 HUT, Espoo, FINLAND -----------------------------------------------------------------------
Karthik, You are making a common mistake. In Mathematics, the "transpose" of a matrix is just the matrix with the axis transposed like numarray/numeric does. What you called transpose is actually the "adjoint" or "conjugate transpose" of a matrix. Actually, this last operation (the adjoint) is the most interesting one in Linear Algebra/Functional Analysis. For more details take a look at: http://en.wikipedia.org/wiki/Conjugate_transpose http://en.wikipedia.org/wiki/Transpose In the reals both operations coincide, thus the confusion. This is the reason why matlab can use the same symbol for both operations. Now, enough Mathematics, let's go to numarray. To get the adjoint of a matrix A in numarray, you can simply do: conjugate(transpose(A)) If you want, you may define a function named adjoint to perform the above operations. Note that this creates a new matrix, not only a new view of the original matrix like "transpose" function in numarray. Hope it helps, Paulo -- Paulo José da Silva e Silva Professor Assistente do Dep. de Ciência da Computação (Assistant Professor of the Computer Science Dept.) Universidade de São Paulo - Brazil e-mail: rsilva@ime.usp.br Web: http://www.ime.usp.br/~rsilva Teoria é o que não entendemos o (Theory is something we don't) suficiente para chamar de prática. (understand well enough to call) (practice)
participants (2)
-
Karthikesh Raju
-
Paulo J. S. Silva