According to my textbook, step 6 takes $(n-i)(n-i+1)$ multiplications and $(n-i)(n-i+1)$ subtractions. I don't understand where these numbers are coming from.
From my understanding, step 6, the multiplication bit should take, $$\sum_{j=i+1}^n m_{ji}E_i = n-i$$
flops. So where is that $(n-i+1)$ part coming from? As well as the subtraction part, it should take $(n-i+1)$ flops. Why is that not??

