C2_W2 Help with optimization using gradients

Hi, can you please explain how this was calculated?

thanks!

Hello, @Eitan_Koren This is called partial derivatives. a type of derivative that gives the rate of change of a function with respect to one of its variables, holding all other variables constant. It is a way to measure how a function changes as one variable changes while all other variables are held fixed.

For a function of multiple variables, say f(x,y), the partial derivative of f with respect to x is denoted by ∂f/∂x or f_x, and is defined as the limit of the change in f(x,y) as x approaches a certain value, divided by the change in x, when y is held constant. Similarly, the partial derivative of f with respect to y is denoted by ∂f/∂y or f_y, and is defined as the limit of the change in f(x,y) as y approaches a certain value, divided by the change in y, when x is held constant.

For your case first case:
\frac{\partial E}{\partial m} = 28m +12b-42 When the Operation between the variable is either - or + we do not hold other variables constant (ie those variables that don’t contain {M}) but we drop them so we are left with 14M^2 + 12mb-42m and we differentiate this equation to get 28m + 12b-42 if the operation was multiplication or Division between the variables we could have left the variables that don’t have M constant.

The same thing is happening to the second equation!

You can watch this video to get more of what derivatives are: Partial derivatives, introduction - YouTube

Let me if this has helped.

Happy Learning
Isaak