Talk:LU decomposition

message: In the Existence and Uniqueness section, what is the matrix R?  It looks like it's referring to something defined earlier, that is no longer there.  --Ben Kovitz 20:16, 4 September 2005 (UTC)
replies: text: R should be U. In some languages, including Dutch and German, LU is sometimes called LR (R for right); this probably confused whoever wrote that sentence (which may well have been me). Now fixed, thanks for catching this. -- Jitse Niesen (talk) 21:29, 4 September 2005 (UTC)
thread_title:  R in Existence and Uniqueness 

message: Intro. to Algorithms by Cormen et al. says LU decomposition is Θ(n3) for (I think) an n×n matrix. Did I get that right. If so, it should appear prominently in this article. —Ben FrantzDale 17:18, 1 February 2007 (UTC)
replies: text: That's right. More precisely, Golub & van Loan (reference as in Givens rotation) say that you need 2n3 / 3 operations, neglecting lower-order terms. This remains the case if you're doing partial pivoting, but full pivoting is more expensive. Please do put it in. -- Jitse Niesen (talk) 01:44, 2 February 2007 (UTC)

text: I added a bit along these lines. Perhaps not prominently, as you proposed; feel free to edit (as always). -- Jitse Niesen (talk) 07:24, 11 March 2007 (UTC)
replies: text: There is room for improvement, to n^{2.376}, using matrix multiplication with this complexity. You perform the LUP-algorithm (upper) half by (lower) half instead of row by row. I guess you will find it in Modern computer algebra by Joachim von zur Gathen and Jürgen Gerhard--131.174.22.39 (talk) 07:31, 31 March 2009 (UTC)
thread_title:  Computational complexity 

message: I added a brief paragraph about the explicit form of the LDU factors. Although it is not practical for computation (like the explicit formula of the inverse), I think it can potentially have some great theoretical value (it does in my own research). Householder is the only reference I've found that makes mention of this. Seems that the existence of the explicit form is not so well known today. I don't have the Householder book with me at the moment. If somebody wants to look it up and write out the actual formulas for the factors, knock yourself out.  —Preceding unsigned comment added by 76.120.34.175 (talk) 22:49, 12 April 2008 (UTC)
thread_title:  Explicit Form 

message: So I checked this article, triangular matrix, and matrix inverse, but I don't see anything specific describing how to efficiently invert a triangular matrix. I assume there must be a method more efficient than Gaussian elimination. How's it work? Dcoetzee 04:02, 23 January 2009 (UTC)
replies: text: The LU decomposition is sometimes called Gaussian elimination. It is not matrix inversion, it is rapidly solvable linear systems, that is it. Try this, write out a triangular matrix times a vector equals another vector and try to solve it--then you will get it. PDBailey (talk) 04:17, 23 January 2009 (UTC)
replies: text: I know about forward and backward substitution, that's obvious (and described here). I'm asking if there's a more efficient method for inverting a triangular matrix. This article suggests as much when it says that the LU decomposition is used to help compute inverses. Dcoetzee 21:43, 23 January 2009 (UTC)
replies: text: Ah, think about AA-1=I which you could also write as AX-1=I and solve for X (that is via n individual vector solves). Trefethen & Bau (pp161) give an operation count of 8/3 m3 and say that, "Gaussian elimination can be used to compute the inverse [...] though it is rarely really necessary to do so." PDBailey (talk) 01:47, 24 January 2009 (UTC)
replies: text: Yeah, that method of inversion seems kind of pointless when Gaussian elimination uses only 2/3 m3 operations (ref Gaussian_elimination#Analysis). I guess that raises the question, why would you ever compute A-1 as U-1L-1? For numerical stability? If there is no practical reason to do so it might make sense to remove it from Applications. Dcoetzee 02:36, 24 January 2009 (UTC)
thread_title:  Inverting triangular matrices 

message: The article does not define what LU factorization is.  —Preceding unsigned comment added by 84.50.107.182 (talk) 09:39, 20 October 2009 (UTC)
replies: text: 10 years later: Yes. --Svennik (talk) 19:59, 10 December 2020 (UTC)
thread_title:  LU factorization? Huh? 

message: Here's a link which i found very helpful for decomposition of a square matrix in LU form.
* LU Decomposition Video Shortcut method for LU decomposition.  — Preceding unsigned comment added by J.Revati (talk • contribs) 13:47, 17 February 2013 (UTC)
thread_title:  Shortcut method for LU decomposition of a square matrix 

message: That shows up in the "Existence and uniqueness" section. Aren't all invertible matrices square? If so, what does this mean? Maybe it should be written in a clearer way. Sinan Taifour (talk) 08:43, 13 November 2010 (UTC)
thread_title:  Every invertible matrix A—square or not—? 

message: This article says nothing about where the coefficients of the matrix are supposed to live. A little reflection tells me there is little hope of finding a LU decomposition for genral matrices with entries in a commutative ring (say polynomials) without extending the coefficient domain. So I think this article is assuming throughout that coefficients are in a field, but it should clearly say so. This also impacts efficiency considerations: if you're dealing with a matrix with integer entries, the computational cost rises notably if you need to compute over the rational numbers (quite likely with bignum numerator/denominator). Even more so for the case of polynomials/rational functions. Marc van Leeuwen (talk) 08:04, 16 May 2011 (UTC)
thread_title:  Coefficient domain? 

message: i wrote a short fortran program to implement LU with pivoting for 2x2 matrices, built from the example in the article.  i am happy to submit it here if someone wants to insert it into the main article. 128.83.67.213 (talk) 23:44, 21 December 2011 (UTC)
thread_title:  fortran example 

message: :A, but these decompositions can all be generalized to rectangular matrices as well.
This sounds strange to me. Is there something missing after "A,"? --MartinThoma (talk) 09:08, 20 May 2013 (UTC)
replies: text: You're right, some text was inadvertently deleted a few months ago, and it seems nobody who noticed bothered to fix it. Thanks very much for your comment. It should be better now. -- Jitse Niesen (talk) 00:43, 22 May 2013 (UTC)
thread_title:  Missing word? 

message: Current,  Cormen's supposed recursive algorithm for LUP is described as
    Crout and LUP algorithms
    
    The LUP decomposition algorithm by Cormen et al. generalizes Crout matrix decomposition. It can be described as follows.
    
    If A {\displaystyle A} A has a nonzero entry in its first row, then take a permutation matrix P 1 {\displaystyle P_{1}} P_{1} such that A P 1 {\displaystyle AP_{1}} A P_1 has a nonzero entry in its upper left corner. Otherwise, take for P 1 {\displaystyle P_{1}} P_{1} the identity matrix. Let A 1 = A P 1 {\displaystyle A_{1}=AP_{1}} A_1 = A P_1.
    Let A 2 {\displaystyle A_{2}} A_{2} be the matrix that one gets from A 1 {\displaystyle A_{1}} A_{1} by deleting both the first row and the first column. Decompose A 2 = L 2 U 2 P 2 {\displaystyle A_{2}=L_{2}U_{2}P_{2}} A_2 = L_2 U_2 P_2 recursively. Make L {\displaystyle L} L from L 2 {\displaystyle L_{2}} L_{2} by first adding a zero row above and then adding the first column of A 1 {\displaystyle A_{1}} A_{1} at the left.
    Make U 3 {\displaystyle U_{3}} U_3 from U 2 {\displaystyle U_{2}} U_{2} by first adding a zero row above and a zero column at the left and then replacing the upper left entry (which is 0 at this point) by 1. Make P 3 {\displaystyle P_{3}} P_{3} from P 2 {\displaystyle P_{2}} P_{2} in a similar manner and define A 3 = A 1 / P 3 = A P 1 / P 3 {\displaystyle A_{3}=A_{1}/P_{3}=AP_{1}/P_{3}} A_3 = A_1 / P_3 = A P_1 / P_3. Let P {\displaystyle P} P be the inverse of P 1 / P 3 {\displaystyle P_{1}/P_{3}} P_1 / P_3.
    At this point, A 3 {\displaystyle A_{3}} A_{3} is the same as L U 3 {\displaystyle LU_{3}} L U_3, except (possibly) at the first row. If the first row of A {\displaystyle A} A is zero, then A 3 = L U 3 {\displaystyle A_{3}=LU_{3}} A_3 = L U_3, since both have first row zero, and A = L U 3 P {\displaystyle A=LU_{3}P} A = L U_3 P follows, as desired. Otherwise, A 3 {\displaystyle A_{3}} A_{3} and L U 3 {\displaystyle LU_{3}} L U_3 have the same nonzero entry in the upper left corner, and A 3 = L U 3 U 1 {\displaystyle A_{3}=LU_{3}U_{1}} A_3 = L U_3 U_1 for some upper triangular square matrix U 1 {\displaystyle U_{1}} U_{1} with ones on the diagonal ( U 1 {\displaystyle U_{1}} U_{1} clears entries of L U 3 {\displaystyle LU_{3}} L U_3 and adds entries of A 3 {\displaystyle A_{3}} A_{3} by way of the upper left corner). Now A = L U 3 U 1 P {\displaystyle A=LU_{3}U_{1}P} A = L U_3 U_1 P is a decomposition of the desired form.
It is easy to demonstrate that this doesn't work.  There is no explanation of how the matrix U1 is to be calculated,  and it fact it is easy to demonstrate with basic counter-examples that this supposed U1 matrix cannot be determined.   Also,  this explanation doesn't seem to be the one in Cormen's well-known textbook.  Is there are source for this dodgy hand-waving explanation of the recursive algorithm ?  Lathamibird (talk) 10:51, 30 September 2016 (UTC)
thread_title:  Bogus explanation 

message: This article discusses two things: 1) The LU matrix factorization, and 2) algorithms for calculating the LU factorization.
Most of the article completely fails to distinguish between these two subjects. (For example, the phrase "the LU factorization with pivots": Is this a kind of factorization or just a kind of algorithm for calculating the LU factorization?
I think I know the answer, but these things need to be made much clearer".)108.245.209.39 (talk) 20:55, 7 June 2018 (UTC)
thread_title:  Fundamental omission 

message: The code examples should be placed in a separate section. --Svennik (talk) 02:14, 9 December 2020 (UTC)
replies: text: Done. --Svennik (talk) 19:55, 10 December 2020 (UTC)
thread_title:  Code examples don't belong in a section about applications 

message: Added the Fortran example by 128.83.67.99. Can someone check if it's right? I don't know Fortran. --Svennik (talk) 17:04, 11 December 2020 (UTC)
replies: text: From the looks of it, it's only for 2x2 systems. Should it be removed? --Svennik (talk) 09:14, 12 December 2020 (UTC)
replies: text:  Done. --Svennik (talk) 10:05, 12 December 2020 (UTC)
thread_title:  Added Fortran example above to the article [since removed]

message: I don't quite know how to fit it in, but would it be worthwhile to distinguish between forward and backward looking LU decomposition?  Also, to talk about BLAS-3 v. BLAS-2 v. BLAS-1 algorithms, and error analysis?  Fephisto (talk) 05:25, 7 November 2022 (UTC)
thread_title:  Forward v. Backward Looking + Error Analysis 

message: The page "doolitle algorithm" redirects here  but the named subsection "#doolittle..."  no longer exists.   I'm open to suggestions as to how to properly supply info on said algorithm .   Cellocgw (talk) 22:12, 10 December 2023 (UTC)
thread_title:  missing subsection?