If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Partial derivatives of vector fields, component by component

Here we step through each partial derivative of each component in a vector field, and understand what each means geometrically. Created by Grant Sanderson.

Want to join the conversation?

  • piceratops tree style avatar for user Dan Astley
    Should partial Q with respect to x at pt (2,0) be -4, not -2 as written?
    (46 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user gurungdebendra82
    this question may not be in tnis context. but what is the difference between position vector valued function and the vector field function. position vector valued function seems pretty decent to understand because it is vector value at each point, usually interpreted as beautifully when taking the gradient of scalar temperature function. But when the function is already defined to be vector field equation, whats its gradient going to be. Also how do we measure the directional directive in each of the cases.
    mathmatically, suppose we have scalar function of temperature T to be ... f(x,y,z), that returns scalar function at each point in 3D. taking gradient gives us position vector valued function. and we can proceed to find the divergence and so the source and sink and so forth. pretty decent.
    but when we intially have a vector valued function as f(x,y,z) =x(t)i+y(t)j+z(t)k. is this a position vector valued function or is this a function of magnitude of vector in corresponding direction. for instance for a function, f(v) =xi+yj+zk. its magnitude when x,y and z =1; is 1. and when x,y and z=2, magnitude is sqrt (12). but is still in the same direction.
    (4 votes)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user Grant
      Position vector-valued functions have a one-dimensional input (usually thought of as time), and a multidimensional output (the vector itself).

      Vector fields have a multidimensional input (e.g. the xy-plane), and a multidimensional output (vectors in that same space).

      The gradient only applies to functions with a multidimensional input, and a scalar-valued output, or in other words, a one-dimensional output.

      Does that help?
      (26 votes)
  • blobby green style avatar for user st02mcma
    At when Grant starts to look at the partial of Q with respect to y, how is the magnitude of y not changing? It sure looks like it is. Is this just a consequence of Grant evaluating to far away from the original input (x,y) coordinate of (2,0)?
    (9 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user storpannan
    Around you show that the vectors' y-value decrease as the x increases, which seems correct since dQ/dx = -2x, but this equation also indicates that the y-value of the vectors should increase when x < 0. Which is contradicted by the fact that every vector on the graph, when y = 0 (and thus irrelevant for the vectors' y-value), point downward, even when x < 0.
    Is the visual representation faulty or am I missing something here?
    (4 votes)
    Default Khan Academy avatar avatar for user
    • leafers seed style avatar for user William
      You have to remember that it is not the direction that the vectors are pointing that matters, but rather the change in their P and Q values. Partial Q with respect to partial x (dQ/dx) represents the change in the vectors' Q value as you move in the positive direction along the input x-axis. It is true that the vectors point downward for both positive and negative x inputs along the P-axis. However, when x < 0, the Q values are increasing (the vectors are getting shorter, or less negative in the Q direction). When x > 0, the Q values are decreasing (the vectors are getting longer, or more negative in the Q direction).
      (1 vote)
  • blobby green style avatar for user P
    Hi. Are the values for the partial derivatives like 0, -2 -4 (-2 in the video) and 2 signify the magnitude or direction?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user jimming1
    This was asked years ago but never received a real answer. Why is it that with dQ/dx, Q is continuing to get more and more negative as x < 0? The derivative shows the change in Q should be increasingly more positive. Is this a bad graphical representation?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • piceratops tree style avatar for user Soami
      Let's take an example from the graph to make this clearer. If I take a vector pointing directly downwards with its tail at x on the x-axis and then 'move' a bit (dx) in the POSITIVE x-direction (as dx is positive), I know that the vector whose tail is at x+dx will have a y-component which will be -2x(dx) + the y-component of the original vector. So if x is positive, the y-component will decrease (become more negative) as -2x would be negative and a negative number added to a certain number will decrease that certain number. But if x is negative, then -2x will be positive, and if I add a positive number to a certain number, the sum would be greater than the certain number. So, take any vector in the negative side of the x-axis such that there is another vector to its right which is also on the negative side of the x-axis. You will notice that the 1st vector is longer than the 2nd vector. That makes sense, as you move to the right (on the negative side of the x-axis), you add a positive number to the negative y component of the vector making it increase or 'more positive'. So to summarize, dQ/dx is the amount the y-component of the vector changes as x changes by a single arbitrarily small unit of distance and dx is a positive number.
      (1 vote)
  • aqualine ultimate style avatar for user Blake Stewart
    In navier stokes, the equation given for the change in vector V (x,y,z,t), dv = (pV/px) dx + (pV/py) dy + (pV/pz) dz + (pV/pt) dt, where p is a partial. This makes sense, but my question is this.
    We try to find the "material derivative" of V with respect to time.
    We divide that original equation giving dv by dt, meaning total derivative. This means each dx, dy, dz, and dt is divided by dt, but shouldn't this be a partial derivative? Or is this just bad notation?
    Thanks for any help, Im sure this isn't the right place to ask too, but hopefully someone knows.
    (1 vote)
    Default Khan Academy avatar avatar for user

Video transcript

- [Voiceover] Let's continue thinking about partial derivatives of vector fields. This is one of those things that's pretty good practice for some important concepts coming up in multivariable calc, and it's also just good to sit down and take a complicated thing and kind of break it down piece by piece. So a vector field like the one I just showed is represented by a vector-valued function, and since it's two-dimensional, it'll have some kind of two-dimensional input. And the output will be a vector, each of whose components is some kind of function of x and y, right? So I'll just write P of x, y for that x-component and Q of x, y for that y-component. And each of these are just scalar-valued functions. It's actually quite common to use P and Q for these values. It's one of those things where sometimes you'll even see a theorem about vector calculus in terms of just P and Q, kind of leaving it understood to the reader that, yeah, P and Q always refer to the x and y components of the output of a vector field. And in this specific case, the function that I chose, it's actually the one that I used in the last video. P is equal to x times y, and Q is equal to y squared minus x squared. And in the last video, I was talking about interpreting the partial derivative of v, the vector-valued function with respect to one of the variables, which has its merits, and I think it's a good way to understand vector-valued functions in general. But here that's not what I'm gonna do. It's actually, another useful skill is to just think in terms of each specific component. So if we just think of P and Q, we have four possible partial derivatives at our disposal here, two of them with respect to P. So you can think about the partial derivative of P with respect to x, or the partial derivative of P with respect to y. And then similarly, Q, you could think about partial derivative of Q with respect to x. This should be a partial. Or the partial derivative of Q with respect to y. So four different values that you could be looking at and considering and understanding how they influence the change of the vector field as a whole. And in this specific example, let's actually compute these. So derivative of P with respect to x. P is this first component. We're taking the partial of this with respect to x. y looks like a constant. Constant times x. Derivative is just that constant. If we took the derivative with respect to y, the roles have reversed, and its partial derivative is x, 'cause x looks like that constant. But Q, its partial derivative with respect to x, y looks like a constant, negative x squared goes to negative 2x. But then when you're taking it with respect to y, y squared now looks like a function whose derivative is 2y, and negative x squared looks like the constant. So these are the four possible partial derivatives. But let's actually see if we can understand how they influence the function as a whole. What it means in terms of the picture that we're looking at up here. And, in particular, let's focus on a point, a specific point, and let's do this one here. So it's something that's sitting on the x-axis. So this is where y equals zero and x is something positive. So this is probably when x is around two-ish, let's say. So the value we wanna look at is x, y when x is two and y is zero. So if we start plugging that in here, what that would mean, this guy goes to zero, this guy goes to two, this guy, negative two times x, is gonna be negative two. And then negative two times y is gonna be zero. And let's start by just looking at the partial derivative of P with respect to x. So what that means is that we're looking for how the x-component of these vectors change as you move in the x direction. For example, around this point, we're kind of thinking of moving in the x direction, vaguely. So we wanna look at the two neighboring vectors and consider what's going on with the x direction. But these vectors, this one points purely down. This one also points purely down, and so does this one. So no change is happening when it comes to the x-component of these vectors, which makes sense because the value at that point is zero. The partial derivative of P with respect to x is zero, so we wouldn't expect a change. But on the other hand, on the other hand, if we're looking at partial derivative of P with respect to y, this should be positive. So this should suggest that the change in the x-component as you move in the y direction is positive. So we go up here and now we're not looking at change in the x-direction. Not looking at change in the x-direction. But instead we're wondering what happens as we move generally upwards. So we're gonna kind of compare it to these two guys. And in that case, the x-component of this one is a little bit to the left. The one below it, it's a little bit to the left. Then we get to our main guy here and it's zero. The x-component is zero 'cause it's pointing purely down. And up here it's pointing a little bit to the right. So as y increases, the x-component of these vectors also increases. And again, that makes sense because this partial derivative is positive. This two suggests that as you're changing y, the value of p, the x-component of our function, should probably keep that on screen. You know, the x-component of our vector-valued function is increasing 'cause that's positive. For contrast, let's say we look at the Q component over here. So what this is doing, we're looking at changes in the x, and we're wondering what the y value of the vector does. So we go up here. And now, we're not looking at changes in the y direction. But instead, we're going back to considering what happens as we change x, as we're kind of moving in the horizontal direction here. So again, we look at these neighboring guys. And now, the y-component starts off small, but negative, then gets a little bit more negative, then gets even more negative. And if we kind of keep looking at these, the y-component is getting more, and more, and more negative so it's decreasing. The value of Q, the y-component of these vectors should be decreasing. And that lines up 'cause the partial derivative here was negative two, so that's telling us, given that it started negative, it's getting more negative. If it started positive, they would've been kind of getting shorter as vectors as their y-component got smaller. And then finally, just to close things off nice and simply here, if we look at partial of Q with respect to y, so now if we start looking at changes in the y direction, and we start considering how, as you move below, and then starting to go up, what happens to the y-component, here, the y-component is a little bit negative, right? It's pointing down and to the left. So down, it's a little bit negative. Here, the y-component is also a little bit negative. Over here, well, it remains a little bit negative. And you know, from our heuristic look, there's no discernible change. Maybe it's changing a little bit, and we don't have a fine enough vision of these vectors to see that, but if we actually go back to the analysis, and see what we computed, in fact, it is zero. That fact that it looked like there was not too much change in the y-component of each one of these vectors corresponds with the fact that the partial derivative of that y-component with respect to y, with respect to vertical movements, is zero. So this kind of analysis should give a better feel for how we understand the four different possible partial derivatives and what they indicate about the vector field, and you'll get plenty of chance to practice that understanding as we learn about divergence and curl, and try to understand why each one of those represents the thing that it's supposed to. And you'll see what I mean by that in just a couple videos.