Connecting Tech Pros Worldwide Help | Site Map

Finding square root of a matrix

Newbie
 
Join Date: Oct 2007
Posts: 3
#1: Oct 31 '07
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's Avatar
Moderator
 
Join Date: Nov 2006
Location: USA
Posts: 3,929
#2: Oct 31 '07

re: Finding square root of a matrix


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...)
Moderator
 
Join Date: Mar 2007
Location: North Bend Washington USA
Posts: 5,366
#3: Oct 31 '07

re: Finding square root of a matrix


Is this not in a matrix algebra book?

Maybe here.

Once you have the algorithm, then you can ask your C/C++ question.
Newbie
 
Join Date: Oct 2007
Posts: 3
#4: Nov 1 '07

re: Finding square root of a matrix


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 ??
Newbie
 
Join Date: Apr 2009
Posts: 1
#5: Apr 30 '09

re: Finding square root of a matrix


Quote:

Originally Posted by krishnai888 View Post

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
Reply


Similar Software Development bytes