What does the derivative node do?

Hi! What the derivative node does is applying the partial derivative operation with respect to the x and y components of the input. The partial derivative is a common operation on calculus where you take the derivative only of that component you want, and treat the other components as constants:

As we can understand the derivative as the “rate of change” of a value (so, if a vector function has a high derivative, that means it changes super fast), the partial derivative of a vector in respect to a component, is the rate of change relative of that component. So, a function might have a big dx, which means that for a small change in x, the value of that function changes drastically, but a small dy, which means the values doesn’t change a lot even for big changes in y. The vector formed by all the partial derivatives of a function is called the gradient vector, and it acts like a “slope”, showing the steepest areas of change for that function.

I think a picture is worth a thousand words, so here are some great videos to visualize partial derivatives and gradients :smiley:

3 Likes