I was studying the weighted least squares algorithm and came across this formula for calculating the weighted result in terms of the original.
Here $x_{LS}$ is the solution for $D=I$
I can't figure out the proof for this formula. I see that $x_D=(A^TD^2A)^{-1}A^TD^2b$ but haven't been able to derive the formula from the book. Does anyone know a demonstration?