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

Defining a plane in R3 with a point and normal vector

Determining the equation for a plane in R3 using a point on the plane and a normal vector. Created by Sal Khan.

Want to join the conversation?

  • leaf green style avatar for user Yugo Watanabe
    Could we just say that we can find a vector on the plane with the two points (x, y, z) and (x0, y0, z0)?
    (3 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user Tom Gannon
      If you only gave me two points, there are an infinite number of planes that can pass through it. Think of a piece of paper passing through two points. You can rotate the piece of paper however you want and it can still hold those two points.

      The difference is that we knew the vector PERPENDICULAR to the plane, too. Now look at your piece of paper. How many ways can you fit a piece of paper that goes through two points and also has a vector (which you can represent with a pencil) going straight up in the air? One.
      (28 votes)
  • orange juice squid orange style avatar for user Rick Mac Gillis
    At Sal starts talking about "naught" or "not" in relation to X0. He never defines what not/naught means. Does it just mean that a variable is perpendicular to it's non-not/naught counterpart? (Meaning X is perpendicular to X0)
    (9 votes)
    Default Khan Academy avatar avatar for user
  • leaf green style avatar for user SteveSargentJr
    At , why is this method of defining a plane in R^3 preferred by computer game programmers?
    (5 votes)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user mark.burhop
      The reason this is a useful solution as it uses less memory. For example, you could define a plane using 3 points contained on the plane. This would use 9 double values at 4 bytes each. Using a point and a vector (or just two points one of which is off the plane) takes up 6 doubles.

      Its also useful to have the perpendicular vector for the plane handy. For example, if you want to find the minimum distance of a point to a plane, you will need the plane vector.
      (15 votes)
  • leaf green style avatar for user Ooi Shi Zhang
    What is he doing at ? Why is he adding the two vectors ? Vector n and the position vector x0 ?
    (5 votes)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user SteveSargentJr
      That's just the name that he's giving to this method of defining a plane. In other words, Sal is calling it the "Normal vector and point definition of a plane". Then, as the video progresses, he shows how this definition of a plane can, via basic algebra, be rewritten in the form Ax+By+Cz = D (another equivalent definition).

      Thus, just as there is more than one way to define a line (for instance, there is "Slope-Intercept form" and "Point-Slope form" as well as others) there is also more than one way to define a plane--that's the main point of the video, I believe.

      Hope this helps!
      (13 votes)
  • blobby green style avatar for user krrish.sgk
    Having a little trouble understanding this intuitively. So the equation of a plane is Ax + By + Cz = D. Taking the dot product between a vector ON the plane and a vector perpendicular to the plane gives us an equation in a similar form. But WHY does this have to be the equation of the plane? How does taking the dot product between these two vectors end up as the equation of the plane?
    (8 votes)
    Default Khan Academy avatar avatar for user
    • spunky sam red style avatar for user Bernard Field
      The idea is that we take the dot product between the normal vector and every vector (specifically, the difference between every position x and a fixed point on the plane x0). Note that x contains variables x, y and z. Then we solve for when that dot product is equal to zero, because this will give us every vector which is parallel to the plane. Visualise this, and you will realise that this set of vectors defines an entire plane parallel to our original plane (because every vector which is normal to the normal vector must lie on the plane).
      The solution to our dot product equation will then give us an expression for x, y and z for which we obtain x - x0 perpendicular to n, which gives us the equation for the plane in position space.
      (8 votes)
  • blobby green style avatar for user barry.mccall1
    Looking at the Plane Equation (AX + BY + CZ = D): (A, B, C) are components in the Normal to a plane and (X, Y, Z) are components in a vector that lies on the same plane. What does 'D' represent? I don't see what D tangibly stands for, because the plane equation almost always ends up being set equal to 0 as the math collapses.
    (8 votes)
    Default Khan Academy avatar avatar for user
    • aqualine seed style avatar for user John McGee
      If A^2 + B^2 + C^2 = 1 then D is the distance of the closest point on the plane to the origin. In other words D is the scalar projection of every point on the plane onto the vector <A, B, C>. In every case, even when A^2 + B^2 + C^2 is not one, D is the dot product of every vector with endpoint on the plane with the vector <A, B, C> because the plane equation really means:
      <A, B, C> . <x, y, z> = D. D = 0 only if the plane passes thru the origin.
      (6 votes)
  • leaf green style avatar for user Varun
    At , the perpendicular line should be n-vector rite? (nt n-cap)
    (4 votes)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user mike.ellebrecht
      Yes. For this example, Sal has decided to use direction vector n that can be any (non-zero) length to indicate the direction of the plane and position vector x_0 to indicate a point on the plane. In practice, you would want to make n a unit vector because it makes your calculations easier and any non-zero length vector n is acceptable, so why not make it have a length of 1 to make your life easier? That's why he keeps slipping up writing n-hat or n-cap even though he's trying to point out that n doesn't have to be unit length. Good habits are hard to break.
      (5 votes)
  • piceratops seedling style avatar for user Eduardo Reis
    Sorry for this question is not a math question. I am not a native English speaker, but I am understanding this video quite well, but I just wanna make sure how it is pronounced either X0, N0, or whatever.
    Would it be "X not"?
    (3 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user Sid Kalra
      Yes, you could pronounce X0 as "X not" or you could also say "X zero". Actually, when he says "X not", he means the word "naught", which in English means "nothing". So really, he is saying "X naught". "Not" and "naught" have the same pronunciation.
      (5 votes)
  • duskpin ultimate style avatar for user Mark van der Meulen
    I have a question and it may be a silly one.
    The coordinates of a vector specify its end position correct? If so what specifies where the vector is going to "start" from? What makes the normal vector start from the plane instead of origin? We obviously don't want it to start from origin.
    (2 votes)
    Default Khan Academy avatar avatar for user
    • hopper cool style avatar for user POWA
      A vector can start and finish at any point where it's defined, we can move it around and it will still hold the same values.

      Usually, we let the vector start at the origin, but it will still be the same vector if we let it start from somewhere else (again, where it is defined).

      The normal vector has similar properties, we might have a normal n=(1,1,1), and this vector n can also be moved around, as long as its tail is on the plane. If the origin is a part of the plane, we might aswell let the normal start from the origin or move it around on the plane however we want.

      When we move a vector, we have to preserve the length and direction properties. So we cant rotate it or try to make it longer or smaller when wemove it around.
      (5 votes)
  • male robot hal style avatar for user Leis Al Ayoubi
    Are there any videos of Sal explaining the "regular linear equation" for planes?
    I find it difficult to understand how Ax+By+Cz = d could define a plane.
    (2 votes)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user ( ͡° ͜ʖ ͡°)
      The closest match to a good Khan Academy video on your question (not helpful in this case):
      https://www.khanacademy.org/math/geometry/hs-geo-foundations/hs-geo-intro-euclid/v/specifying-planes-in-three-dimensions

      An oversimplified answer to your question would just be to compare the equation for a line in R2 to the equation for a plane in R3.

      A line is a continuous set of line segments that goes on infinitely in 2 dimensions, defined by a slope (rate of change) and a point. Line segments come from R1, the next lowest dimension, and they're made up of an infinite number of points, which come from R0.
      The equation for a line in R2 is Ax + By = C; it involves the two dimensions that make up R2.

      Remember, when you go from R2 to R3, you add a new directionality at a 90 degree angle to the other underlying dimensions. If you already have length and width, it's like adding height. It's like the difference between a square and a cube. In linear algebra, it's like going from just the unit vectors i and j to i, j, and k.

      So, going back to your question about how Ax + By + Cz = D could possibly define a plane in R3, the only difference between that equation and the equation for a line is the variable of z, the new directionality you get when you go from R2 to R3. Comparing the equation for a plane in R3 to the equation for a line in R2 makes this clear.

      A plane could be viewed as a continuous set of lines (although this isn't really true because it's actually made up of points), defined by a vector normal to the plane (slope) and a point. Lines come from R2, the next lowest dimension, and lines are made up of line segments, which come from R1, and line segments are made up of an infinite number of points, which come from R0.
      The equation for a plane in R3 is Ax + By + Cz = D; it involves the three dimensions that make up R3.
      (4 votes)

Video transcript

Let's take a little bit of a hiatus from our more rigorous math where we're building the mathematics of vector algebra and just think a little bit about something that you'll probably encounter if you ever have to have to write a three-dimensional computer program or have to do any mathematics dealing with three dimensions. And that's the idea of just the equation of a plane in R3. And you know what a plane is. I mean we live in a three-dimensional world and we see planes all around us. The surface of your monitor, of your computer monitor is a plane, regardless of what angle you hold it at. And I can draw here in three dimensions. Let me do a little bit better job than that. So let's say that that is the x-axis. This is my y-axis. And then that's my z-axis. And we know what a plane looks like. it looks something like that. I'm just drawing it at an arbitrary angle and it goes off in every direction. Now, the equation of a plane-- and you've probably seen this before. It's a linear function of x, y and z. So it's ax plus by plus cz is equal to d. If this is the graph on that plane, then that means that every point on this plane, every x, y and z on this plane satisfies this equation. Now another way, just as valid a way to specify a point or specify a plane is to give you an actual point on the plane. So we'll say, look, that's the point on the plane. Let's say that this is the point x0, y0, and z0. It could be one of the instances of this point right here, but I'm just saying this is another point that's on the plane. That obviously by itself isn't going to specify the plane. You could pivot the plane around that point in an infinite number of ways. But if you specify that point and you specify a vector that's perpendicular to the plane-- and I can draw that starting from here, but I can shift a vector wherever. But let me just draw it right there. So if I also specify a normal vector to the plane. And I just used a word that I haven't defined for you yet. But when I say a normal vector, so n is a normal vector. Or which just means that it's perpendicular to the plane. It's perpendicular to everything on the plane. It's perpendicular to every vector on the plane. Perpendicular to, I guess the best way to say it, I'll just say it in very imprecise terms-- everything on the plane. So if you have some vectors lying on the plane, if I have some vector here, let's say that's lying on the plane. If you imagine the plane as a piece of cardboard, that yellow arrow I just drew-- I would've actually drawn that on the cardboard. It's sitting on the plane. If this yellow vector, let me call it vector a, then if this is just some arbitrary vector sitting on the plane and this is the normal vector through the plane, we know from our definition of vector angles that this is perpendicular to this if and only if, n dot a-- only if the dot product of these two things are equal to 0. And that's true for any vector that we pick that actually lies on the plane. So let's see if we can use this definition of a plane, if we can use the-- I'll call it the normal or let me call it the n plus-- let me do it this way. The n plus some x0, y0, z0 definition. And if I can go from that to just the standard linear equation definition, ax plus by plus cz is equal to 0. Let's see if there's some way based on what we already know and using this information that we can do that. So the way to think about it, this point, this little blue point that lies on the plane, I can specify it by a position vector. So let me set some position vector x0 to be equal to-- so I'm going to define x0 to be equal to the scalar x0, y0, z0. And I want to be very clear. This specifies the coordinate that lies on the plane. This vector does not lie entirely on the plane. The way I drew it right here, it's starting at the origin. It's a position vector. And the way I drew it it's behind the plane. The tip of its arrow sits on the plane. But this vector itself, it's not necessarily drawn on the plane. This plane might not even go through the origin, while this vector does touch on the origin. It just specifies some point on the plane. Similarly, let me define another vector. I said this was some other arbitrary point on the plane xyz, and so you know, this is true for any point on the plane. Let me define another vector x, and I'm going to define that as x, y, and z. So once again, like x0, the vector x-- let me draw it right there. This vector x does not lie on the plane. It goes from the origin. It's a position vector that specifies a point on the plane. So it goes from the origin and it goes out. And you can almost view them as if the plane was like a coffee table that this would kind of be these vectors. Let me see if I can draw it. If this was the flat surface of the plane that the vector x0 is going from the origin to specify some point on the plane. And then the vector x is also going from the origin to specify-- let me do it in a different color. The vector x is also going from the origin to specify some other point on the plane right there. I just took the plane and made it flat, so you see it right along its side. If you could imagine sitting right at the surface of the plane and then you could see that these guys clearly do not lie in the plane. But using these guys, I can construct a vector that does lie on the plane. What does the vector x minus x0 look like? Well, I just drew a little triangle here. x minus x0-- I'll do it in this green color. It'll look exactly like this. x minus x0 will be this green line right here. This is x minus x0. We could view x0 plus this vector plus x minus x0 is going to be equal to x. If I were to do it on this graph, it's going to look like this. It's going to be like this. So let me draw it better than that. It's going to go from that point from x0, the point specified by x0 to the point specified by x. And it's going to lie along the plane. So this right here is x minus x0. I know this drawing is getting very dirty, but you can see that this is definitely lying on the plane. So this vector right here must be perpendicular to n. Perpendicular to our normal vector. Now, if my normal vector-- let's say my normal vector n. So this vector is perpendicular to this guy right here. It's perpendicular to the vector n1, n2, n3. Now using this information, how can we get to this type of an expression, just this linear equation of x, y and z? Well, we know that n-- let me switch to a neutral color. We know that n-- actually, I didn't want to do this caret here. n is not a unit vector. But let's say n, so it's perpendicular to this. So the dot product of it, we saw that right there. We saw it in the previous video. The dot product of n with this vector right here-- actually, let me draw it. You know, I already drew the plane sideways, so I can actually draw my n vector. My n vector's going to look something like this. It's going to be popping straight out of the plane. And I could shift it over, but it's always going to be in that same direction. It's going to be perpendicular to this vector right here. So n is perpendicular to x minus x0. Which means that their dot product is equal to 0. Well what does x minus x0 look like? So this is going to look like this expression. If I write out the vectors themselves it's the vector n1, n2, n3 being dotted with-- well, if I take x minus x0, that's just the scalar x minus the scalar x0. The first term subtracted. And then the scalar y minus the scalar y0. And then the scalar z minus the scalar z0. We know that this whole thing has to be equal to 0 because they're perpendicular. And then if we take the dot product here, we get n1 times x minus x0 plus n2 times y minus y0 plus n3 times z minus z0 is equal to 0. And you might not completely recognize it, but this is-- you'll have to do a little algebra to clean it up-- but this is the form ax plus by plus cz is equal to d. And actually, I think I made a mistake here. This should be not 0, this is equal to d. This is the general form for a plane in R3. A plane is just a linear surface in R3. I shouldn't have written a 0 there. So this does take this form. And if you don't believe me, we can do it with an actual example. So let's say we have-- I gave you my normal-- I specify a plane. If I give you a normal vector and I tell you that normal vector is the point 1, 3, minus 2 and I say that it intersects the point, or a point that lies on the plane-- The normal vector and the point don't necessarily have to intersect. But let's say for a point that lies on the plane, I have the point 1, 2 and 3. And I say give me the equation for this plane. Well, I would say well, if I take any other point on that plane-- so if I take any other point on that plane, xyz and it's specified by this vector, the vector that's defined by the difference between these two is going to lie on the plane. This point and this point lie on the plane, so the difference between these two vectors, the whole vector will lie on the plane. Let me take the difference. So x minus x0 is equal to x minus 1, y minus 2, and then z minus 3. I'm saying this will lie on the plane. This is on the plane. And it's going to be perpendicular to our normal vector. So if I dot my normal vector, 1, 3, minus 2, with this thing right here, with x minus 1, y minus 2, z minus 3, I should get 0. Because this has to be perpendicular to anything that lies on the plane. So what do we get? We get 1 times x minus 1 is x minus 1. Plus 3 times y minus 2. Just taking the dot product. Minus 2 times z minus 3 is equal to 0. Let's if we can do a little bit of algebra here to clean this up a little bit. I get x minus 1 plus 3y minus 6 minus 2z plus 6 is equal to 0. And let's see. Minus 6 and a plus 6 cancel out. And then I can take this minus 1. I could add 1 to both sides and I get x plus 3y minus 2z-- add that 1 to both sidess-- is equal to 1. And there you have it. Just by using the simple fact that this is a point on the plane and this is a normal vector, I was able to use the idea that this has to be normal or its dot product with any point, with any vector that lies on the plane, I was able to get this right here. I didn't have to go through this whole business right here. You could have just used this formula right here. You could have just said n1 is 1 times x minus x1. Or x0 I could call it. So x minus this 1 plus n2, 3 times y minus 2 plus minus 2 times z minus 3 is equal to 0. And then if you just did a little bit of math. a little bit of algebra, you would've gotten there. So hopefully find this reasonable useful. This is actually quite useful if you ever have to do anything that involves any type of three-dimensional mathematics. And if you ever become a game programmer this would be-- there's thousands of other applications. But this is kind of a useful byproduct of some of the formal mathematics that we've been doing.