Vectors

Vectors are a means of giving co-ordinates for a point in space with respect to other points such as the origin. A vector can be written in one of two ways:

  • As a column matrix: In a pair of parentheses, each co-ordinate is written vertically downwards, so that the x co-ordinate is at the top, then the y, and z at the bottom (if working in three dimensions).
  • By using unit vectors: A unit vector is a vector which is one single unit long in a given direction; if we use i as a horizontal unit vector, and j to represent a vertical unit vector, we can specify a point as the coefficients of these. (For example, a line from the origin to (4,2) would be given as 4i + 2j.) If working in three dimensions, a third unit vector can be given as k.

Aside from unit vectors, there are two types of vector: position and direction. A position vector will always start from the origin, while a direction vector can start anywhere. A line from the origin (O) to a specified point A would be written as OA, with an arrow drawn above the two letters pointing from O towards A, like so:


OA

(Due to the space this would take up on a page, I shall write these simply as OA.)

So, if we were to take our example from above, with a line from the origin to (4,2) - henceforth referred to as point A - we can write this as OA = 4i + 2j. We can also refer to this line as a. (This can be written in either bold type, or simply underlined, as a. Usually when written by hand, where differentiating between bold and regular type would be difficult, underlining is used.)

An example

Imagine a triangle, with points O, A, and B making its corners. C is the mid-point of line a (OA), and D is the mid-point of b (AB). m is the mid-point of CD.

          A
          /\
         /  \
   a    /    \   b
      C/______\D
      /    m   \
     /          \
   O/____________\B

How do we find the vector Om?

First of all, we know that we need to go from O to C, and then C to m. Since C is the midpoint of a, we can write this simply as ½a. We also know that m is the midpoint of CD, which can be written as ½CD for now. This gives us Om = ½a + ½CD.

To get from CD, a similar procedure is done; we must travel the other half of OA to get CA, which itself is ½a. We then move halfway along AB to get to its mid-point, D, leaving us with ½(b - a). Our equation is now Om = ½a + ½(½a + ½(b - a))

Multiplying this out, we are left with ½a + ¼a + ¼b - ¼a, which simplifies to ½a + ¼b. Hurrah!

Magnitude

The magnitude of a vector is its length. A unit vector, having a length of 1, will therefore have a magnitude of 1. The magnitude of line OA would be written in pipes (like the modulus) as so:


|OA|

To calculate the magnitiude of a line, we can use Pythagoras' Theorem, which works in both 2D and 3D. Given a line AB, with co-ordinates (x, y, z), then |AB| = √(x² + y² + z²). (Omit z if working in two dimensions)

The Scalar Product

The scalar product of a pair of vectors, a and b, is the product of their magnitudes multiplied by the cosine of the angle between them. From this definition, we can write this as a . b = |a| |b|cosΘ. This can be used to find the angle between the two lines, by dividing by |a| |b| and taking the inverse cos, leaving Θ. This can be used to quickly determine if two lines are perpendicular; use a . b = 0, as cos-10 = 90°.

As we write this as a . b, the scalar product is also referred to as the dot product.