In this video lecture, we are going to use the power of vectors to solve geometrical problems in three dimensions
We will look into the equations for lines and planes and the calculation of distances. Let's start with lines
This equation here is the parametric equation of a line.
vector 'r', which is a function of a parameter lambda,
equals vector 'r0' plus
lambda times vector 'v'.
This equation describes the line marked here as a dashed line.
Here we see the vector 'r0' and the vector 'v'
Which is copied here. 'r0' is a vector which joins the origin to any point on the line
While 'v' is just a vector which indicates the direction of the line.
'r' is the position vector which points from the origin to any point in the line.
'lambda' is our parameter. It's a real number that can take any value.
You can think of a parameter as a slider, as we have here
We can slide the value of lambda
to any real value that we want, and this will modify the position vector 'r'.
For example when lambda equals 0
then 'r' equals 'r0'
as we see here
when lambda equals 1
Then 'r' equals 'r0' plus 'v' as we see here
If lambda is 0.5 then we do 'r0' plus halfway through B
If lambda is minus 1
Then we get 'r0' minus 'b', and in general any value of lambda (any value of this parameter)
gives us a different point along the line. The line is infinite, and so are the possible values of lambda.
In summary, given a point 'r0' and the vector 'v', we can write down the equation for this line
as 'r' as a function of lambda, equals 'r0' plus lambda 'v'
There are other equivalent ways of writing the equation of a line. For example, what if we are given two points
given by vectors 'a' and 'b'.
How can we write the equation of the line which crosses both points?
That's relatively easy. What we can do is we can take 'r0' to be any of the two points. For example 'a'
so we call this now 'r0' and
then we can take 'b' to be any vector in the line so we can use this vector here, which is 'b' minus 'a'.
Substituting these two into the equation of a line we get 'r' of lambda is equal to 'a' plus lambda 'b' minus 'a'
notice that we can rewrite this in the following way and if we rename our parameters, for example
alpha and beta
Then as long as alpha plus beta equals one, we can write the equation of a line as 'r' equals alpha 'a' plus theta 'b'
This equation is particularly pleasant because it puts vectors 'a' and 'b' on equal grounds
And basically we have a linear combination of them with a certain restriction in the coefficients.
We are starting to see that there are many ways of writing the equation of a line and we will see even more.
So let's start doing a summarizing table
This is our summary table, and we will end up filling up all the cells.
So far we have looked at the equation of a line, and we have looked at the parametric equation given by this equation here.
We have also seen how to write the equation of a line if we are given two points 'a' and 'b', and
we have seen two ways of doing this one was by identifying a
value for 'r0' and a value for 'v' in terms of 'a' and 'b' and the other way was
rearranging and renaming the parameters to have a very symmetrical form with alpha 'a' plus beta 'b' with a certain condition on alpha and beta.
Now we are going to continue filling up this table by looking at other ways of writing the equation of a line
The first one is by using the cross product
for example
Given a line notice that the vector joining 'r0' with any point in the line 'r'
(which is given by 'r' minus 'r0')
This vector will always be parallel to vector 'v'
Therefore the cross product of both must be 0, so we can write the equation of a line as
'r' minus 'r0' (which is this vector here)
cross 'b' equals 0
Which we can now add to our table
Something should be said about this equation. Previous equations for the line gave us a recipe for creating the line
Feeding the parameter values from minus infinity to infinity, into the previous equations
We could obtain the locations of the infinite points along the line.
This new equation using the cross product, however, cannot do this. There is no parameter.
The equation is just a condition that any point 'r' on the line must fulfill
The equation does not give us the position vectors for the line
but, given a position vector, we can tell whether it is on the line or not by checking if it fulfills this condition.
Also notice that the left-hand side is a vector product, and therefore it has three components
because it is a vector. The three components must be equal to zero
Therefore this simple equation really involves three different equalities
Next we can write the equations without using vector notation and instead using the components
in this case vector 'r' is given by (x,y,z)
vector 'r0' is given by (x0,y0,z0)
And vector 'v' is given by (vx,vy,vz).
In this way our usual parametric equation for the line can be written as follows
Which can be written as three separate equations
If we now solve these three equations in terms of lambda, we can arrive at the following
And since lambda is our parameter, lambda can be any value which the three terms must be equal to,
so we can do without it and simply write the equation of a line as simple equalities between different terms.
We can now add this form of the equations into our table
Like the previous equation this one is really a condition, rather than a recipe to obtain position vectors
now that we have all these equations for the line it would be good for you to pause this lecture and
go through all these different
equations for a line
shuffling from one to another. For example
make up some arbitrary point 'r0' and some arbitrary vector 'v' and find the equations of the line in all these different forms.
Or come out with two arbitrary points 'a' and 'b' and write down the equation for the line
Crossing the two points in all these different ways.
You might also ask yourself
How are all these equations related to the usual equation for a line that you have all studied 'y = mx + c'.
The relation is actually pretty straightforward
If we come back to the components equation
We can get the first two terms (the first equality) since the third one is not used when we're in two dimensions
We solve for y...
And then we easily identify the term 'm' and the term 'c'.
Note that when we are writing the equation of a line in terms of its components, we have a certain weakness,
there are some weak spots.
For example, what happens if we want a line in which
'vx', the 'x' component of the vector 'v' is 0. This would be such a line and
then you notice that if we want to write it in terms of 'y = mx + c'
Then 'm' would have to be infinite and 'c'... there is no intercept, so it doesn't really work.
However, the vector notations like the parametric equation always works
Let's now move on to the equations of planes
We will start with a parametric equation of a plane which has a similar form to the one for a line
Let's have a look at how this looks geometrically. In this 3d representation
we can see a plane (although the plane would be infinite, here I'm showing only a finite section of the plane)
and we are seeing the parametric equation of a plane:
vector 'r' which is any position on the plane, is equal to
'r0' plus lambda 'u' plus mu 'v'
'r0' is a vector which points to any point in the plane, and it determines where the plane is located.
'u' and 'v' are two vectors that are contained in the plane, so together they define the direction of this plane
While lambda and mu are our new parameters. Again, our parameters can be imagined as sliders.
Right now they are set to 0 and therefore 'r' is simply equal to 'r0'.
If we move the parameter lambda
then we see that we are going to add multiples of vector 'u' to our 'r0' and that's exactly what's happening now, so
that changing our parameter lambda moves our position vector 'r' along the direction of 'u'
Similarly, changing our parameter mu will add multiples of vector 'v' so
indeed
Sliding our value of 'mu' moves our position vector 'r' in the direction of 'v'
Notice that together lambda and mu are enough to cover any point in the plane
Also notice that vectors 'u' and 'v'
Can be any two vectors in the plane, they don't have to be orthogonal to each other. For example, we can skew them and
we can still cover the whole plane by varying lambda and mu
Simply that we don't have the same nice rectangular grid.
As you can see, the concepts are pretty much identical to those of a line
but while the line was one-dimensional, having a single parameter to move along it,
the plane is a two-dimensional surface, and therefore it has two parameters, lambda and mu, required to move along it.
Let's imagine our parametric equations as two functions, which we can draw as boxes called line and plane.
The line has a scalar input lambda and outputs a position vector that represents the line
This line function maps the one-dimensional real number line
to all the three dimensional positions along the line
Each specific value of lambda is mapped to a fixed position along the line
Our function for the plane has two scalar inputs
(which we could also see as a two dimensional vector input) and it outputs a position vector on the plane.
It maps each point in the whole plane of parameters lambda and mu into each point of the plane in three-dimensional space.
Note that if we wiggle around the value of lambda across the real line, this will in turn
wiggle around the position vector along the line.
And similarly, if we move the values of lambda mu wiggling around the plane, we will in turn wiggle around the three dimensional plane.
The number of independent parameters that we can vary freely, is also referred to as degrees of freedom.
The degrees of freedom of a geometrical entity define the number of dimensions that it has.
For example a point has no degrees of freedom, and therefore is a zero-dimensional entity
Lines have one degree of freedom and are one-dimensional.
While planes have two degrees of freedom and thus are two-dimensional. We can even write volumes using three degrees of freedom
and they are three-dimensional.
Having looked at the parametric equation of a plane we can now ask ourselves
how to write the equation of a plane if we are given three points 'a', 'b' and 'c'.
So, let's think about it.
We are given three points 'a, b, c' and we know that the three points must define a certain plane
Now in order to write this in a parametric form we need, as usual, any point in the plane
which will be 'r0', so for example, we can choose 'a',
and then we need two vectors that are contained in the plane
we can choose for example 'u = b - a'
and 'b = c - a'. This is a valid choice.
So now we can write our parametric equation for a plane, and substitute the values that we have chosen,
'r0 = a', 'u = b - a', and 'v = c - a'
Doing this substitution. We arrive at the following equation
Next we can do something similar to what we did with lines. We can do some algebra and rewrite the names of the parameters
so that we can end up writing the following 'r = alpha a + beta b + gamma c'
with the condition that 'alpha + beta + gamma = 1'
You can prove this as a very simple exercise.
This notation is nice because it puts the vectors 'a', 'b' and 'c'  into equal grounds.
So let's add these two equations into our table.
Now let's look at an equation for planes using products.
Let's consider a plane in space with a certain vector 'r0'.
And now instead of defining two vectors 'u' and 'v' contained in the plane
we can define a vector that is perpendicular to the plane. This is called 'the normal vector to the plane'
It is evident to see that any vector contained in this plane
Which we can write as 'r' minus 'r0' will be perpendicular to this normal vector
therefore their dot product will be 0.
This is a very common equation for a plane
It shows that the plane can be completely defined if we are given a point and a normal vector.
To obtain the component equations,
we can rearrange 'r' dot 'n' equals 'r0' dot 'n' which we can now write in component form
The right-hand side is all constants, so, we can do the dot product and arrive at a single number 'd'
While the left hand side can be expanded using the dot product
Arriving finally to the equation of a plane in component form: 'nx x + ny y + nz z' equals a number 'd'.
A common question when trying to change between one forms of the equation of a plane to another is how to obtain
the normal vector 'n'
So that's very easy, as long as we have two vectors contained in the plane.
For example, the usual vectors 'u' and 'v', then we can find the normal vector 'n' as the cross-product of both.
Normally when we work with normal vectors
we prefer to use the normalized unit normal vector, and that's very easy because we can just divide n by its length.
We can also have a look at what is the equation of a sphere centered at point 'r0'.
Well, it is easy to see that by definition of a sphere any point 'r' which is in the surface of this sphere
will have a distance to the point 'r0' equal to 'a', where 'a' is the radius of the sphere
therefore the length of 'r - r0' is equal to 'a'
and this constitutes an equation for the sphere.
Remember that the length of a vector squared can be written as the dot product of the vector with itself
Therefore we can write the equation of a sphere as follows
We now turn our attention to the last part of this video
We are going to solve geometrical problems using vectors.
In particular, we are going to show how easy it is to compute distances between points lines and planes.
For this I created another summarizing table. So let's start with the distance from a point to a line.
So what's the distance between a point P and this line here?
And let's say we know the position vector of a point in the line. It doesn't matter which one.
Clearly the distance between the point and the line is given by this perpendicular distance here.
Also, we know the direction of the line with vector 'v'.
Actually, it's much easier if we consider 'v' as a unit vector so we know 'v' is normalized to have a length of 1.
Then this vector here that joins point 'r_line' to point P
Which is given by 'p' minus 'r_line' forms an angle theta with vector 'v', and then from simple trigonometry of this
right angle (triangle) we can find that the distance we are interested in is simply equal to the length of the vector 'p' minus 'r_line'
multiplied by the sine of theta. And it turns out that there is a very nice way to calculate this using the cross-product.
So what is the cross-product between this vector 'p minus r_line' and the vector 'v'?
Actually, remember that we are considering 'v' to be a unit vector
Well, according to the definition of the cross product the magnitude of this cross product is the magnitude of the first vector,
times the magnitude of the second, times the sine of theta.
But since the magnitude of 'v' is 1 because it's a unit vector, then this cross product is exactly what we wanted
It's equal to 'd' the distance between the point and the line.
Remember that for this equation to work the point that we have labelled as 'r_line' can be any point on the line.
For example, it could be 'r0' in the parametric equation of the line.
And remember that vector 'v' that defines the direction of the line has to be normalized if you are given a vector 'v'
that is not normalized. You have to remember to normalize it.
Next we look at calculating the distance between a point and a plane
So here is the point, and here is the plane. The distance is clearly this distance which hits the plane at
perpendicular right angles to the plane.
Therefore, it is a distance that points in the direction of the normal vector of the plane and that's the key because we know that
doing the dot product with a unit vector in a certain direction gives you the distance of the vector in that direction
Therefore if we can find any vector that joins the plane to the point,
So, 'p' minus r_plane' where 'r_plane' is any position in the plane
Then we do the dot product with the normal unit vector and and we end up finding the distance that we want
Next let's find the distance between two lines
This is extremely difficult to visualize in our heads. So let's use a 3d representation
Here we see two arbitrary lines defined by their parametric equations with their position vectors 'r1' and 'r2'
and their directions 'v1' and 'v2'.
So what is the distance between these two lines?
Well, let's start thinking about the distance between two arbitrary points in the lines, like these two points.
if we draw this distance we can see that the distance clearly depends on which points we choose along the line
But we are interested on the minimum distance
so just by fiddling around
we can try to guess where this minimum distance must be... but it's not easy at all.
We can guess that the minimum distance must be somewhere around here
The trick is to realize that the distance becomes minimum
exactly when the orientation of this distance is perpendicular to both lines at the same time.
We can compute a direction perpendicular to both lines, by doing the cross-product between 'v1' and 'v2'
we can call this result our normal vector 'n'
and we can turn it into a unit vector and hat by doing the proper division. For more insight
this vector will in fact be the normal vector of the two planes which are
parallel to each other and which include both lines, which I can show here. The minimum distance between the lines is
exactly equal to the constant distance that exists between these two planes.
Finding this distance is now very easy.
Once we realize that we can always find two planes that are parallel
which contain both lines,
then it's very easy to realize that the normal vector of these planes
must be given by the cross product of vectors 'v1' and 'v2' of the two lines.
Then if we define any vector joining any two points of the two lines
which we write here as 'r_line1 - r_line2'
then if we do the dot product of this vector
dot 'n hat' this will give us the
Projection of the vector 'r_line1 - r_line2' in the direction of 'n' which is exactly the distance that we want.
Remember that n must be a unit vector so we have to do the cross product of 'v1' and 'v2' and then divide
by the magnitude
Finally we can look at the distance between a line and a plane, which is extremely similar to what we just saw.
If we are given a line and a plane
well, in most cases the line will crash into the plane somewhere, and the distance will be zero.
However, we can have the special case in which the line is
contained in a plane that is parallel to the plane we're interested in.
In this case the distance between the line and the plane. Is this perpendicular distance here.
To check if this is the case we can consider the normal vector 'n' to the plane, and the vector 'v'
parallel to the line, and we can check if their dot product is zero.
If it is then the two vectors are perpendicular, and therefore the line does never intercept the plane.
Once we know this, then finding the distance D is very easy. We can follow the same procedure as before.
We can find any point on the line and in the plane, and then we can get this vector
which we can call 'r_line - r_plane' and do the dot product with the unit vector and and
this will give us the distance
projected into the direction of 'n' which will be the distance between the line and the plane.
So you can appreciate how easy vector operations can solve geometric problems, which would otherwise be very complex.
I would like to finish the lecture with a final thought. You might be wondering: what's the use of all this?
When will I need to calculate distances in three-dimensional space?
as you will soon see
vectors can be used to represent abstract things, far beyond mere directions in space
with this lecture, you have learned to work with vectors representing lines and planes
but these same concepts will appear in entirely different contexts, in which vectors do not represent physical
three-dimensional entities. Yet, we can still think about them as if they did,
transforming abstract problems into geometrical ones
Thanks for watching.
