   Lu decomposition algorithm
  Hello everyone!I was looking into the many threads of this forum with hope to find something regarding the LU DECOMPOSITION ALGORITHM, but with no luck. I found something on the net, but I didn't quite understand everything. An LU decomposition algorithm should split my square matrix (max 5x5) into another two matrix L and U. (with A = LxU).a11  a12  =  l12  0 Xu11   u12a21  a22l21  l220u22From this example is easy to find the a11, a21 and so on, but I do not understand how can I find those variables from a 5x5 matrix, from example. In fact this is why I am asking your help. I need an algorithm that can do that. Thanks a lot for your time and have a great day!   
Numerical Recipes is the standard textbook for numerics. The old version is available online. The book comes with full source code.If you don't care about the details and just want working code, you can also use GNU Scientific Library (C library).Wikipedia has also links to implementations in C and C++.There are also a lot of useful books availabe on Google books;  I saw the example from wiki an I understood what LU decomposition is and how it's made. I was asking for your help to implement that, because from the examples found on the net, so far, I couldn't understood. Thanks again.   ;  First, let me add another source to the list Kambiz started: Gilbert Strang's book.  He describes LU factorization in section 2.6.Quote:From this example is easy to find the a11, a21 and so on, but I do not understand how can I find those variables from a 5x5 matrix, from example.The variables a11, a21, etc, are simply the elements of your matrix.  If we were using C or C++ notation, we'd write them a[0][0], a[1][0], and so on, where 'a' is a two-dimensional array.(Was that your question?)Quote:I understood what LU decomposition is and how it's made1. Can you perform LU decomposition yourself, with pencil and paper?  Do you understand this in a methodical way (and not just a "given the numbers, I can figure it out by thinking about it" way)?2. Are you sure you understand how to do #1 for a matrix of any size?3. Do you know how to create two-dimensional arrays in whatever programming language you're using?   