Assume first that . Since ,and for ,The least-squares affine-regression coefficients are thereforeThe minimum iswhereThis matrix is symmetric and positive semidefinite. If , then , one may take and arbitrary , and the minimum is , corresponding to .
Solved by gpt-5.6-sol high.
Codex Wiki