Source: http://flipcode.com/archives/3D_Geometry_Primer_Chapter_1-Issue_02_Vector_Arithmetic.shtml
Timestamp: 2019-04-23 14:43:54+00:00

Document:
Normally, we work with free vectors only, because most applications don�t care about the starting point of vectors. You can represent e.g. the speed of 2 points of a car with 2 bound vectors. But all points of that car have the same speed (it would be a very unpleasant feeling if the back wheels had twice the speed of the front wheels). So there�s no need to represent both speeds with 2 different bound vectors. Because they store the same information (same direction, sense and magnitude), you can represent both speeds with 1 free vector, which we can represent in the origin.
So, from now, if we speak about vectors, we always talk about free vectors. Except if we mention otherwise.
Just like real numbers, you can add vectors, and it�s also possible to multiply them. However there are 3 kinds of multiplications! The first, a scalar product multiplies a vector with a real value and results in a vector. The 2nd is the dot product and multiplies 2 vectors with a real value as the result. And the last multiplication is the cross product which turns 2 vectors back into a new vector.
It is possible to multiply a vector V with a real number r. To do that, just multiply the magnitude (which is a real number too) with r.
Notice that the magnitude of a vector needs to stay positive, so if you scale V with a negative value r, then you need to mulitply the magnitude with abs(r) and switch the sense of the vector: if r<0 then r*V=abs(r)*(�V).
Example 1: �2V = �2*V = 2*(�V) = �(2*V).
Of course, if you scale V with the value 0, then you get a null vector.
Normalizing: if you scale a vector V with 1/||V||, then you create a vector with magnitude 1. Because you divide its magnitude by its magnitude. This method of creating unit vectors is called normalizing. You can write it down like this: V1=V/||V|| with V1 being the derived unit vector.
1. Lay the 2nd vector V with its tail at the head of the 1st vector U, and draw the sum U+V between the tail of U and the head of V.
2. Lay both vectors U and V with their tails together in the origin O and draw a parallelogram. Now draw the sum between the origin O and the opposite corner of the parallelogram.
An example? Say, you're in a little boat and you're rowing and rowing with a force R, trying to reach the shore. But, meanwhile, the water pulls your rowing boat downstream with a force W. You approach a giant waterfall. Then, the real force your boat is subjected to is the sum R+W, and you will go in that direction. The only thing that you can hope for, is that you reach the shore first, and not the waterfall.
1. Lay all vectors with their heads and tails together and draw the sum between the start and the end.
2. First add 2 vectors with a parallelogram: U+V. Then add W to this sum: U+V+W = (U+V)+W.
If two vectors U and V (with magnitudes respective ||U|| and ||V|| ) enclose an angle theta, then the dot product of U and V is given by U�V=||U||*||V||*cos(theta). Notice that at the left there's a product between vectors, and at the right there are only products between real values. So, the dot product of 2 vectors result in a real value!
� Use the dot product to calculate an angle between 2 vectors. If you divide the dot product by the magnitudes of both vectors, then the only thing that remains is: (U�V)/(||U||*||V||)=cos(theta). You have found the cosine of the angle between those vectors. Then, you can use an inverted cosine function to find the actual angle. Unfortunately, you won't be able to use this method, since you don't know how to calculate U�V in a different way. You will have to wait till issue 6 to do that.
� What means 0�V? Because you can't define an angle between the null vector and another vector, we define 0�V as equal to zero because the length of 0 is zero.
� What means U�V=0? The product ||U||*||V||*cos(theta) consists of 3 values. If the product is equal to zero, this means that at least 1 of these 3 values is zero. If ||U||=0 or ||V||=0, then you have a null vector in the product. If cos(theta) is 0, this means that theta is 90� or -90�. In that case U and V stand perpendicular to each other. This also means that the null vector is perpendicular to every vector, because V�0=0 for each vector V.
1. The direction of U�V is perpendicular to both U and V.
U and V. This area is equal to ||U||*||V||*sin(theta) with theta the angle enclosed between vectors U and V.
� U�V is perpendicular to both U and V. In the future, this will be very, *very*, *VERY* important!
� U�V is not the same as V�U . In fact: U�V = �V�U .
� What is V�V? There are more than one vectors that are perpendicular to "V and V". We define V�V=0 because "the area between V and V" is 0 .
� What is 0�V? Because each vector stand perpendicular to 0, you can find more than one vector that is perpendicular to 0 and V. We define 0�V=0=V�0, because "the area between 0 and V" is 0 (||0||=0) .
� What means U�V=0? U�V=0 if ||U�V||=0. This means that the product ||U||*||V||*sin(theta)=0 . This product is 0 if ||U|| or ||V|| is 0 (in case of a null vector) or if sin(theta)=0. In that case theta is 0� or 180�. This means that U and V have the same direction.
2. the angles theta and (180��theta) have the same sine value! If you used an inverted sine function to find the angle between 2 vectors, you wouldn't be able to distinguish between e.g. 30� and (180�-30�)=150�, which is definitely a different situation!
Given below is the triangle ABC, and the point D is in the middle of points AB (so the distance between A and D is equal to the one between D and B, hint :). You only know the vectors CD and DB. I want you to express the following vectors as a combination (addition, subtraction, negation, multiplication) of those 2 vectors: CB, AD, DA, AB and CA. You can use free vectors. So, get started with the puzzle and I'll see you next week.

References: V.

 V.

 V.

 V. 
 V.

 V. 
 V.