Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

LU factorization

Splitting a matrix A into a lower-triangular L and an upper-triangular U, with A = LU -- L records elimination's own multipliers, U is the result of eliminating with no row swaps.

LU factorization writes a square matrix A, reduced to upper-triangular U by Gaussian elimination using only row-replacement operations (no swaps), as A=LU, where L is unit lower triangular (1's on the diagonal) with the elimination multiplier m_{ik} in position (i,k). Once computed, A\mathbf{x}=\mathbf{b} solves for any new \mathbf{b} in O(n^2) by forward- then back-substitution, instead of repeating the O(n^3) elimination.

Loading interactive…

Examples

  • For A=\begin{pmatrix}2&1&1\\4&3&3\\8&7&9\end{pmatrix}, elimination gives L=\begin{pmatrix}1&0&0\\2&1&0\\4&3&1\end{pmatrix}, U=\begin{pmatrix}2&1&1\\0&1&1\\0&0&2\end{pmatrix} -- every multiplier used during elimination reappears directly in L.

Read the full section →
Graph settings

Calculator