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

Current time:0:00Total duration:13:53

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 have to have to write a three-dimensional computer program have to do any mathematics dealing with three dimensions if that's the idea of just the equation of a plane 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 the surface of your monitor of your computer monitor is a plane regardless of what angle you hold it at so and I can draw here in three dimensions I can let me do a little 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 into every direction now the equation of a plane and you've probably seen this before it takes the funnel it's a linear function of XY and Z so it's ax plus B y plus cz is equal to D if this is the graph of that plane then that means that every point on this plane every XY and Z on this plane so x y&z every XY and Z on that plane satisfies this equation now another way just is valid way to specify a point or specify a plane is to give you an actual point on the plane so say look that's a point on the plane so let's just say that the point let's say that this is the point X naught Y naught and Z naught different it could be one of the instances of this point right here but I'm just saying this is another point it's on the plane that obviously by enough 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 could draw it 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 normal and I just use the word that I haven't defined for you yet but when I say a normal vector so n is a normal vector and is normal or which just means that it's perpendicular to the plane it's perpendicular to everything on the plane it's perpendicular to every 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 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 is a piece of cardboard that yellow arrow I just drew it may actually be a I would have 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 in the normal vector to the plane we know from our dot from our definition of a 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 zero and that's true for any vector that we pick that actually lies on the plane so let's see if we can use the this definition of a of a plane if we can use the I'll call it the you know the normal or I'll call it let me call it the n plus let me do it this way I don't want to do the kit the n plus some you know X not Y not Z not definition and if I can go from that to just the standard the standard linear equation definition ax plus B Y plus C Z is equal to zero let's see if there's some way where 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 X naught to be equal to so I'm going to define X naught to be equal to the scalar X naught y naught Z naught now I want to be very clear this specifies the coordinate that lies on the plane this vector does not lie entirely on the plane it starts 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 and it's the tip of its arrow sits on the plane but this vector itself it's not necessarily drawn on the plane it 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 could be 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&z so once again like X naught the vector X let me draw it right there this vector X does not lie on the plane it goes from the origin its position vector that specifies a point on the plane so it goes from the origin and it goes out and it you can almost view them as you know though if the plane was like a coffee table that this would kind of be this these vectors let me see if I can draw it if this was the the flat surface of the plane that the vector X naught 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 we're sitting you know if you can imagine sitting right at the the surface of the plane and then you can 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 if I have what does the vector X minus X not look like X minus X not well I just drew a little triangle here X minus X not I'll do it in I'll do it in this green color it'll look exactly like this X minus X naught will be this green line right here right this is X minus X not where you give you X naught Plus this vector plus X minus X naught 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 let me draw it better than that it's going to go from that point from X not the point specified by X not to the point specified by X and it's going to lie along the plane so this right here is X minus X naught 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 it must be perpendicular to n / appendicular to our normal vector now if my normal vector let me let's say my normal vector and so this vector is perpendicular to this guy right here it's perpendicular to the vector N 1 n 2 & 3 now using this information how can we get to this type of an expression just this linear equation of XY and Z well we know that we know that n let me switch to a neutral color we know that n excited 1 is carrot here and it's not a unit vector but let's say n so the it's quite purply color to this so the dot product of it we saw that right there we saw 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 is 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 X not perpendicular X minus X naught which means that their dot product is equal to 0 well what does X minus X naught look like so this is going to look like this expression if I write out the vectors themselves it's the vector and one and two and three being dotted with well if I take X minus X naught that's just X the scalar X minus the scalar X not the first term subtracted and then the scalar Y minus the scalar why not and then the scalar is Z minus the scalar Z naught and we know that this whole thing has to be equal to zero because they're perpendicular and then if we take the dot product here we take the dot product we get n 1 times X minus X naught plus n 2 times y minus y naught plus n 3 times Z minus Z naught 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 + B y + cz is equal to D and actually I think I made a mistake here this should be not 0 this is equal to this is equal to D this is the general form for a plane in r3 for you know 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 plane but I give you a normal vector I tell you that normal vector is the point 1 3 -2 and I say that it intersects the point or a point that lies on the plane that 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 & 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 right the this point and this point lie on the plane so the difference between these two there's the whole vector will lie on the plane so the vector so let me take the difference so X minus X naught is equal to is equal to X minus 1 y -2 and then Z minus 3 I'm saying this will lie on the plane so this is this is on the plane and it's going to be perpendicular to our normal vector it's 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 see if we can do a little bit of math 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 can add 1 to both sides and I get X plus 3y minus 2z add that 1 to both sides 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 and 1 is 1 times X minus x1 I guess or X not I could call it so X minus this 1 plus n 2 3 a times y minus two plus minus two times Z minus three is equal to zero and then if you just did a little bit of math a little bit of algebra you would have gotten there so hopefully you find this reasonably 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 will be you know I could 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