4
$\begingroup$

One day I was reading my physics book and suddenly I came across the word gradient. The following mathematical method is used in my book to determine gradient:

$$\Omega(x,y,z)=3x\cdot(y^2)\cdot(z^3)-4xy$$

Now they determined the gradient in point (2,1,1) and it was

$$ \nabla \Omega = 7i-20j+18k$$

Now what does it actually mean? I mean if we know that 20 N of net force is applied on a mass of 2 kg than it will have an acceleration of 10 $\rm m/s^2$. In my example, the gradient in point (2,1,1) is determined. What information can I get from that? The same is also for divergence and curl.

$\endgroup$

migrated from physics.stackexchange.com Apr 19 '18 at 12:09

This question came from our site for active researchers, academics and students of physics.

  • $\begingroup$ $$\nabla f=\sum \frac{\partial f}{\partial x^i}e_i$$ $\endgroup$ – Ryan Unger Apr 13 '18 at 11:02
  • 1
    $\begingroup$ If you want a clear and concise explanation, I would recommend H.M. Schey's Div, grad, curl, and all that $\endgroup$ – E.P. Apr 13 '18 at 12:24
  • $\begingroup$ I would recommend that you use a simpler two-variable function, say $\Omega(x, y) = 3xy^2 - 4xy $. That way, you can visualize the graph of the function as a surface in three dimensions (just set $z = \Omega(x, y) = 3xy^2 - 4xy$ and plot it). Then calculate the level curve passing through $(2,1)$ and the gradient at the same point: you should find out that they are perpendicular. Do some more examples in two dimensions to get some insight - then add another dimension. $\endgroup$ – NickD Apr 13 '18 at 12:27
  • $\begingroup$ @Nick It will be really helpful if you could give me the link to a site for their derivation. $\endgroup$ – Asif Iqubal Apr 13 '18 at 12:48
1
$\begingroup$

You asked for a more physical sense, and it is this:

Suppose that you want to move from a point $\vec r_0 = (x_0,~ y_0,~ z_0)$ to a nearby point $\vec r_0 + \delta\vec r = (x_0 + \delta x,~ y_0 + \delta y,~ z_0+\delta z).$ By how much does the function $\Omega$ change?

When you were dealing with graphs of single-variable functions, you thought of a 2D space and approximated the function with a line. With two variables, $f(x, y)$ is some sort of graph of "rolling hills" in 3D space, with 2D tangent planes. But the basic idea is the same: if these functions are "differentiable" in the right way at a point, then "zooming in" on a small neighborhood of that point, the graph eventually seems "flat" (i.e. there is a tangent plane $f(x,y)\approx ax + by + c$) in that neighborhood. And the story for $f(x,y,z)$ is the same but the space is now 4D and you are thinking about a tangent 3D hyperplane, $f \approx ax + b y + c z + d$, for some constants $(a,b,c,d)$.

The coefficients here come by taking for example the partial derivative of $f$ with respect to $x$ holding $y,z$ constant, which we would write as $\left({\partial f\over\partial x}\right)_{y,z}.$ This is now another function with respect to $(x, y, z)$. But if one evaluates it at a point such as our $\vec r_0$ one gets a number, and this number is our $a$ when we are looking for the linear approximation at that point. Let's call this number $(\partial_x f)_0$ for short.

If you use the above linear expression to calculate the change in $\Omega$ it starts off at $\Omega_0 = \Omega(\vec r_0)$ but becomes some $\Omega_0 + \delta \Omega,$ and you will find that the resulting expression for the change in $\Omega$ is just: $$\delta\Omega \approx (\partial_x \Omega)_0~\delta x +(\partial_y \Omega)_0~\delta y +(\partial_z \Omega)_0~\delta z.$$But since $\delta \vec r = (\delta x, \delta y, \delta z)$ transforms under coordinate transformations like a vector does, and $\delta \Omega$ transforms like a scalar does, we find that this mapping between them transforms like a covector or "1-form" does. With a little fiddling, every covector is equivalent to a vector, and so the gradient functions can be thought of as combining to form a vector field over the space, $$\nabla\Omega = \begin{bmatrix}\partial_x \Omega\\\partial_y\Omega\\\partial_z\Omega\end{bmatrix}.$$ We would write the above as a special case of this, $$\delta\Omega = \big[\nabla\Omega\big](\vec r_0) \cdot \delta \vec r.$$In practice we generally leave off the square brackets above because we understand that we almost never want to take the gradient of the constant $\Omega(\vec r_0) = \Omega_0$, which would be trivially zero. We almost always would rather evaluate the gradient at a point.

So this is the relation you asked for: you can calculate little changes in the function given little changes in space, by computing a dot product between the gradient of the function at that base point, with the vector relating the change in space.

From the above relation you can extract three more insights that will be very useful:

  1. This is a simple dot product, which goes like two magnitudes times the cosine of an angle between them. So the direction of the gradient vector is the direction of greatest increase of the function; and the reverse direction is the direction of greatest decrease.

  2. Conversely, imagine you are looking at some level set $f(x, y, z) = C.$ This relationship specifies a 2D surface in 3D space where $f$ remains constant. Constant is in fact the exact opposite of "greatest increase/decrease," so that leaving $f$ constant in fact demands that we only move along those small $\delta \vec r$ such that $\nabla f \cdot \delta \vec r = 0,$ the directions perpendicular to the gradient. Therefore the gradient is the surface normal, perpendicular to the level sets of the function. In fact following the above where the hyperplane at that point is $f \approx ax + by + cz + d$, one finds that the hyperplane is $ax + by + cz = f_0 - d$ and one can read the coefficents of the hyperplane tangent to the level set $(a, b, c)$ right off of the comoponents of the gradient; they are the same numbers.

  3. "Lagrange multipliers." Combining these two, suppose that you want to maximize some $f(x, y, z)$ given some constraint $g(x, y, z) = C.$ If we're at a maximum, that means that we cannot increase it further, which means that all of the allowed $\delta \vec r$ (such that $\nabla g\cdot\delta \vec r = 0,$ satisfying the constraint) must also satisfy $\nabla f \cdot \delta \vec r = 0,$ since it certainly cannot be positive (otherwise we are not at a maximum since we could increase $f$ by moving a little in that direction, satisfying the constraints while increasing $f$) and linearity also means it cannot be negative (since you can then step in the opposite direction and the sign of the $\cos \theta$ from the dot product must flip, and you're increasing $f$ again). It turns out that this idea of shared nullspace—"whenever $\vec u \cdot \vec w = 0$ then $\vec v \cdot \vec w = 0$ too—is sufficient to conclude that $\vec u$ and $\vec v$ are parallel, $\vec u = \lambda \vec v.$ So too $\nabla f$ at a maximum must be perpendicular to the constraint surface and hence must be parallel to $\nabla g$, so the proper way to find a constrained maximum is to solve $\nabla f - \lambda \nabla g = 0$ for unknown $\lambda,$ which is called a "Lagrange multiplier". These give (in 3D) three equations in four unknowns $(x, y, z, \lambda)$ and the final equation of $g(x, y, z) = C$ allows to solve for all four unknowns completely.

$\endgroup$
  • $\begingroup$ CR Drost How can the formula to Gradient determine the greatest slope? I mean derivative of a function give the slope but how can it give the greatest slope? $\endgroup$ – Asif Iqubal Apr 18 '18 at 15:49
  • $\begingroup$ @AsifIqubal I showed above that $\delta f \approx \nabla f \cdot \delta \vec r.$ From this equation I read off the fact that the function $f$ sees its greatest increase in the direction of $\nabla f$, since $\vec a \cdot \vec b = \|\vec a\|~\|\vec b\|~\cos\theta$ and the greatest increase comes when $\theta = 1.$ Now suppose you were to walk a step of side $\delta x$ in that direction, you would have $\delta \vec r = \delta x~\nabla f/\|\nabla f\|,$ leading to a formula $\delta f/\delta x = \nabla f \cdot \nabla f / \|\nabla f\| = \|\nabla f\| = \sqrt{\nabla f\cdot \nabla f}.$ $\endgroup$ – CR Drost Apr 21 '18 at 19:33
3
$\begingroup$

Gradient points in the direction of the greatest rate of increase of a function whereas it's magnitude |$\nabla f|$ is the slope of the graph in that direction.
You know that the derivative of a function is the tangent on the graph at some point. Gradient is just the partial derivative (in Cartesian coordinates) in respect to $x$, $y$, $z$ (so now it is a plant and not a line).
$$\nabla f = \frac{\partial f}{\partial x}\hat{i} +\frac{\partial f}{\partial y}\hat{j} + \frac{\partial f}{\partial z}\hat{k}$$
If you imagine standing at a point $(x_0, y_0, \ldots)$ in the input space of $f$, the vector $\nabla f(x_0,y_0,\ldots )$ tells you which direction you should travel to increase the value of $f$ most rapidly. These gradient vectors are also perpendicular to contour lines of $f$

$\endgroup$
  • $\begingroup$ Given my example, what does it mean that the gradient is 7i-20j+18k in point(2,1,1)? $\endgroup$ – Asif Iqubal Apr 13 '18 at 11:35
  • $\begingroup$ @AsifIqubal That just means that at that point in 3D space the direction of the greatest increase of field is by $7$ in $x$ direction, $20$ in $-y$ direction and $18$ in $z$ direction. $\endgroup$ – Dominik Car Apr 13 '18 at 22:42
  • $\begingroup$ Thanks. Can you give me the derivation? $\endgroup$ – Asif Iqubal Apr 14 '18 at 5:48
  • $\begingroup$ @Alper gave you the derivation at the bottom of his answer. $\endgroup$ – Dominik Car Apr 14 '18 at 7:25
0
$\begingroup$

Gradient:

$ \nabla F = \frac{\partial F }{\partial x} \hat{i} + \frac{\partial F }{\partial y} \hat{j} + \frac{\partial F }{\partial z} \hat{k} $

Meaning of gradient: Think a curved surface like a mountain. Gradient on any point is the slope of tangent plane of that point. Direction of the gradient is where a ball goes when put on the point. Gradient on a peak or a pit is zero. Example: divergence of electrical potential equals electric field with minus sign.

Divergence:

$ (\vec{A} = A_x \hat{i} + A_y \hat{j} + A_z \hat{k} ) \\ \nabla \vec{A} = \frac{\partial{A_x}}{\partial{x}} + \frac{\partial{A_y}}{\partial{y}} + \frac{\partial{A_z}}{\partial{z}} $

Divergence is an operator applied to a vectoral function and producing a scalar function. If divergence is zero on a point, that point is either a source or a sink. For example, in electrical field charges have zero divergence.

Curl/Rotational:

$ \nabla{\vec{A}} = \begin{array}{|ccc|} \hat{i} & \hat{j} & \hat{k} \\ \frac{\partial}{\partial{x}} & \frac{\partial}{\partial{y}} & \frac{\partial}{\partial{z}} \\ A_x & A_y & A_z \end{array} $

Curl is a measure of rotation on a vector field. For example, curl of magnetic induction around a wire equals the current density on the wire.

Note: These formulas are valid for Cartesian coordinate system. For other coordinate systems some coefficients should be added to the formula.


Your expression probably has a typo. -4xy should be +4xy

$ x=2, \, y=1, \, z=1 \\ \frac{\partial{\Omega}}{\partial{x}} = 3 y^2 z^3 + 4 y = 7 \\ \frac{\partial{\Omega}}{\partial{x}} = 6 x y z^3 + 4 x = 20\\ \frac{\partial{\Omega}}{\partial{z}} = 9 x y^2 z^2 = 18\\ $

Edit: added example

$\endgroup$
  • $\begingroup$ Also note that the -20 should be +20. $\endgroup$ – David Hammen Apr 13 '18 at 12:13
  • $\begingroup$ @Alper I want an explanation like my example for force. It will be really helpful for me if you give me a that kind of explanation. $\endgroup$ – Asif Iqubal Apr 13 '18 at 12:45
0
$\begingroup$

It’s a way of describing the slope on a multi-dimensional surface. Mathematically, it’s a type of derivative that accepts a field and returns a vector field that indicates the magnitude and direction of the greatest slope.

To visualize it, image that you are on the side of a hill and you ask someone ‘what’s the slope of this hill right here?’ The reply might be something like ‘along what direction?’ In which case you have to supply the direction along which a derivative should be taken. But usually you just want the maximum slope; that’s really what you mean. So the gradient operator takes all the points on the ‘hill’ and returns the maximum slope at each point and the direction along which it occurs.

$\endgroup$
  • $\begingroup$ How can the formula to Gradient determine the greatest slope? I mean derivative of a function give the slope but how can it give the greatest slope? $\endgroup$ – Asif Iqubal Apr 18 '18 at 15:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.