I am working my way through the book "Linear Algebra and Its Applications" By Gilbert Strang and I can't seem to arrive at the same equation he does for weighed normal equations which he gives as
$$ (A^TW^TWA)\hat{x}_W = A^TW^TWb $$
the general equation for a weighted system is given
$$ WAx = Wb $$
the least squares solution (the closest point in the column space to $Wb$ would be
$$ p = WA\hat{x} $$
and the error vector in the left nullspace (orthogonal to the column space ) is $e = Wb-p$. I know the solution to $WA\hat{x}$ must be in the orthogonal left nullspace and therefore we could solve
$$ W^TA^T(Wb - WA\hat{x}) = 0 $$
but when I rearrange this I just distribute it and get stuck as to where to go. I arrive at
$$ W^TA^TWb - W^TA^TWA\hat{x} = 0 $$
I can see that I have all of the proper parts of the equation, but mine looks different than his and I am not sure how to arrive at his. What should I do differently?
Starting with Strang's equation, set $\;F\!=\!WA,\;g\!=\!Wb\;$ to obtain $$\eqalign{ &(A^TW^T)\,(WA)x = (A^TW^T)\,(Wb) \\ &(F^TF)x = F^Tg \\ }$$ The least-squares solution to this system is $$x = (F^TF)^{-1}F^Tg$$ assuming $(F^TF)^{-1}$ exists.
If the inverse does not exist, then the solution can be written as $$x=F^+g + (I-F^+F)y$$ where $F^+$ is the Moore-Penrose inverse, $\,\big(I-F^+F\big)\,$ is the nullspace projector, and $y$ is an arbitrary vector.