473,396 Members | 1,995 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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.
Oct 31 '07 #1
4 8061
sicarie
4,677 Expert Mod 4TB
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
weaknessforcats
9,208 Expert Mod 8TB
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
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 ??
Nov 1 '07 #4
@krishnai888
Very true only one mistake.
it's not transpose of P, it is inverse of P.
Just change that and check your result.

Thanks
Apr 30 '09 #5

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

Similar topics

4
by: cplusplus | last post by:
Hello, I have newbie question. I'm stuck on this current assignment. Write a program that prompts the user for two integer values, passes the values to a function where they are multiplied...
2
by: Clint Olsen | last post by:
Hello: I posted a thread on comp.programming awhile back asking about an algorithm I implemented on square root. The idea was to use the square root of a prime number as a convenient way to get...
4
by: sathyashrayan | last post by:
(This is not a home work question) Dear group, I want a program to find one number between a set of natural number.A program to guess a number in between a Natural number set.This should be a...
0
by: YUSUF ISIAKA | last post by:
Him please help me with the codes for the following questions: 1. Write a program in c/c++ to compute the inverse of a square matrix. 2. Write a program in c/c++ to compute the determinant of a...
10
by: socondc22 | last post by:
my program is trying to use the babylonian algorithm in order to find the square root... i have a number for the number to have the square root taken of and also a number to run the loop... Whenever...
4
by: inferi9 | last post by:
Hi, I am working in a program caals magic square and it must be done only with loops and user definied funcations,I will tell you about my code and where my problem, the main is only calls the other...
5
by: pepito72 | last post by:
Hi A problem with trying to find the nearest colour. I have an image which I use GetPixel to return the colour of various points. However .... not all colours returned will be a...
2
by: whodgson | last post by:
This is a learning problem which is not part of an assignment or homework so there is no urgency. i`ve spent hours writing and ammending this rotate() function to no avail. So now i`ve obtained the...
29
by: curiously enough | last post by:
I am having trouble making this recursive C function work for square matrices of size greater than 3 rows and columns. #include<stdio.h> #include<conio.h> #include<math.h> int M; float...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.