Vectors


A vector is an ordered list of numbers. We write it in a row or a column, and I'll blithely ignore any distinction between the two forms.

Most high school textbooks use the examples of the (x, y) of a position in a plane, or the (x, y, z) of a position in ordinary space. However, vectors don't have to represent positions. We can have ( 3 pounds flour, 1 cup butter, 5 eggs, 1/2 cup sugar, 2 pinches salt, 5 satisfied kids) as a perfectly legitimate vector.

Whatever vectors and matrices you define, the mathematical machinery exists to deal with them. You are responsible for making sure the interpretation makes sense--if you find yourself with an answer in units of cookies times brownies, don't blame us.


You can add or subtract vectors provided they have the same number of elements in the list. We do addition the obvious way: add the first entry in one to the first in the other; the second to the second, and so on.

(1,3,-1) + (2,9,0) = (3,12,-1)

Subtraction works just as you'd expect.

You can multiply a vector by a number, by multiplying each element of the vector by the number.

There are several ways of `multiplying' vectors together. The simplest one is called the dot product, and produces a number (not a vector). If two vectors have the same number of entries (the same DIMENSION), then their dot product is defined as adding the product of the first entry in the first times the first entry in the second, to the second entry times the second entry, plus the third times the third, . . . plus the last times the last.

(1,3,-1) . (2,9,0) = 1*2+3*9+(-1)*0 = 29

This turns two vectors into a single number, and it obviously doesn't matter which of the vectors comes first. This sounds a bit odd, but it arises quite naturally. In fact, the dot product of a vector with itself is the square of its length (provided the units make sense!).

Another way of combining vectors creates a matrix where the element in the matrix in row number i and column number j is the product of the i'th element in the first matrix times the j'th element in the second. If you change the order of the vectors, the matrix flips (a `transpose') Once again this seems a bit odd, but it does turn up from time to time. Remember that a 4 by 3 matrix is not the same as a 3 by 4 matrix--you can't flip (transpose) them without a good reason. An election where John gets 80% and Jane 20% is not the same as Jane getting 80% and John 20%.

In 3 dimensions we can combine two vectors another way, called the cross product, which produces a third vector at right angles to the first two. If you change the order of the vectors from A x B to B x A, the resulting vector looks the same but points the other way. The cross product turns up when you calculate the force on a charge moving in a magnetic field, among other places. (In dimensions other than 3 the result isn't a vector.)

We can multiply a matrix and a vector --which is usually what the matrix is for in the first place.

Why use vectors?


For a more rigorous approach, see the notes for this course on Linear Algebra.

James N. Bellinger, May 1997 U. Wisconsin at Madison Physics Dept.