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

3d curl formula, part 1

How to compute a three-dimensional curl, imagined as a cross product of sorts. Created by Grant Sanderson.

Want to join the conversation?

  • blobby green style avatar for user Ahmed Sheta
    In the video about the cross product, Sal said the cross products are only defined in 3-d, while here you said that it could be defined in 2-d.
    So, did Sal originally meant that cross products are defined in 3-d or less ?
    (10 votes)
    Default Khan Academy avatar avatar for user
    • winston baby style avatar for user Andrew
      I think he meant this:
      If you are working in two dimensions, let's say in the x-y plane, the cross product will be a vector in the z direction. If you are in the x-z plane, the cross product will be a vector in the y direction. If you are in the y-z plane, the cross product will be a vector in the x direction. Hence the reason why Sal said that the cross products are only defined in 3-d.
      Maybe he meant something else or just made a mistake but that's my understanding of it. :)
      (9 votes)
  • blobby green style avatar for user P
    Where would one find this cross product video Grant mentioned? I've done the matrices playlist and only the dot product was brought up.
    (5 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Jayden  Jackson
    I'm really confused with the use of the cross product to represent curl; we take the product of each partial derivative with its corresponding components and subtract them from each other, which gives us the 2-D formula for curl, but previously we have been taking the partial of P with respect to y for example. I thought that taking a partial derivative is an operation rather than a multiplication?
    (3 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Robert Joseph
    So using the cross product, is curl generalizable to more than 3 dimensions?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • piceratops sapling style avatar for user akiilessh
    is the value of vector,V same in the whole 3d space? for example if we take v vector as velocity of air, sometimes it may flow at different speed at some locations. So how come a sine function represents the velocity of whole air?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Janez Novak
    Why does computation go as nabla X vector, why not the other way around- vector X nabla?
    (1 vote)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user MBCory
      For cross-products, order matters, so a X b is not the same as b X a (a X b = -(b X a)). The nabla X vector notation isn't really a calculation, it's more of a way to remember the formula for curl (a "notational trick", as Grant says).
      Hope this helps!
      (3 votes)
  • male robot hal style avatar for user KEVIN
    Two questions:
    1)are the "tricks"/methods Grant is using standard procedure among mathematicians?
    2) how did anyone visualize/manipulate these concepts prior to having access to computer generated graphing programs?

    It seems to me that this whole realm of math is pointing at least towards quantum theory --please correct if I'm mistaken -- and we know that those folks did not have computers. Any insight is appreciated.
    (1 vote)
    Default Khan Academy avatar avatar for user

Video transcript

- [Voiceover] So I've spent a couple videos laying down the foundation for what three-dimensional curl is trying to represent, and here I'm going to go ahead and talk about how you actually compute it. Three-d curl is the kind of thing that you take with regards to a three-dimensional vector field. So something that takes in a three-dimensional point as its input, and then it's going to output a three-dimensional vector. It's common to write the component functions as P, Q, and R. Each one of these is a scale or valued function that takes in a three-dimensional point, and just outputs a number. So, it'll be that same three-d point with the coordinates x, y, and z. So when you have a three-dimensional vector field like this, the image you might have in mind would be something like this, where every point in three-dimensional space has a vector attached to it. And you know, when you actually look at it, there's quite a lot going on, but in principle, all that's really happening is that each point in space is associated with a vector. The point in space is the input and the vector is the output. You're just gluing them together. Naturally, between the three dimensions of the input and the three dimensions of the output, we have six dimensions going on, the picture that you're looking at becomes quite messy. So, the question is, how do you compute this curl value that I've been talking about. Curl of your vector value function. Just as a quick reminder, what this is supposed to be, is you're going to have some kind of fluid flow induced by this vector field, where you're imagining air flowing along each vector. What you want is a function that tells you at any given point, what is the rotation induced by that fluid flow around that point. Because rotation is described with a three-dimensional vector, you're expecting this to be vector-valued. It'll be something that equals a vector output. If that doesn't make sense, if that doesn't quite jive, maybe go check out the video on how to represent three-dimensional rotation with a vector. So what you have here is going to be something that takes as its input, x, y, and z. It takes a three-dimensional point, and what it outputs is a vector describing rotation, and there's actually another notation that's quite, quite helpful when it comes to computing this. You take nabla, that upside-down triangle we used in divergence and gradient, and you imagine taking the cross-product between that and your vector V. As a reminder, this nabla, you imagine it as if it's a vector containing partial differential operators. That's the kind of thing where, when you say it out loud, it sounds kinda fancy, a vector full of partial differential operators, but all it really means is I'm just going to write a bunch of symbols. This partial partial x is something that wants to take in a multi-variable function, and tell you its partial derivative. Strictly speaking, this doesn't really make sense, like, hey, how can a vector contain these partial differential operators? But as a series of symbolic movements, it's actually quite helpful, because when you're multiplying these guys by a thing, it's not really multiplication. You're really going to be giving it some kind of multi-variable function, like P, Q, or R, the component functions of our vector field, and evaluating it. So just as a warm-up for how to do this, let's see what this looks like in the case of two dimensions, where we already know the formula for two-dimensional curl. What that would look like, is you have a smaller, more two-dimensional, just partial partial x, partial partial y, del operator. You're going to take the cross-product between that and a two-dimensional vector that's just the component functions P and Q. In this case, P and Q would be just functions of x and y. So I'm kind of overloading notation right, over here I have a two-dimensional vector field that I'm saying, P and y are scale or value functions with a two-dimensional input, but over here I'm also using P and Q to represent ones with a three-dimensional input. So you should think of these as separate, but it's common to use the same names. This is going to illustrate the broader, more complicated point. When you compute something like this, the cross-product, you typically think of it as taking these diagonal components and multiplying them, so that would be your partial partial x, "multiplied" with Q, which really means you're taking the partial derivative of Q with respect to x. Then you subtract off this diagonal component here, oh sorry, this should be a y. This should be partial partial y. Sorry about that. You need partial partial y of P, and that's what you're subtracting off. So partial partial y of P, just the partial derivative of that P function with respect to y. Hopefully this is something you recognize. This is the two-dimensional curl. It's something we got an intuition for, I want it to be more than just a formula, but hopefully this is kind of reassuring that when you take that del operator, that nabla symbol, and cross-product with the vector valued function itself, it gives you a sense of curl. Now when we do this in the three-dimensional case, we're going to take a three-dimensional cross-product between this three-dimensional vectorish thing and this three-dimensional function. If you're not terribly comfortable with the cross-product, how to compute it or how to interpret it and things like that, now would probably be a good time to go find the videos that Sal does on this and build up that intuition for what a cross-product actually is and how to compute it. Because at this point, I'm going to assume that you know how to compute it because we're doing it in kind of an absurd context of partial differential operators and functions, so it's important to have that foundation. The way you compute a thing like this, is you construct a determinant. I'm going to go down here. Determinant of a certain 3x3 matrix. The top row of that is all of the unit vectors in various directions of three-dimensional space. So these I, J, and K guys, I represents the unit vector in the x direction, so that would be I is equal to, x component is one but then the other components are zero. Then similarly, J and K represent the unit vectors in the y and z direction, and again, if that doesn't quite make sense, why I'm putting them up there or what we're about to do, maybe check out that cross-product video. So we put those in the top rows as vectors. This is the trick to computing the cross-product, because again, what does it mean to put a vector inside a matrix, but it's a notational trick. Then we're going to take the first vector that we're doing the cross-product with, and put its components in the next row. What that would look like, is the next row has a partial partial y, no sorry, God I keep messing up here, that's an x, you do whatever the first component is first, and then the second component second, and the third component, the z, partial z. Don't know why I'm making that little mistake. For the last row, you put in the second vector, which is in this case, is vector value function P, Q, and R. P, which is a multi-variable function, Q, and R. First, it's worth stepping back and looking at this. This is kind of an absurd thing. Usually when we talk about matrices and taking the determinant, all of the components are numbers because you're multiplying numbers together. But here, we've got a notational trick layered on top of a notational trick, so that one of the rows is vectors, one of the rows is partial differential operators, and then the last one, each one of these is a multi-variable function. So it seems like this absurd, convoluted, as far away from a matrix full of numbers thing as you can get, but it's actually very helpful for computation. If you go through the process of computing this determinant and saying, what could that mean, the thing that pops out is going to be the formula for three-dimensional curl. At the risk of having a video that runs too long, I'll call things and end here, but continue going through that operation in the next video.