The Math Shtick
 
The Basics of Vectors
What is a Vector?

A vector, in math, is an object which represents a set of numbers or operators arranged in an order. If you have ever done much with graphs before you have probably seen a vector. For example:

In this diagram we have a simple graph with one point plotted. The set of numbers (7,6) is a vector. In vector notation we would usually write this as [7,6] using square brackets. Rather than draw a single point, when represented graphically, vectors are drawn as a line from the origin with an arrow like this:

Vectors come in many sizes. Some vectors need to hold more than just two numbers like this: [7,6,5,2,0,3]. The standard vector holds 3 numbers and usually a 3-vector represents a value in the x direction, a value in the y direction and a value in the z direction. The vector depicted above is a 2-vector. That is, a vector with 2 values. A 4-vector is also not uncommonly used in physics to also contain a value for time.

Not all vectors represent values in the x, y, and z direction. x, y, and z coordinates are known as "Cartesian" coordinates (from René Descartes). This is the easiest to use coordinate system, the most widely used coordinate system, and the easiest to illustrate, so this is the system we'll use here.

Scalar Multiplication

In the terminology of linear algebra a plain number or operator outside of any vector or matrix is called a "scalar". Multiplying a scalar by a vector is easy. You just take the scalar (number) you want to multiply by and multiply it with all of the numbers inside of your vector creating a new vector. Here's an example:

5 * [4,2,1] = [4*5,2*5,1*5] = [20,10,5]

Scalar multiplication isn't very hard to visualize either. Taking our vector [7,6] from the figure above and multiplying it by 2 gives us [2*7,2*6] = [14,12] this is represented visually as follows.

The result is a is a vector "scaled" to a new size. Hence the term "scalar" when multiplying regular numbers with vectors.

Dot Product

A "dot product" is a method for multiplying two vectors together. A dot product produces a scalar value. The notation for a dot product is a simple point or "dot" drawn between the two vectors being multiplied. Here's an example:

[1,2,3] · [4,5,6] = 1*4 + 2*5 + 3*6 = 5 + 10 + 18 = 33

As you can see, each individual element of the first vector is multiplied by the corresponding element in the second vector and then the resulting values are simply added together. (Not: The dot product is a bit more complicated using Spherical Coordinates and other non-cartesian coordinate systems.)

A dot product is a little more complicated than a scalar product. A dot product can be thought of as multiplying the length of the projection of one vector onto another by the length of the other vector. For example, if we were to take the vectors [2,4] and [3,0] and multiply them using a dot product we would get 2*3 + 4*0 = 6. This is illustrated in the following diagram:

The vector [3,0], which has a total length of 3 units, only extends out in the x-direction, so "projecting" [2,4] onto [3,0] is the same as projecting [2,4] onto the x-axis. We can see easily enough that [2,4] only extends 2 units in the x-direction, so we take the length of the projection, 2 units, and multiply it by the length of the vector [3,0], 3 units to get the scalar value of 6. The projection would work the same both ways, though it's not so obvious from this diagram.

For anyone with a little trigonometry under their belt, it is not hard to realize that this means that another way of expressing the dot product A·B is AB*cos(Θ), where the bold A and B are vectors and Θ is the angle between them. The unboldened A and B are the lengths of A and B respectively. (This is a standard textbook notation, and so, worth noting.)

This trigonometric form of the dot product serves to show that a dot product is a good way for testing whether or not two vectors are perpendicular, or orthogonal. Since perpendicular vectors are at a 90° angle to each other (θ=90°) the cosine term will be 0 and thus the dot product will be 0.

Cross Product

The cross-product is the scariest beastie of them all. The first thing to note is that the cross product can only be done with 3-vectors. The second thing to note is that the cross product returns another vector which is perpendicular to both of the original vectors being multiplied.

As in the dot product, where the symbol used is a dot, the cross product is signified with a cross like an x. Taking the example used to illustrate the dot product and applying it to the cross product we get:

[1,2,3] × [4,5,6] = [(2*6 - 3*5),-(1*6 - 3*4),(1*5 - 2*4)] = [-3,6,-3]

Unfortunately it is not so easy in this case to deduce how the cross product was done. Here is a general case using a, b, c, d, e, and f instead of actual numbers.

[a,b,c] × [d,e,f] = [(b*f - c*e),-(a*f - c*d),(a*e - b*d)]

The length of the resulting vector is equivalent to the area of a quadrilateral (four-sided shape) made out of the two vectors that were multiplied together.

Just like the dot product, the cross product is much more compicated in non-cartesian coordinates.