TITLE: Time complexity of LU decomposition
QUESTION [12 upvotes]: I am trying to derive the LU decomposition time complexity for an $n \times n$ matrix. 
Eliminating the first column will require $n$ additions and $n$ multiplications for $n-1$ rows. Therefore, the number of operations for the first column is $2n(n-1)$. For the second column, we have $n-1$ additions and $n-1$ multiplications, and we do this for $(n-2)$ rows giving us $2(n-1)(n-2)$. Therefore, the total number of operations required for the full decomposition can be written as
$$
\sum_i^n 2(n-i) (n-i+1)
$$
How do we get from this sum to a total cost of $\frac{2}{3}n^3$?

REPLY [3 votes]: Below is the gist. Hope the loose but cleaner notation can help our memory.
$\sum_i^n 2(n-i) (n-i+1)\approx2\sum n^2\approx2\int x^2dx\approx\frac{2}{3}x^3$
$\approx$ is in the sense of top term coefficient.