473,386 Members | 1,803 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,386 software developers and data experts.

inverse of a matrix for nxm

hello to all,

can any one please give me an algorithm to find inverse of a matrix of order
n rows and m columns.

thank you in advance,
vishnu.
Nov 13 '05 #1
6 25175
vishnu mahendra <vi*************@yahoo.com> spoke thus:
can any one please give me an algorithm to find inverse of a matrix of order
n rows and m columns.


www.google.com

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
Nov 13 '05 #2

"vishnu mahendra" <vi*************@yahoo.com> wrote in message
news:c2*************************@posting.google.co m...
hello to all,

can any one please give me an algorithm to find inverse of a matrix of order n rows and m columns.


No. You might look up SVD somewhere, and see if that helps.

Not in this newsgroup, though.

-- glen
Nov 13 '05 #3
In article <c2*************************@posting.google.com> ,
vishnu mahendra <vi*************@yahoo.com> wrote:
hello to all,

can any one please give me an algorithm to find inverse of a matrix of order
n rows and m columns.


Algorithm to find inverse of a matrix using a computer program:

1. [decide how to solve problem] Decide whether you want to implement
a matrix inversion yourself or use one somebody else wrote.

2. If decision made in step 1 is writing one yourself, go to step 9.

3. [use somebody else's matrix inversion] Find a good search tool to
find libraries with. Google is a good first approximation.

4. [get somebody else's matrix inversion] Find a library that looks like
it will do what you need. Obtain and install the library and its
documentation.
ObTopic: Many libraries are implemented as functions callable from C.

5. Read the documentation to determine whether the library will do what
you need done, to verify the assumption in made in step 4.

6. [try again if necessary] If the library will NOT do what you need done,
go to step 1.

7. [find inverse using library] Write a program that will give the matrix
you want inverted to the library and get the inverse back out.

8. [done using library] Proceed to step 14.

9. [implement your own matrix inversion] Determine how to invert a matrix.
Consulting a linear algebra textbook may be helpful.

10. [write code] Write code that performs the necessary operations to
do this inversion.
ObTopic: C is one of the languages you may wish to consider using.

11. [verify and debug code] Test the code you wrote to make sure that
it correctly inverts any invertible matrix. If it doesn't, fix it
so that it does.
ObTopic: If you are having trouble with C code, posting the code
you're having trouble with here may be helpful, especially if you ask
well-thought-out questions that aren't answered in the FAQ and weren't
answered for somebody else yesterday.

12. [decide whether to give up and try again] If while performing step 11
you decide that writing your own code wasn't worth the effort after
all, interrupt step 11 and go to step 1.

13. [find inverse using your code] Write a program that will give the
matrix you want inverted to the code you wrote and debugged in steps
10 and 11 and get the inverse back out.

14. [done] You have now inverted your matrix. Wasn't that easy?
dave

--
Dave Vandervies dj******@csclub.uwaterloo.ca
Perhaps you should reflect on the fact that books are seldom sold by the
kilogram.
--Kevin Easton in comp.lang.c
Nov 13 '05 #4
Greetings.

In article <c2*************************@posting.google.com> , vishnu mahendra
can any one please give me an algorithm to find inverse of a matrix of
order n rows and m columns.


This isn't an algorithms group. You could try comp.graphics.algorithms,
comp.sources,wanted, or sci.math.num-analysis, or perhaps a web search.

--
_
_V.-o Tristan Miller [en,(fr,de,ia)] >< Space is limited
/ |`-' -=-=-=-=-=-=-=-=-=-=-=-=-=-=-= <> In a haiku, so it's hard
(7_\\ http://www.nothingisreal.com/ >< To finish what you
Nov 13 '05 #5
vishnu mahendra wrote:
Can any one please give me an algorithm
to find inverse of a matrix of order n rows and m columns.


A rectangular matrix does *not* have an inverse unless m = n.
You might be interested in the Moore-Penrose pseudo inverse.
I used Google

http://www.google.com/

to search for

"Moore-Penrose pseudo inverse"

and found lots of stuff.
You would probably be more interested in
a Singular Value Decomposition (SVD) to help solve your problem.
Take a look at GSL -- The GNU Scientific Library

http://sources.redhat.com/gsl/

Nov 13 '05 #6
vishnu mahendra wrote:

hello to all,

can any one please give me an algorithm to find inverse of a matrix of order
n rows and m columns.
The problem is unsolvable in the general case.

If both `m' and `n' are integral and greater than zero and
if their exclusive-or is zero, there may be a solution. Here's
some pseudocode:

if (m <= 0 || m > n || m < n || 0 == ((m ^ n) == '\0'))
fail();
else {
while (1) {
generate a random m-by-n matrix;
multiply it by the given matrix;
if (product matrix has ones on the main
diagonal and zeroes everywhere else)
break;
}
/* the randomly-generated matrix is the
inverse of the given matrix */
succeed();
}

Be sure not to use this code on a singular matrix!
thank you in advance,


You're welcome in retreat.

--
Er*********@sun.com
Nov 13 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: praneeth | last post by:
hi i want a c program to find the inverse of 3X3 matrix urgent i need it fast anyoone reply thanks
1
by: ravleen bindra | last post by:
please tell me how to find inverse of a nxm matrix in C programming language
7
by: ajeetbaraskar | last post by:
can any one send me the codining for finding out inverse of a 6x6 matrix
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...
2
by: leelaramtenneti | last post by:
hello I need a program to find a Inverse of a square complex matrix in java... . The program should calculate the inverse of a matrix in which each element has both real and imaginary parts. Or...
2
by: leelaramtenneti | last post by:
How to find inverse of a complex matrix ????
0
by: DarrenWeber | last post by:
# Copyright (C) 2007 Darren Lee Weber # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free...
3
by: aaram81 | last post by:
I need a help in C++ for the following question: write a p[rogram to read 4 by 4 matrix, store it and find the inverse of this matrix. then multiply the inverse with the original matrix , store it ....
1
by: dazzler | last post by:
Hi! I have problem with numpy, multiplying with an inversed matrix will crash python :( this works fine: from numpy import matrix A = matrix(,]) B = matrix(,]) print A.I #inverse matrix
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...

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.