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

Square matrix to the power of a imaginary unit

  1. Sep 4, 2013 #1

    How to raising a square matrix to the power of a complex number?

    for example:
    [1 2;3 4]^(1+i)

    or mathematics software such as Scilab how solve such problems?
    -->[1 2;3 4]^(1+%i)
    ans =

    - 0.1482039 - 0.2030943
    - 0.3046414 - 0.4528453

    Thanks in advance.

    Additational remark:
    for element by element power operation (.^) , the output value is equal to the principle value computed as:
    z1.^z2 = exp( z2* ( log(abs(z1)) + %i*atan(imag(z1)/real(z1)) ) )

    -->[1 2;3 4].^(1+%i)
    ans =

    1. 1.5384778 + 1.2779226i
    1.3644973 + 2.6717311i 0.7338279 + 3.932111i
  2. jcsd
  3. Sep 4, 2013 #2


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Depending on the matrix, there might not be any sensible way to do this. If the matrix is diagonalizable, then you can apply the exponent to the eigenvalues. In general, you can attempt to define the power using the logarithm of the matrix, ## A^p = \exp ( p \ln A)##. The logarithm can be defined as the matrix ##B## such that ##A = e^B##, or via a power series. In general, the logarithm only exists if ##A## is invertible, and when dealing with complex elements is not necessarily unique.
  4. Sep 4, 2013 #3
    Thanks for reply.
    yes, for element-wise power operation, in fact the software compute the above expression.
    a .^(%i+1) == exp((%i+1)*log(a))

    Let us return to the main problem i.e: a=[1 2;3 4]; a^(1+i)
    eigenvalues and eigenvectors may be get as:
    d =

    - 0.3722813 0
    0 5.3722813
    v =

    - 0.8245648 - 0.4159736
    0.5657675 - 0.9093767

    This matrix is diagonalizable: inv(v)*a*v == d

    So still I don't know what algorithm the software use?

    And another question, if one wants to solve this problem by hand, which method should be used?
  5. Sep 4, 2013 #4


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    I'm not familiar with the software, so I don't know. In terms of computational complexity, multiplication of large matrices takes a similar number of operations as computing the inverse of a matrix. I would guess that using the power series definition of the log (when it converges) is slightly faster than diagonalizing the matrix and then inverting the matrix of eigenvectors. Also, there are invertible matrices that are not diagonalizable, so the software would have to be able to use more than one algorithm anyway.

    For a small matrix I would probably want to diagonalize first whenever possible. For a simple enough matrix, this could lead to an exact result. If only a numerical result is required, then the power series method might be faster, depending on the convergence properties.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook