I want to make a program which will determine the Rank of a given Matrix in C# Console Application. But I cannot able to make the algorithm for that. Can you please help me make that algorithm?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can just use the basic Gauss elimination method. Counting the number of non-zero rows will give you the rank. But this method is not really numerically robust. As the wikipedia article says, there are a few other algorithms, such as singular value decomposition (SVD)or QR decomposition with pivoting. For both, you should easily be able to find basic implementations.
But working with accurate numbers as you need for this, you always have to think about the numerical inaccuracies of the IEEE representation of floats in the computer.
Read more about it on:
http://en.wikipedia.org/wiki/IEEE_754