I have implemented two matrix inversion algorithms and built them into a library. If anyone is interested in solving n equations in n unknowns on an avr I will post my code. One method is the LU, and the other is Gauss-Jordan. The LU method adds about 3350 bytes of flash program memory, and the Gauss-Jordan adds about 2106 bytes of flash. I believe the LU is faster and the Gauss-Jordan produces the matrix inverse.

## matrix inversion

hmmm, to solve linear system, one usually doesn't use matrix inversion because it's slow and numerically unstable. Better way to go would be QR decomposition, for example. There are also implementations that perform the computations in place to reduce memory footprint.

Hi SprinterSB,

Yeah, I know the inverse is pretty much useless, which is one of the downsides of the Gauss-Jordan method for linear system solution I got out of the book "Numerical Recipes in C: The Art of Scientific Computing", Cambridge University Press. I attached the partial book chapter i got off the web. That implementation does the computations in place to limit memory use to one double A{NxN} and one double b{N} and a couple int I{N} .

I have a friend who is an expert in doing these linear solutions. He parallelized a lot of the BLAS routines when he worked for Cray Research. He sent me the LU decomposition routines out of the BLAS library to do the linear system solution, which also does things in place to limit memory use. I think this is a modern well used method, and coming from him I think it's pretty good one. It takes up a little more flash than the G-J method, but I think it is faster and may handle ill conditioned matrices better, although it is partial pivoting and the G-J has full pivoting.

Thanks for your interest,

mark