I was going through the theory for weighted least-squares fitting and I understood its basic underlying concepts, but I couldn't understand why exactly do we keep the weights as a diagonal matrix during calculations.

This might be a dumb question but I don't have much experience with matrices and I am in the process of using them to solve more real-world problems so any input will be helpful.

  • $\begingroup$ Perhaps you could provide more details? $\endgroup$ – Yuval Filmus Oct 4 '20 at 19:07
  • $\begingroup$ Also, the weight matrix probably represents weights of points. If you have $n$ points, these are $n$ values. We put them in a diagonal matrix since doing so allows us to write some formulas in a succinct way. $\endgroup$ – Yuval Filmus Oct 4 '20 at 19:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.