We have $n$ dots: $(x_1,y_1)\cdots (x_n,y_n)$.
We know that if we use the Least squares method we will get a line $y=mx+b$ that giving the minimal value for the function $w=\sum_{i=1}^n (mx_i+b-y_i)^2$.
I need to prove that $w$ maintains: $$b=\frac{\sum_{i=1}^n x_i^2\sum_{i=1}^ny_i -\sum_{i=1}^nx_i\sum_{i=1}^nx_iy_i}{n(\sum_{i=1}^nx_i^2)-(\sum_{i=1}^nx_i)^2 }$$ and: $$\\m=\frac{n(\sum_{i=1}^nx_iy_i-\sum_{i=1}^nx_i \sum_{i=1}^ny_i}{n\sum_{i=1}^nx_i^2-(\sum_{i=1}^nx_i)^2}$$
I'm really don't know how to begin, and I'd like to get any help.
Thank you!
See if this can be any help, i have shown partial derivatives w.r.t. 'b' and 'm'.you solve these two equations simultaneously to get b and m.
I hope this will clear a few things for you. here are some new hints to help you out.