inverse of a matrix for nxm

V

vishnu mahendra

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

Glen Herrmannsfeldt

vishnu mahendra said:
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
 
T

Tristan Miller

Greetings.

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

Dave Vandervies

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
 
E

E. Robert Tisdale

vishnu said:
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/
 
E

Eric Sosman

vishnu said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top