Partial derivatives of vector fields
So let's start thinking about partial derivatives of vector fields. A vector field, as a function, I'll do—I’ll just do a two-dimensional example here—is going to be something that has a two-dimensional input, and then the output has the same number of dimensions. That's the important part. Each of these components in the output is going to depend somehow on the input variables.
So, the example I have in mind will be x times y as that first component, and then y squared minus x squared as that second component. You can compute the partial derivative of a guy like this, right? You'll take the partial derivative with respect to one of the input variables—I’ll choose x, it's always a nice one to start with—partial derivative with respect to x. If we were to actually compute it in this case, it's another—it’s a function of x and y.
What you do is you take the partial derivative component-wise, so you go to each component, and the first one you say, "Okay, x looks like a variable, y looks like a constant." The derivative will just be that constant. Then the partial derivative of this second component, that y squared looks like a constant; the derivative of negative x squared with respect to x is negative 2x.
So analytically, if you know how to take a partial derivative, you already know how to take a partial derivative of vector-valued functions and hence vector fields. But the fun part, the important part here, is how do you actually interpret this, and this has everything to do with visualizing it in some way.
The vector field— the reason we call it a vector field—is you kind of take the whole x-y plane and you're going to fill it with vectors. Concretely, what I mean by that is you’ll take a given input. Uh, what's an input you want to look at? Like, um, I’ll say maybe (1, 2). But yeah, let's do that—let's do (1, 2), which would mean you kind of go x equals 1, and then y equals 2 at this input point.
We want to associate that with the output vector in some way, and so let's just compute what it should equal. So, when we plug in x equals 1 and y equals 2, x times y becomes 2. Y squared minus x squared becomes 2 squared minus 1 squared, so 4 minus 1 is 3. So, we have this vector (2, 3) that we want to associate with that input point.
In vector fields, you just attach the two points. You just—I’m going to take the vector (2, 3) and attach it to this guy. So it should have an x component of 2, and then a y component of 3. So it’s going to end up looking something like this—let's see—so kind of y component of 3, something like this. So that'll be the vector, and we attach it to that point.
In principle, you do this to all of the different points, and if you did, what you’d get would be something like this. Remember when we represent these, especially with computers, it tends to lie where each represented vector is much, much shorter than it should be in reality, but you just want to squish them all onto the same page so they don’t overrun each other. Here, color is supposed to give a general vague sense of relative length, so ones that are blue should be thought of as much shorter than the ones that are yellow.
But that doesn’t really give like a specific thought for how long they should be. For partial derivatives, we actually care a lot about the specifics. If you think back to how we interpret partial derivatives in a lot of other contexts, what we want to do is imagine this partial x here as a slight nudge in the x direction, right? So this was our original input, and you might imagine just nudging it a little bit, and the size of that nudge as a number would be your partial x.
Then the question is, what’s the resulting change to the output? Because the output is a vector, the change in the output is also going to be a vector. What we want is to say there's going to be some other vector attached to this point, right? It’s going to look very similar—maybe it looks like—maybe it looks something like this, so something similar, but maybe a little bit different.
You want to take that difference in vector form, and I'll describe what I mean by that in just a moment, and then divide it by the size of that original nudge. To be much more specific about what I mean here, um, if you're comparing two different vectors and they're rooted in two different spots, I think a good way to start is to just move them to a new space where they're rooted in the same spot.
So, in this case, I'm just going to kind of draw a separate space over here and be thinking of this as a place for these vectors to live. I’m going to put them both on this plane, but I'm going to root them each in the origin. So this first one that has components (2, 3)—let’s give it a name, right? Let's call this guy v1. Okay? So that'll be v1.
Then, the nudged output, the second one I'll call v2. Let’s say v2 is also in the space, and I might exaggerate the difference just so that we can see it here. Let’s say these were our two vectors—the difference between these guys is going to be a vector that connects the tips, and I'm going to call that guy like partial v.
The way that you can be thinking about this is to say that v1—v1, that original guy, plus that tiny nudge, the difference between them is equal to v2. You know, the nudged output, and in terms of tip to tail with vectors, you're saying that kind of the green vector plus that blue vector is the same as that pink vector that connects the tail of the original one to the tip of the new one.
So when we're thinking of a partial derivative, you're basically saying, "Hey, what happens if we take this—the nudge—the size of the nudge of the output and then we divide it by that nudge of the input?" So let’s say you were thinking of that original nudge as being, I don’t know, like of a size one-half—like 0.5—as the change in the x-direction.
Then that would mean when you go over here and you say, "What’s that dv?" that changing vector v divided by dx—you'd be dividing it by 0.5. In principle, you’d be thinking of that would mean that you’re kind of scaling this by two as if to say this little dv is one-half of some other vector. And that other vector is what the partial derivative is.
So this other vector here, the full blue guy, would be dv, you know, scaled down or scaled up, however you want to think about it, by that partial x. And that’s what makes it such that, you know, in principle, if this partial x change was really small—it was like 1/100—and the output nudge also was really small, like 1/100, or you know, something on that order, it wouldn’t be specifically that then the dv/dx—that change would still be a normal sized vector, and the direction that it points is still kind of an indication of the direction that this green vector should change as you’re scooting over.
So just to be concrete and, you know, actually compute this guy, let’s say we were to take this partial derivative, partial of v with respect to x, and evaluate it at that point (1, 2) that we’re just dealing with (1, 2). What that would mean is y is equal to 2, so that first component is 2, and then x is equal to 1, so that next one should be negative 2.
Um, I guess we can see just how wrong my drawing was to start here; I was just kind of guessing what the pink vector would be. But I guess it changes in the direction of (2, -2), so that should be something here. I’ll kind of erase the—what turns out to be the wrong direction here—get rid of this guy, and I guess the change should be in the direction kind of (2) as the x component and then (-2) as the y component.
So the derivative vector should look something like this, which means all corresponding little dv nudges will be slight changes—will be slight changes on that. So these will be your dvs, something in that direction.
What that means in our vector field then, as you move in the x direction and consider the various vectors attached to each point, as you’re kind of passing through the point (1, 2), the way that the vectors are changing should be somehow, you know, down and to the right. The tip should move down and to the right, so if this starts, you know, highly up and to the right, then it should be getting kind of shorter but then longer to the right.
So, the v2, if I were to have drawn it more accurately here—you know what that nudged output should look like—it would really be something that’s kind of like, I don’t know, like this, where it’s getting shorter in the y direction but then longer in the x direction as per that blue nudging arrow.
In the next video, I’ll kind of go through more examples of how you might think of this, how you think of it in terms of what each component means, which becomes very important for later topics like divergence and curl. I’ll see you next video.