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.![]()
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
Notice that C = A - B, and so
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
and according to the Law of Cosines![]()
Combining these two we can see that![]()
Saturday, July 01, 2006
The Dot Product and Cosine
Posted by Phil at 10:37 AM 0 comments
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.
First, observe that for any vector A,
which is the squared length of A
Also, the dot product is commutative ...
... distributive (with respect to vector addition) ...
... and associative (with respect to scalar multiplication) ... or perhaps bilinear as suggested by the first comment down below ...
Next time I'll show some more interesting properties of the dot product.
Posted by Phil at 9:48 AM 1 comments
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![]()
First we'll divide the triangle into two right triangles by drawing the line that passes through B and is perpendicular to b.
Now we have a right triangle with c as the hypotenuse. And so according to the Pythagorean Theorem
The last step uses the result shown in the previous post which was that![]()
Posted by Phil at 9:35 AM 0 comments
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.
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.![]()
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![]()
First we'll substitute
And by the Pythagorean Theorem
And so![]()
Posted by Phil at 11:40 PM 2 comments
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.
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.
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.
First, notice that these two triangles (in the following diagram) are identical, and so they have the same area.
Now shear the first triangle so that it becomes half of the a square.
Then shear the second triangle so that it becomes half of the left portion of the c square.
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)
Now, we will use the same logic on another pair of identical triangles.
Shear the first triangle so that it becomes half of the b square.
Shear the second triangle so that it becomes half of the right portion of the c square.
And since these two triangles have equal area, the two green rectangles must have the same area as well.
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
Posted by Phil at 5:51 PM 3 comments
