# Vectors

Creating dot products of vectors is not only excellent entertainment, but also useful for calculating the angle between two vectors.

We can do this because there is this other formula for dot product:

where is the angle between the two vectors,

, in other words, the length of vector

, in other words, the length of vector

To calculate the angle between the two vectors, we write their dot product using both formulas.

Here is an example:

Dot product by the earlier formula:

Dot product by the new formula:

It's time to do some geometry.

There's nothing to worry about, it's just a few little things. Let's start with vectors and lines in the plain.

The equation of a line and the equation of a plane

It's time to do some geometry.

There's nothing to worry about, it's just a few little things. Let's start with vectors and lines in the plane.

EQUATION OF A LINE: If is a point on the line, and

is the normal vector of the line:

Just a reminder: the normal vector of a line is

the non-zero vector that is perpendicular to that line.

VECTOR BETWEEN 2 POINTS: If and are points,

then the vector between these points:

DISTANCE OF 2 POINTS: If and are points,

then the distance between these points:

It's all the same in space, except there are three coordinates.

EQUATION OF A PLANE: If is on the plane and

is the normal vector of the plane:

Just a reminder: the normal vector of a line is

the non-zero vector that is perpendicular to that line.

VECTOR BETWEEN 2 POINTS: If and are points,

then the vector between these points:

DISTANCE OF 2 POINTS: If and are points,

then the distance between these points:

Let's try to come up with the equation of a line in space. This would be useful for us, but it is not included in this list.

Unfortunately there will be some problems with it, but let's try anyway.

Let's find the equation of the line where point is on the line, and

is the direction vector of the line.

Here, we have to use the direction vector instead of the normal vector, because in space

it is not obvious which vector is perpendicular to the line.

The direction vector, on the other hand, is specific, only its length may vary.

If is an arbitrary point on the line, then

This vector is a multiple of the line's direction vector

If , then we divide by it, if it is zero, then

If , then we divide by it, if it is zero, then

If , then we divide by it, if it is zero, then

All of them are equal to , therefore they must be equal to each other, too.

This is the system of equations of a line in space.

Let's see an example:

Find the equation of the line where point is on the line, and

is the direction vector of the line.

Here is the system of equations of the line:

Unfortunately, will cause some trouble.

In such cases

Next, let's see a typical exercise.

Find the equation of a line in the plane, where point is on the line, and the line is perpendicular to the line described by the equation of

Find the equation of a plane in space, where point is on the plane and the plane is perpendicular to the line described by the following system of equations:

The normal vector of line is

We can make use of this vector if

we rotate it by , because then

it will be the normal vector of the line we are trying to define.

To rotate a vector in the plane by ,

we swap its coordinates,

and multiply one of them by .

We have the normal vector, so

the equation of the line is:

Let's see what we can do over here.

The normal vector of the plane happens to be the direction vector of the line.

The direction vector of the line:

The normal vector of the plane:

Here comes the equation of the plane:

And finally, another typical exercise.

Find the equation of a line in the plane, where points and are on the line.

Find the equation of the plane in space, where points , , and are on the plane.

If is a point on the plane and

is the normal vector of the plane, the equation of the line will be:

If is a point on the plane and

is the normal vector of the plane, the equation of the plane will be:

We have plenty of points, but we don't have a single normal vector,

so we have to make one.

Let's rotate this by , and that gives us the normal vector.

To rotate a vector in the plane by ,

we swap its coordinates,

and multiply one of them by .

The equation of the line:

We will have a problem with the plane here.

In space there is no such thing

as rotating a vector by .

We have to figure out something else to get the plane's normal vector.

We would need a vector that is perpendicular to the triangle determined by points , , and . This vector will be the so called cross product.

The cross product of vectors and is vector ,

that is perpendicular to the plane determined by vectors and , and where

To get the cross product, we have to calculate this determinant.

It is funny that determinants will only appear at a later stage, but in spite of that, we will try to calculate this now.

We will expand the determinant along the first row, but don't worry, everything will be simple. Well, here it is:

We will figure out these soon. It is intentional that we have a minus here, instead of a plus.

All of these would be much easier to grasp if we knew the expansion rules included in the chapter about determinants. If someone decides to check out what those rules are, we can safely assume that nobody can prevent them from doing so.

Now let's get down to business.

Let's see a specific example.

Here is a specific example:

Now let's get down to business.

Here is the cross product:

Let's see two exercises for a typical geometry application of the cross product.

One exercise is to find the equation of a line in the plane where two given points are on the line. We don't need the cross product for this.

The other one involves finding the equation of a plane in space where three given points are on the plane. We do need the cross product for this.

Find the equation of the line in the plane, where point is on the line, and the line is perpendicular to line

Find the equation of the plane, where is on the plane that is perpendicular to the line described by:

The normal vector of line is

We can make use of this vector if

we rotate it by , because then

it will be the normal vector of the line we are trying to define.

To rotate a vector in the plane by ,

we swap its coordinates,

and multiply one of them by .

We have the normal vector, so

the equation of the line is:

Let's see what we can do over here.

The normal vector of the plane happens to be the direction vector of the line.

Here comes the equation of the plane:

And finally, another typical exercise.

Find the equation of a line in the plane, where points and are on the line.

Find the equation of the plane in space, where points , , and are on the plane.

If is a point on the plane and

is the normal vector of the plane, the equation of the line will be:

If is a point on the plane and

is the normal vector of the plane, the equation of the plane will be:

We have plenty of points, but we don't have a single normal vector,

so we have to make one.

Let's rotate this by , and that gives us the normal vector.

To rotate a vector in the plane by ,

we swap its coordinates,

and multiply one of them by .

The equation of the line:

Here, at the plane, the cross product will yield the normal vector.

The equation of the plane:

And then it is done.