In one dimension, we measure the derivative or slope of a function, $f(x)$ by
$$ f'(x)=\frac{df}{dx} $$
However when we have a function of multiple variables, the slope is different depending on what direction we’re referring to
Take $f(x,y)$ for instance. Two derivatives we could report is the partial derivative with respect to x and the partial derivative with respect to y:
$$ \frac{\partial f}{\partial x},\frac{\partial f}{\partial y} $$
For multiple directions we want to summarize the derivative information similar to how to do so in one dimesions. This is done with the Gradient using the ‘del’ operator $\nabla$. For a function with $n$ variables, $f(x_1,x_2,...,x_n)$ the del operator is a vector:
$$ \nabla = \frac{\partial}{\partial x_1},\frac{\partial}{\partial x_2},\dots,\frac{\partial}{\partial x_n} $$
And the gradient is then a $n$ dimensional vector
$$ \vec{\nabla f}(x_1,x_2,...,x_n) = \bigg[\frac{\partial f}{\partial x_1},\frac{\partial f}{\partial x_2},\dots,\frac{\partial f}{\partial x_n}\bigg] $$
Where each partial derivative is evaluated at the point $(x_1,x_2,...,x_n)$
The gradient is a vector that points in the direction of greatest ascent. If you start at the point $(x_1,x_2,...,x_n)$ and take a step in the direction of $\vec{\nabla f}$ this will produce to the greatest increase in $f$. To see why this is true intuitively by considering each component of $\vec{\nabla f}$:
$$ \frac{\partial f}{\partial x_i}\hat x_i $$
If the partial derivative in the $\hat x_i$ direction is postive, this component will point in towards positive $\hat x_i$ direction and if the partial derivative is negative then it points in the opposite direction towards an increase in $f$ (if the derivative is negative with respect to $x_i$ then that means a small increase in $x_i$ leads to a decrease in $f$; so if there is a small decrease in $x_i$ then there will be an increase in $f$).
Additionally, components with larger partial derivatives will have a greater influnence over the direction of the gradient vector. Thus the vector will point in the direction that leads to an increase in $f$ for every coordinate $x_i$
We can see these ideas executed in the directional derivative. This equation will give us the derivative of a function in the direction of a unit vector $\hat u$