By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,181 Members | 1,169 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,181 IT Pros & Developers. It's quick & easy.

Finding square root of a matrix

P: 3
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.
Oct 31 '07 #1
Share this Question
Share on Google+
4 Replies

Expert Mod 2.5K+
P: 4,677
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...)
Oct 31 '07 #2

Expert Mod 5K+
P: 9,197
Is this not in a matrix algebra book?

Maybe here.

Once you have the algorithm, then you can ask your C/C++ question.
Oct 31 '07 #3

P: 3
i saw the link that you sent me
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 ??
Nov 1 '07 #4

P: 1
Very true only one mistake.
it's not transpose of P, it is inverse of P.
Just change that and check your result.

Apr 30 '09 #5

Post your reply

Sign in to post your reply or Sign up for a free account.