# Gradient

Gradient is basically the vector representation of the partial derivatives.&#x20;

Gradient of a function at point $$p$$, basically gives the direction and the rate of fastest increase.&#x20;

The gradient is represented as $$\nabla f$$. Where

$$
\nabla f = \frac{\partial f}{\partial x} \mathbf i +  \frac{\partial f}{\partial y} \mathbf j
$$

Mostly Gradient is represented at column vector i.e

$$
\nabla f = [\frac{\partial f}{\partial x} ,\frac{\partial f}{\partial y}]^T
$$

Imagine a 3D graph, which is like hills and valleys. $$x$$and $$y$$ are two dimension and $$f(x,y)$$ determines the hieght of graph at $$x,y$$. Now imagine a ball at any point on the surface of the graph. Now the if let the ball roll, the $$- \nabla f$$basically gives you the direction of where the ball would roll towards.&#x20;

**Think of the gradient as a vector field, ie, the gradient at every point basically tells where does that point is moving to have the fastest rate of change in function. &#x20;**<mark style="color:red;">**But why?**</mark>

### Gradient as the direction of Steepest Ascent

{% embed url="https://youtu.be/TEB2z7ZlRAw" %}

### Relationship between Gradient and Derivative

Gradient is the change in the input. <mark style="color:orange;">(Make this more clear),</mark> [<mark style="color:orange;">https://en.wikipedia.org/wiki/Gradient#Relationship\_with\_derivative</mark>](https://en.wikipedia.org/wiki/Gradient#Relationship_with_derivative)

{% embed url="https://math.libretexts.org/Bookshelves/Calculus/Calculus_(OpenStax)/14%3A_Differentiation_of_Functions_of_Several_Variables/14.06%3A_Directional_Derivatives_and_the_Gradient" %}

### Graident and Trangent Plane

<figure><img src="https://1877261540-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LFDuA0A2VRqmT31Blrq%2Fuploads%2FdDnzA5H9S3395WeIQbOI%2Fimage.png?alt=media&#x26;token=bdd06a21-4074-489d-a269-14bbe575ad1a" alt=""><figcaption></figcaption></figure>

Tangent plane is the plane passing through the point and both tangent line at the point. Get get eqn of these tangent lines using the partial derivative.

Basically both the tangent lines lies in the tangent plane. And two lines passing through a plane are enough to get a unique plane equation.&#x20;



### Resources

{% embed url="https://youtu.be/_-02ze7tf08" %}

{% embed url="https://youtu.be/QQPz3eXXgQI" %}

###

### &#x20;
