Re: [R] General expression of a unitary matrix

2005-08-14 Thread Spencer Graves
Below please find functions that attempt to test for whether a matrix is unitary and special unitary (SU) and generate an SU matrix from a 3-vector and convert a 2x2 SU matrix to a 3-vector. These are not extensively debugged, so they may not be correct. However, they passed a few s

Re: [R] General expression of a unitary matrix

2005-08-14 Thread Spencer Graves
Could you provide an example that can NOT be expressed in that form? spencer graves J. Liu wrote: > Thank you, Spencer. I read through the websites you suggested. What I > need is how to parameterize a 2\times 2 unitary matrix. Generally, > since for a complex 2\times 2 matri

Re: [R] General expression of a unitary matrix

2005-08-14 Thread J. Liu
Thank you, Spencer. I read through the websites you suggested. What I need is how to parameterize a 2\times 2 unitary matrix. Generally, since for a complex 2\times 2 matrix, there are 8 free variables, and for it to be unitary, there are four constraints (unit norm and orthogonality), hence I thin

Re: [R] General expression of a unitary matrix

2005-08-13 Thread Spencer Graves
Google led me to "http://mathworld.wolfram.com/SpecialUnitaryMatrix.html";, where I learned that a "special unitary matrix" U has det(U) = 1 in addition to the "unitary matrix" requirement that U %*% t(Conj(U)) == diag(dim(U)[1]). Thus, if U is a k x k unitary mat

[R] General expression of a unitary matrix

2005-08-12 Thread J. Liu
Hi, all, Does anybody got the most general expression of a unitary matrix? I found one in the book, four entries of the matrix are: (cos\theta) exp(j\alpha); -(sin\theta)exp(j(\alpha-\Omega)); (sin\theta)exp(j(\beta+\Omega)); (cos\theta) exp(j\beta); where "j" is for complex. However, s