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

Normal vector from plane equation

Figuring out a normal vector to a plane from its equation. Created by Sal Khan.

Want to join the conversation?

  • male robot johnny style avatar for user Rubén Treviño
    This video explains how to get a normal vector, but a plane has infinite number of normal vectors right? I mean, each point on the plane has a normal vector. Is the normal vector calculated in this video special somehow? or why is the other normal vectors not explicitly written in the plane equation?
    (31 votes)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user Tyler
      You're correct in that each point will have a normal vector, however since we're dealing with a flat plane each of those normal vectors will be the same (they will all point in the same relative direction). Therefore all the points on the plane share a "unique" normal vector.
      If instead we were dealing with a sphere, or some other non-flat surface, then the normal vector would be different at each point on the surface and we would have a similar situation to what you were describing.
      (84 votes)
  • mr pants teal style avatar for user Michael James Jagdharry
    I still don't understand why A, B, and C are the normal vector coordinates..
    (24 votes)
    Default Khan Academy avatar avatar for user
    • spunky sam blue style avatar for user Ethan Dlugie
      Here's how I like to think of it. I've got a line in R^2
      Ax+By=C.
      If I want to find a normal vector, I can find the slope of the line and then do the opposite reciprocal to find a normal vector.
      By=-Ax+C
      y=-A/B*x+C/B. The slope is -A/B. A normal vector will have slope B/A. An easy way to construct this is to make the y comp = B and the x comp = A. Thus, the vector normal the line Ax+By=C is [A, B]. The jump to 3D is now more intuitive.
      (31 votes)
  • blobby green style avatar for user eiger3970
    Thanks for the great tutorials Sal.
    I'm learning, however I'm wondering if you have the y and z axes correct?
    In this video Normal vector from plane equation - , you label the x-axis as right (correct), y-axis as front (should be up) and z-axis as up (should be front).
    I tried turning my head so x-axis points right (correct) and y-axis points up (correct), however then the z-axis points to the back, meaning the positive z you wrote, should be negative z.
    Anyway, I'm learning so I might be wrong, however I would like to be clear on this as others I have spoken to seem unsure.
    (8 votes)
    Default Khan Academy avatar avatar for user
  • male robot hal style avatar for user Nicholas Hoefer
    How come this section doesn't have any quizzes?
    (16 votes)
    Default Khan Academy avatar avatar for user
  • aqualine seed style avatar for user AKHIL KRISHNAN
    Why is the normal vector equation n.(ai + bj +ck) ?
    (5 votes)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user Emil Fihlman
      I, j and k are the unit vectors towards the three different axes. All vectors in our three dimensional space can be expressed using them.
      The advantage of i, j and k come from the fact that they are all perpendicular to each other. This makes calculating them a lot of easier.
      Hope I helped.
      (10 votes)
  • blobby green style avatar for user tim.jebb
    I don't see how P-P1 can "lie along the plane". You've subtracted two position vectors - surely this would just give a third position vector, ie define a point? I can see that the line from the origin to the position defined by this third position vector would be in a second plane parallel to the first plane, but the second plane must include the origin. Or am I misunderstanding something?
    (6 votes)
    Default Khan Academy avatar avatar for user
    • leafers tree style avatar for user Elizabeth Hernandez
      Sal says P-P1 lies "on" the plane because it does when started from any point on the plane (as Sal did in his example). Drawing it between the endpoints of P and P1 helps illustrate why P-P1 is part of defining the plane, which is why he did so in his earlier video and again now.

      However, you are correct that vectors can be moved anywhere, so implying one is always on a specific plane is misleading. A more correct statement would be that P-P1 lies on a plane parallel or equal to the one Sal is using. But since these planes all have the same normal vectors, that distinction isn't necessary for what Sal's trying to explain now.
      (8 votes)
  • blobby green style avatar for user tuplecain
    at he has expanded the dot product of (P-P1) DOT N

    P-P1 is (X-Xp)i + (Y-Yp)j + (Z-Zp)k
    N is Ai + Bj + Ck

    But he ignores the i, j, and k during his expansion:

    Instead of
    AiX- AiXp + BjY - BjYp + CkZ - CkZp = 0
    He says
    AX - AXp + BY - BYp + Cz - CZp = 0

    Why does he lose out the unit vectors in the dot product expansion?
    (7 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Fabio Scotto
    Hi Sal. Thanks for your great videos.
    Question: (0.30) why do we describe the vector n = ai + bj + ck and not n = (ai, bj, ck)?
    If i,j,k are representing the three axis of a plane, why are we adding them together instead of defining them as a tuple?
    (4 votes)
    Default Khan Academy avatar avatar for user
  • leaf blue style avatar for user Mihika Sahgal
    Is D the distance of the plane from the origin ?
    (3 votes)
    Default Khan Academy avatar avatar for user
    • female robot grace style avatar for user loumast17
      Kinda. Let's work in 2D. let's say you have x + y = 2. So here A and B = 1 This is just another way of saying y = 2 - x. In this case D = 2, and it moves the line up 2 units. So yes, where x = 0 the line is 2 above the origin, but elsewhere along the line it won't be 2 away. the 2 just tells you how far upward you have to move the line y = -x

      More generally let's say Ax + By = D, now we will solve for y. y = D/B - A/Bx. So now we have the line -A/Bx being moved along the y axis D/B units, so still, the D entry determines how far along the y axis the line is moved. Or at least it plays a big part. if D = 0 then the line would cross through the origin.

      Similarly in 3d D tells you how far along the z axis you have to move the plane, or at least it plays a major part. So starting with Ax + By + Cz = D and solving for z we get (D - Ax - By)/C = z And, if you plug in (0,0) for x and y, you will be exactly D/C away from the origin along the z axis. And if D was 0 you would have the plane (-Ax - By)/C = 0 which goes through the origin.

      It's worth noting you can solve for any of the three variables and still get the answer. Let's use 3x + 5y = 7 and hopefully you'll be able to see how it follows in 3d. So, let's solve that for x and y, in both cases you get:

      (7 - 5y)/3 = x
      (7 - 3x)/5 = y

      Try graphing both and you should see you get the same graph. use a site like desmos or geobra if you need. But in the y= one the 7/3 term tells you how far you go up the y axis, while in the x= equation the 7/5 tells how far you move the line along the x axis.

      I really hope this helpped, the main takeaway is that the D term plays a major part in telling how far a line/ plane is moved away from the origin.
      (5 votes)
  • male robot johnny style avatar for user Olaf Willocx
    So, basically, a normal vector to the plane Ax+By+Cz=D is [A, B, C]?

    If this is true, one could find the equation of a plane by knowing the normal vector and 1 point in a very straight forward way. Ax+By+Cz is known from the normal vector and D can be found by putting the coordinates of the point in. Very useful!

    For example, let's say [3, 1, -1] is the normal vector and (2, 1, 4) is a point on the plane. I instantly know that Ax+By+Cz=3x+y-z. D is found using the point. D=3x+y-z=3*2+1-4=3. This result in the plane 3x+y-z=3.

    Is this a proper way of solving an exercise?
    (3 votes)
    Default Khan Academy avatar avatar for user
    • spunky sam red style avatar for user Bernard Field
      Yes, this is accurate. If you compare the steps you are doing there to what is done in the video, you will notice that they are completely equivalent.

      From the video, the equation of a plane given the normal vector n = [A,B,C] and a point p1 is n . p = n . p1, where p is the position vector [x,y,z]. By the dot product, n . p = Ax+By+Cz, which is the result you have observed for the left hand side. The right hand side replaces the generic vector p with a specific vector p1, so you would simply replace x, y and z with the numbers in p1. This is exactly the same as what you have observed.
      (2 votes)

Video transcript

What I want to do in this video is make sure that we're good at picking out what the normal vector to a plane is, if we are given the equation for a plane. So to understand that, let's just start off with some plane here. Let's just start off-- so this is a plane, I'm drawing part of it, obviously it keeps going in every direction. So let's say that is our plane. And let's say that this is a normal vector to the plane. So that is our normal vector to the plane. It's given by ai plus bj plus ck. So that is our normal vector to the plane. So it's perpendicular. It's perpendicular to every other vector that's on the plane. And let's say we have some point on the plane. We have some point. It's the point x sub p. I'll say p for plane. So it's a point on the plane. Xp yp zp. If we pick the origin. So let's say that our axes are here. So let me draw our coordinate axes. So let's say our coordinate axes look like that. This is our z-axis. This is, let's say that's a y-axis. And let's say that this is our x-axis. Let's say this is our x-axis coming out like this. This is our x-axis. You can specify this is a position vector. There is a position vector. Let me draw it like this. Then it would be behind the plane, right over there. You have a position vector. That position vector would be xpi plus ypj plus zpk. It specifies this coordinate, right here, that sits on the plane. Let me just call that something. Let me call that position vector, I don't know-- let me call that p1. So this is a point on the plane. So it's p-- it is p1 and it is equal to this. Now, we could take another point on the plane. This is a particular point of the plane. Let's say we just say, any other point on the plane, xyz. But we're saying that xyz sits on the plane. So let's say we take this point right over here, xyz. That clearly, same logic, can be specified by another position vector. We could have a position vector that looks like this. And dotted line. It's going under the plane right over here. And this position vector, I don't know, let me just call it p, instead of that particular, that P1. This would just be xi plus yj plus zk. Now, the whole reason why I did this set up is because, given some particular point that I know is on the plane, and any other xyz that is on the plane, I can find-- I can construct-- a vector that is definitely on the plane. And we've done this before, when we tried to figure out what the equations of a plane are. A vector that's definitely on the plane is going to be the difference of these two vectors. And I'll do that in blue. So if you take the yellow vector, minus the green vector. We take this position, you'll get the vector that if you view it that way, that connects this point in that point. Although you can shift the vector. But you'll get a vector that definitely lies along the plane So if you start one of these points it will definitely lie along the plane. So the vector will look like this. And it would be lying along our plane. So this vector lies along our plan. And that vector is p minus p1. This is the vector p minus p1. It's this position vector minus that position vector, gives you this one. Or another way to view it is this green position vector plus this blue vector that sits on the plane will clearly equal this yellow vector, right? Heads to tails. It clearly equals it. And the whole reason why did that is we can now take the dot product, between this blue thing and this magenta thing. And we've done it before. And they have to be equal to 0, because this lies on the plane. This is perpendicular to everything that sits on the plane and it equals 0. And so we will get the equation for the plane. But before I do that, let me make sure we know what the components of this blue vector are. So p minus p1, that's the blue vector. You're just going to subtract each of the components. So it's going to be x minus xp. It's going to be x minus xpi plus y minus ypj plus z minus zpk. And we just said, this is in the plane. And this is, this right, the normal vector is normal to the plane. You take their dot product-- it's going to be equal to zero. So n dot this vector is going to be equal to 0. But it's also equal to this a times this expression. I'll do it right over here. So these-- find some good color. So a times that, which is ax minus axp plus b times that. So that is plus by minus byp. And then-- let me make sure I have enough colors-- and then it's going to be plus that times that. So that's plus cz minus czp. And all of this is equal to 0. Now what I'm going to do is, I'm going to rewrite this. So we have all of these terms I'm looking for, right? Color. We have all of the x terms-- ax. Remember, this is any x that's on the plane, will satisfy this. So ax, by and cz. Let me leave that on the right hand side. So we have ax plus by plus cz is equal to-- and what I want to do is I'm going to subtract each of these from both sides. Another way is, I'm going to move them all over. Let me do it-- let me not do too many things. I'm going to move them over to the left hand side. So I'm going to add positive axp to both sides. That's equivalent of subtracting negative axp. So this is going to be positive axp. And then we're going to have positive byp plus-- I'll do that same green-- plus byp, and then finally plus czp. Plus czp is going to be equal to that. Now, the whole reason why did this-- and I've done this in previous videos, where we're trying to find the formula, or trying to find the equation of a plane, is now we say, hey, if you have a normal vector, and if you're given a point on the plane-- where it's in this case is xp yp zp-- we now have a very quick way of figuring out the equation. But I want to go the other way. I want you to be able to, if I were to give you a equation for plane, where I were to say, ax plus by plus cz, is equal to d. So this is the general equation for a plane. If I were to give you this, I want to be able to figure out the normal vector very quickly. So how could you do that? Well, this ax plus by plus cz is completely analogous to this part right up over here. Let me rewrite all this over here, so it becomes clear. This part is ax plus by plus cz is equal to all of this stuff on the left hand side. So let me copy and paste it. So I just essentially flipped this expression. But now you see this, all of this, this a has to be this a. This b has to be this b. This c has to be this thing. And then the d is all of this. And this is just going to be a number. This is just going to be a number, assuming you knew what the normal vector is, what your a's, b's and c's are, and you know a particular value. So this is what d is. So this is how you could get the equation for a plane. Now if I were to give you equation or plane, what is the normal vector? Well, we just saw it. The normal vector, this a corresponds to that a, this b corresponds to that b, that c corresponds to that c. The normal vector to this plane we started off with, it has the component a, b, and c. So if you're given equation for plane here, the normal vector to this plane right over here, is going to be ai plus bj plus ck. So it's a very easy thing to do. If I were to give you the equation of a plane-- let me give you a particular example. If I were to tell you that I have some plane in three dimensions-- let's say it's negative 3, although it'll work for more dimensions. Let's say I have negative 3 x plus the square root of 2 y-- let me put it this way-- minus, or let's say, plus 7 z is equal to pi. So you have this crazy-- I mean it's not crazy. It's just a plane in three dimensions. And I say what is a normal vector to this plane? You literally can just pick out these coefficients, and you say, a normal vector to this plane is negative 3i plus the square root of 2 plus 2 square root of 2 j plus 7 k. And you could ignore the d part there. And the reason why you can ignore that is that will just shift the plane, but it won't fundamentally change how the plane is tilted. So a this normal vector, will also be normal if this was e, or if this was 100, it would be normal to all of those planes, because all those planes are just shifted, but they all have the same inclination. So they would all kind of point the same direction. And so the normal vectors would point in the same direction. So hopefully you found that vaguely useful. We'll now build on this to find the distance between any point in three dimensions, and some plane. The shortest distance that we can get to that plane.