I'm observing the quantization topic in signal processing and there is some mathematical term,
which I'm not totally understand. Here is the start of the development of the quantization for k > 1 (a few slides with some pretty understandable mathematical equations development ), after I learned the quantization for k=1 (i.e the expectation):

Provided one more slide for the context understanding, after the part I don't understand.
What is the reason for using in the marked slide Lagrange multipliers, what this constraint meant for to achieve ? It is also defined that : $\sum \mu _i=M$, after which the Lagrange constraint is set to be: $\lambda \left(M-\sum \mu _i\right)$, isn't it 0, according to the definition ? Here is a link to the whole lecture material: k-quatization




