The entries of U are exactly the pivots of Gaussian elimination, and the entries of L are exactly the multipliers you used to eliminate below each pivot.
Gaussian elimination clears the column below each pivot by row operations. A row operation "subtract m times row k from row i" is itself a matrix multiplication on the left.
To eliminate entry aik using pivot akk, the multiplier is
mik=akkaik(after previous steps).
The elementary matrix that does "rowi← rowi−mikrowk" is the identity with −mik in position (i,k).
Imagine a tall messy stack of LEGO instructions. Solving the puzzle once is slow. But if you write down the steps you used (that's L) and keep the half-built model (that's U), then next time someone gives you a slightly different goal, you don't start over — you just replay your saved steps backwards and forwards. LU = "save your homework so you never redo it."
What is the LU decomposition of a matrix A?
A factorisation A=LU with L unit lower triangular (1's on diagonal) and U upper triangular.
What do the entries of U represent in Gaussian elimination?
The pivots.
What do the off-diagonal entries of L represent?
The multipliers mik=aik/akk used to eliminate below each pivot.
Why is the diagonal of L all ones?
Because L is the product of inverse elementary elimination matrices, each leaving diagonal entries equal to 1.
To solve Ax=b via LU, what are the two steps?
Forward-solve Ly=b, then back-solve Ux=y.
How do you compute det(A) from LU?
detA=∏iuii (product of pivots), times (−1) per row swap if pivoting used.
When does plain A=LU fail and what's the fix?
When a pivot is zero/tiny; use partial pivoting giving PA=LU with permutation matrix P.
Cost of LU factorisation vs one triangular solve?
Factorisation ≈32n3 flops; each solve ≈n2.
Main advantage of LU over plain Gaussian elimination?
Reuse L,U for many right-hand sides at O(n2) each instead of redoing O(n3) elimination.
Dekho, LU decomposition ka funda simple hai: jab tum Gaussian elimination karte ho na, tab tum bahut mehnat karte ho rows ko zero karne mein — par answer milne ke baad woh saari mehnat waste ho jaati hai. LU bolta hai "ruk, apna kaam save kar le!" Matrix A ko hum do pieces mein todte hain: L (lower triangular, diagonal pe 1) aur U (upper triangular). U mein tumhare pivots baithte hain, aur L mein woh multipliers (mik=aik/akk) jo tumne elimination ke time use kiye the.
Iska sabse bada faayda kab? Jab same matrix A ke saath bahut saare alag-alag b solve karne ho. Ek baar L,U nikaal lo (cost ≈32n3), phir har b ke liye sirf do easy substitution karo: pehle Ly=b (forward substitution), phir Ux=y (back substitution) — dono O(n2) mein. Matlab kaam ek baar, fayda baar-baar.
Determinant bhi free mein mil jaata hai: detA=u11u22⋯unn, yaani pivots ka product. Inverse chahiye? Ax=ei solve karo har identity column ke liye, wahi L,U reuse karke.
Ek warning yaad rakhna: agar koi pivot zero ya bahut chhota aa jaaye, toh seedha A=LU fail ho jaata hai (divide by zero / rounding blast). Tab hum rows swap karte hain — isko partial pivoting kehte hain, aur factorisation ban jaata hai PA=LU jahan P ek permutation matrix hai. Bas yeh dhyaan rakho aur LU tumhara dost hai exam mein bhi aur real engineering mein bhi.