Saturday, July 01, 2006

The Dot Product and Cosine

Next, we'll show that the dot product of two vectors is the product of their lengths and the cosine of the angle between them.

dot_cos1

First consider two arbitrary vectors A and B. We'll form a triangle with these two sides and a third side connecting the ends of A and B, which we'll call C. Also, let θ be the angle between sides A and B

dot_cos_img

Notice that C = A - B, and so

dot_cos2

These simplifications rely on properties of the dot product that I worked out last week. Also, since the dot product of a vector with itself is equal to its squared length, we have

dot_cos3

and according to the Law of Cosines

dot_cos4

Combining these two we can see that

dot_cos1

Wednesday, June 21, 2006

The Dot Product

This week I just want to go over the definition of the dot product, and a few of its properties.

The dot product of two vectors is the sum of the product of each of the components of two vectors.

dot_def1

First, observe that for any vector A,

dot_def2

which is the squared length of A

Also, the dot product is commutative ...

dot_def3

... distributive (with respect to vector addition) ...

dot_def4

... and associative (with respect to scalar multiplication) ... or perhaps bilinear as suggested by the first comment down below ...

dot_def5

Next time I'll show some more interesting properties of the dot product.

Tuesday, June 20, 2006

The Law of Cosines

This week I'd like to prove the Law of Cosines.

The Law of Cosines states that given any triangle with side lengths a, b and c and opposing angles A, B and C

coslaw1

First we'll divide the triangle into two right triangles by drawing the line that passes through B and is perpendicular to b.

coslaw3

Now we have a right triangle with c as the hypotenuse. And so according to the Pythagorean Theorem

coslaw2

The last step uses the result shown in the previous post which was that

cossindef2

Sunday, June 18, 2006

The Definition of Cosine and Sine

In this post I'd just like to briefly give the definition of cosine and sine, and also show a simple property involving both of them.

triangles

Consider a right triangle containing an angle θ. All such triangles are just scalar multiples of each other. Therefore the ratio of the adjacent side to the hypotenuse is a fixed value.

cossindef1

We'll call this ratio the cosine of θ. Similarly, we can define the sine of θ as the ratio of the opposite side to the hypotenuse

Now, we can show that

cossindef2

First we'll substitute

cossindef3

And by the Pythagorean Theorem

cossindef4

And so

cossindef2

Sunday, June 11, 2006

Pythagorean Theorem

After a long break from posting, I'm back with something a bit more fundamental. I'd like to offer a graphical version of Euclid's proof to the Pythagorean Theorem (I'm just going to draw the shapes, rather than name them by their vertices).

First, though, we need to make sure that you're comfortable with the fact that shearing a shape doesn't change its area. In the following diagram, I've shown that shearing a rectangle doesn't change its area, because you can get the same shape by chopping off a triangle from one side of the rectangle and putting it on the other side.

shearing01

So you can see that if shearing a parallelogram maintains its area, shearing any triangle (since a triangle is just half of a parallelogram) should maintain its area, as well.

Now, we'll move on to the Pythagorean Theorem. We'll take an arbitrary right triangle, and attach squares to each of the sides.

proof_01

Now, we'll show that the c square has the area of both the a square and the b square. We'll accomplish this by showing that, in the following diagram, the two blue rectangles have the same area, and the two green rectangles have the same area as well.

proof_02

First, notice that these two triangles (in the following diagram) are identical, and so they have the same area.

proof_03

Now shear the first triangle so that it becomes half of the a square.

proof_04

Then shear the second triangle so that it becomes half of the left portion of the c square.

proof_05

And since the two brown triangles have equal area, the two blue rectangles must have the same area as well (since they each have twice the area of one of the brown triangles)

proof_06

Now, we will use the same logic on another pair of identical triangles.

proof_07

Shear the first triangle so that it becomes half of the b square.

proof_08

Shear the second triangle so that it becomes half of the right portion of the c square.

proof_09

And since these two triangles have equal area, the two green rectangles must have the same area as well.

proof_10

And so the c square has an area equal to the sum of the areas of the a square and the b square. In other words c2 = a2 + b2

proof_02