Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How to compute logarithm of orthogonal matrix?

  1. Jul 21, 2009 #1
    Suppose [itex]X\in\mathbb{R}^{n\times n}[/itex] is orthogonal. How do you perform the computation of series

    [tex]
    \log(X) = (X-1) - \frac{1}{2}(X-1)^2 + \frac{1}{3}(X-1)^3 - \cdots
    [/tex]

    Elements of individual terms are

    [tex]
    ((X-1)^n)_{ij} = (-1)^n\delta_{ij} \;+\; n(-1)^{n-1}X_{ij} \;+\; \sum_{k=2}^{n} (-1)^{n-k} \frac{n!}{k!(n-k)!} X_{il_1} X_{l_1 l_2} \cdots X_{l_{k-1}j}
    [/tex]

    but these do not seem very helpful. I don't see how orthogonality could be used here. By orthogonality we have

    [tex]
    X_{ik}X_{jk} = \delta_{ij},\quad\quad X_{ki}X_{kj} = \delta_{ij}
    [/tex]

    but

    [tex]
    X_{ik}X_{kj}
    [/tex]

    is nothing special, right?

    The special case [itex]n=2[/itex] would also be nice to start with. If

    [tex]
    X = \left(\begin{array}{cc}
    \cos(\theta) & -\sin(\theta) \\
    \sin(\theta) & \cos(\theta) \\
    \end{array}\right)
    [/tex]

    then the result should be

    [tex]
    \log(X) = \left(\begin{array}{cc}
    0 & -\theta \\
    \theta & 0 \\
    \end{array}\right)
    [/tex]

    but how does one arrive at this honestly from the series?
     
    Last edited: Jul 21, 2009
  2. jcsd
  3. Jul 21, 2009 #2
    Wouldn't the orthogonality simplify exponents of the matrix?

    X^{2n}=I
    X^{2n+1}=X
     
  4. Jul 21, 2009 #3
    No. For example

    [tex]
    \left(\begin{array}{cc}
    \cos(\theta) & -\sin(\theta) \\
    \sin(\theta) & \cos(\theta) \\
    \end{array}\right)^2
    = \left(\begin{array}{cc}
    \cos(2\theta) & -\sin(2\theta) \\
    \sin(2\theta) & \cos(2\theta) \\
    \end{array}\right)
    [/tex]

    is usually not the identity. Elements of some Lie algebras often have properties that resemble your equations.
     
  5. Jul 21, 2009 #4
    Could it simplify your product in the equation bellow where you write "Elements of individual terms" BTW, where does this equation come from? It looks interesting.
     
  6. Jul 21, 2009 #5

    DrGreg

    User Avatar
    Science Advisor
    Gold Member

    Are you asking how to prove that the power series is correct, or something else?

    If you are, would you be able to answer the question if X were a real number instead of a matrix?

    Now, if I ask you "Is an orthogonal matrix diagonalisable?", does that give you a clue?
     
  7. Jul 21, 2009 #6
    I am interested in some formula, which would give a corresponding angle [itex]\theta\in\mathbb{R}^3[/itex] when a rotation matrix [itex]X\in SO(3)[/itex] is given. I have more than one reason to obtain such formula in fact.

    I have written a (programming language) function which gives some angle vector, when a rotation matrix is given, but it works by using iterations. The function could be made more efficient, if there was some formula for the angle vector. For example there is a direct formula for the elements of a rotation matrix, when the angle vector is given. I wrote it down here: Elements of SO(3)?

    I can see that if I substitute a diagonalizable matrix [itex]V\textrm{diag}(\lambda_1,\ldots,\lambda_n)V^{-1}[/itex] into the series, and use the Taylor series of a single variable logarithm, assuming that [itex]|\lambda_i - 1|< 1[/itex] for all [itex]i[/itex], then I get

    [tex]
    \log(V\textrm{diag}(\lambda_1,\ldots,\lambda_n)V^{-1}) = V\textrm{diag}(\log(\lambda_1),\ldots ,\log(\lambda_n))V^{-1}.
    [/tex]

    I think it is a good thing that you reminded me of this, because this made me recall that the eigenvalues of orthogonal matrices (or unitary matrices) are often not in the ball [itex]|z-1|<1[/itex], so the series I wrote down originally is probably not going to converge for all matrices of interest. For example [itex]-1\in SO(2)[/itex] doesn't have eigenvalues in this domain of convergence.

    Do you know how to prove that all unitary matrices are diagonalizable?

    I don't know. I have read some material, about random matrix theory, which seems to assume that diagonalizability of unitary matrices is plain clear, so I believe it is true. I have only one idea for the proof. I know how to prove that Hermitian matrices are diagonalizable, so if I can show that for all unitary [itex]U\in \mathbb{C}^{n\times n}[/itex] there exists a Hermitian [itex]H\in\mathbb{C}^{n\times n}[/itex] such that

    [tex]
    U=e^{iH}
    [/tex]

    then the diagonalizability of [itex]U[/itex] would follow. So how do I show that this [itex]H[/itex] exists? If I had some knowledge about the logarithm

    [tex]
    H = -i\log(U)
    [/tex]

    then it could solve the problem. This is why I would like to know how to deal with logarithms in some other way, than via assuming that I already knew the parameter matrix to be diagonalizable.
     
  8. Jul 21, 2009 #7

    DrGreg

    User Avatar
    Science Advisor
    Gold Member

    For diagonalisation of an orthogonal matrix, have a look at the Wikipedia articles Normal_matrix and Spectral_theorem

    I'm a bit rusty on this, but in the n=2 case the family

    [tex]X(\theta) = \left(\begin{array}{cc}
    \cos\theta & -\sin\theta \\
    \sin\theta & \cos\theta \\
    \end{array}\right)[/tex]​

    forms a one-parameter group, with infinitesimal generator

    [tex] Z = \frac{dX}{d\theta}(0)
    = \left(\begin{array}{cc}
    0 & -1 \\
    1 & 0 \\
    \end{array}\right)[/tex]​

    and so

    [tex] X(\theta) = e^{Z\theta} [/tex]​

    which is exactly what you wanted.

    I haven't thought this through, but maybe a similar (multiparameter) technique might work in larger dimensions?
     
  9. Jul 22, 2009 #8
    Have you considered a scaling and squaring algorithm?

    http://eprints.ma.man.ac.uk/634/01/covered/MIMS_ep2006_394.pdf

    This is how MATLAB computes the matrix and it is usually more accurate then denationalization, unless the matrix is symmetric. Also, I think there are probably some math packages that have these algorithms implemented. See linpac for instance.
     
  10. Jul 22, 2009 #9
    The spectral theorem seems to deal with existence questions, so it does not solve my need for the logarithm formula. The spectral theorem does suggest, though, that my idea about how to prove diagonalizability of unitary matrices was not the best one. Anyway, I'm still interested in logarithm formulas.

    It became clear that it was not a good idea to consider the series of logarithm, so it could be that I should try to reformulate the original question again. I have not yet thought about this to the end, but in the case [itex]n=2[/itex] it is easy to show example of something like what I have been after for.

    Using commutativity of

    [tex]
    \left(\begin{array}{cc}
    x & 0 \\
    0 & x \\
    \end{array}\right)
    [/tex]

    and

    [tex]
    \left(\begin{array}{cc}
    0 & -y \\
    y & 0 \\
    \end{array}\right)
    [/tex]

    one can calculate

    [tex]
    \exp\left(\begin{array}{cc}
    x & -y \\
    y & x \\
    \end{array}\right)
    =\left(\begin{array}{cc}
    e^x \cos(y) & -e^x \sin(y) \\
    e^x \sin(y) & e^x \cos(y) \\
    \end{array}\right) \quad\quad\quad\quad (9.1)
    [/tex]

    Suppose we choose a following branch of the inverse of cosine:

    [tex]
    \cos^{-1}:[-1,1]\to [0,\pi]
    [/tex]

    We can then write one possible branch of logarithm like this:

    [tex]
    \log\left(\begin{array}{cc}
    x & -y \\
    y & x \\
    \end{array}\right)
    =\left(\begin{array}{cc}
    \log(\sqrt{x^2 + y^2}) & -\frac{y}{|y|}\cos^{-1}\big(\frac{x}{\sqrt{x^2 + y^2}}\big) \\
    \frac{y}{|y|}\cos^{-1}\big(\frac{x}{\sqrt{x^2 + y^2}}\big) & \log(\sqrt{x^2 + y^2}) \\
    \end{array}\right)\quad\quad\quad\quad (9.2)
    [/tex]

    This is an example of a kind of formula that I would consider useful.

    If we set [itex]x=0[/itex] in the equation (9.1), then the equation shows an exponentiation of some member of [itex]\mathfrak{so}(2)[/itex], and the result is a member of SO(2). If we set [itex]x^2 + y^2 = 1[/itex] in the equation (9.2), then the equation shows a logarithm of some member of SO(2), and the results is a member of [itex]\mathfrak{so}(2)[/itex]. Anyway, it is not very difficult to perform these computations without these assumptions, because these are actually the exponential and logarithm functions in the complex plane.

    But then.... same stuff with SO(3) next? :cool:
     
    Last edited: Jul 22, 2009
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: How to compute logarithm of orthogonal matrix?
Loading...