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.

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...)

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 ??