You can’t go from ∑t(hjxtj−yt)xtj=0 to ∑t(hjxtj−yt)=0. Not even if you were allowed to assume that xtj=0.
Concrete example: suppose we have two t values, we have x1j=1 and x2j=2, and y1=2 and y2=3. Then the first equation says 1(1h1−2)+2(2h2−3)=0 which simplifies to h1+4h2=8, whereas the second equation says (h1−2)+(2h2−3)=0 which simplifies to h1+2h2=5. These are not the same equation and do not have the same consequences.
If you attempt to perform linear regression using the equations you have derived, you will get the wrong answer.
Linear regression is reducible to matrix arithmetic, but the correct equations are slightly more complicated; the thing you need to invert is not the matrix X (which in general is not square and has no inverse) but XTX.
I’m afraid this is badly wrong.
You can’t go from ∑t(hjxtj−yt)xtj=0 to ∑t(hjxtj−yt)=0. Not even if you were allowed to assume that xtj=0.
Concrete example: suppose we have two t values, we have x1j=1 and x2j=2, and y1=2 and y2=3. Then the first equation says 1(1h1−2)+2(2h2−3)=0 which simplifies to h1+4h2=8, whereas the second equation says (h1−2)+(2h2−3)=0 which simplifies to h1+2h2=5. These are not the same equation and do not have the same consequences.
If you attempt to perform linear regression using the equations you have derived, you will get the wrong answer.
Linear regression is reducible to matrix arithmetic, but the correct equations are slightly more complicated; the thing you need to invert is not the matrix X (which in general is not square and has no inverse) but XTX.