Cost of LU decomposition of a Symmetric Matrix

I have this question: what is the cost of computing LU decomposition for a symmetric matrix.

I tried to compute it, however, I calculated it as $2n^2$ as follows: I considered the LDL decomposition, and I concluded for the $i$-th row, I need $4(i-1)$ multiplications. So at the end, I need $\sum_{i=1}^n 4(i-1)\approx2n^2$. But I saw the cost of LDL decomposition grows as $1/3n^3$.

• Are you trying to tabulate the exact number of floating point additions, subtractions, multiplications, and divisions? Or prove an asymptotic bound in the size of the matrix? Or what? – user7530 May 25 '18 at 16:24
• @user7530 I am looking for an exact cost, however, I tried to show my solution seems to be wrong using asymptotic behavior. – mathvc_ May 25 '18 at 16:30