Finding square root of a matrix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • krishnai888
    New Member
    • Oct 2007
    • 2

    Finding square root of a matrix

    I had already asked this question long back but no one has replied to me..I hope someone replies to me because its very important for me as I am doing my internship.

    I am currently writing a code involving lot of matrices. At one point I need to calculate the square root of a matrix e.g. A which contains non-zero off-diagonal elements. I searched for a lot of info on net but no algorithm worked. My best bet for finding square root was to find eigenvectors P of a matrix A and its corresponding eigenvalues matrix D, and following formula can be used to calculate square root of matrix
    sqrt(A) = [P] * (sqrt[D]) * [transpose of P]
    where D matrix is a square matrix with diagonal entries as eigenvalues, so its square root is nothing but square root of diagonal entries.
    But this method failed too :( . When I found the square root matrix by this algorithm, I tried squaring that matrix and finding if i get the original matrix A. But I didnt get any values matching with original matrix. I wanted to know if someone has the algorithm or atleast the method for finding an efficient square root of matrix.
  • sicarie
    Recognized Expert Specialist
    • Nov 2006
    • 4677

    #2
    As this is more of an algorithm question, I moved it over to the Software Development Forum (also because you didn't seem to get an answer with the C/C++ crowd...)

    Comment

    • weaknessforcats
      Recognized Expert Expert
      • Mar 2007
      • 9214

      #3
      Is this not in a matrix algebra book?

      Maybe here.

      Once you have the algorithm, then you can ask your C/C++ question.

      Comment

      • krishnai888
        New Member
        • Oct 2007
        • 2

        #4
        i saw the link that you sent me http://eprints.ma.man. ac.uk/367/
        but no algorithm is given on that site and i am not even able to access the pdfs there because it is asking for some password n all...wat to do ??

        Comment

        • pearl1729
          New Member
          • Apr 2009
          • 1

          #5
          Originally posted by krishnai888
          I had already asked this question long back but no one has replied to me..I hope someone replies to me because its very important for me as I am doing my internship.

          I am currently writing a code involving lot of matrices. At one point I need to calculate the square root of a matrix e.g. A which contains non-zero off-diagonal elements. I searched for a lot of info on net but no algorithm worked. My best bet for finding square root was to find eigenvectors P of a matrix A and its corresponding eigenvalues matrix D, and following formula can be used to calculate square root of matrix
          sqrt(A) = [P] * (sqrt[D]) * [transpose of P]
          where D matrix is a square matrix with diagonal entries as eigenvalues, so its square root is nothing but square root of diagonal entries.
          But this method failed too :( . When I found the square root matrix by this algorithm, I tried squaring that matrix and finding if i get the original matrix A. But I didnt get any values matching with original matrix. I wanted to know if someone has the algorithm or atleast the method for finding an efficient square root of matrix.
          Very true only one mistake.
          it's not transpose of P, it is inverse of P.
          Just change that and check your result.

          Thanks

          Comment

          Working...