Derivation of linear regression cost function wx+b

It is not clear to me how we got the final derivative for either parameters. Especially how he got to the 3rd step. I have basic calculus knowledge

I believe the answer is here (look for the second answer):


Yes. That’s the answer. When I learn differentiation, my teacher taught us to remember it like this: move the power (which is 2 here) down (which is next to x^{(i)} here), then minus the power by 1(which ends up a power of 2-1=1), then differentiate whatever inside the bracket (which ends up with x^{(i)}). :slight_smile: