For practical purposes, we often say that a vector is something with a direction and a magnitude. This idea actually comes from the more commonly used Euclidean vector space, in which the concepts of direction and magnitude are defined (via the associated inner product). Thus, in a Euclidean vector space (which is what we most often work with), a vector can indeed be considered a direction along with a magnitude.
However, a vector need not satisfy these properties. A vector is in general an element of the set associated with a given vector space. This vector space need not be a Euclidean vector space, which would be required to define the concepts of "direction" and "magnitude". For example, take the set of continuous functions from (0,1) to R. This set, called C(0,1), together with the operations +:V*V->V (valuewise addition) and *:R*V->V (valuewise scalar multiplication), forms a vector space. In this context, the function f defined by f(x):=x is a "vector", but has no clearly identifiable direction or magnitude. (We can in fact define an inner product, thus making this a Euclidean vector space and giving the function some sort of direction and magnitude, but we need not do so).
A Java data structure that allows random access and that can grow to hold an arbitrary number of elements. Class java.util.Vector

The official API documentation (JDK 1.1) can be found at

In biology, vector refers to an organism that transmits an infectious disease to another organism of a different species.

Mosquitos, for example, are vectors for malaria.
Sometimes a vector can be removed one or more times. In an infamous case, fleas are a vector for plague between rodents, and rodents are vectors for the fleas between people.

This is an introduction to mathematical vectors, and how to use them. You will benefit from some graph paper (or squared paper), a pencil and a ruler; I can't render vector triangles very well in ASCII and thus will be asking you to do it yourself.

A vector is a pair of values - in mathematical language this is as opposed to a scalar, which is a single value - and is commonly represented like this -

                |-   -|
                |  x  |
                |     |
                |  y  |
                |-   -|

There are obvious problems with that representation in text, so from now I will use (x,y) notation to denote a vector.

A vector is said to have magnitude and direction. On your squared paper, draw axis from 0 to 10 on the x axis, and 0 to 10 on the y axis. Then place a point at (1,1) on the graph.

We will now use vectors for the first practical purpose: to apply a transformation to this point. Presume you are asked to apply the transformation vector (2,3) to this point - what do you think you should do? The answer is that you should place a new point at (3,4) - you've added the transformation vector to the original vector which represented the position.

We refer to this vector as displacement because it has both magnitude and direction - when a scalar value is used to represent distance there is usually no direction given.

We keep saying that the vector has magnitude and direction, but where exactly do these values come from? They're certainly not just the x and y values. We find the magnitude by applying a piece of maths you've probably heard of - the Pythagorean Theorem. This states simply that in a right-handed triangle, the square on the hypotenuse is equal to the sum of the squares of the other two sides. A right-angled triangle looks like this, with the sides labeled -

                   | \
                 b |  \  h
                   |   \
Now, think about your vector - what does it represent? Well, if you draw it ( first draw a line from (1,1) to (3,1), then a line from (1,1) to (1,4), and finally a line from (1,1) to (3,4) ) you'll see you have a right-angled triangle! What's more, the hypotenuse is the side of the triangle you need to find to find the magnitude of the vector. If we put the Pythagorean Theorem in algebraic terms, it's -
               h2 = a2 + b2
Consult the diagram above and measure your a and b - a is 2, and b is 3. So -

              h2 = a2 + b2
              h2 = 22 + 32
              h2 = 4 + 9
              h2 = 13
              h = √13
              h = 3.6
The magnitude of your vector is 3.6 (to one decimal place, do the calculation yourself for further accuracy).

The direction of the vector is the angle from the north line to the hypotenuse. We can calculate this with some simple trigonometry. Remember SOHCAHTOA? We need to find the angle that's inbetween the adjacent and the hypotenuse, so we want the CAH bit of this mnemonic. The relationship defined here is - (the angle is θ ):

      cos θ =       A

Therefore -

      θ = cos-1(2/3.6) = 56.25°

We're not quite done yet - the direction was the angle from the north line remember - we just have the internal angle of the triangle. Simply taking the angle above away from 90 will give us our answer: and it's 33.75°.

And that's how you find the magnitude and direction of a displacement vector.

Remember the two types of vectors discussed in this write-up: the position vector used to designate a particular point, and the displacement vector used to apply to it and move it (or transform in correct mathematical language).

  1. An organism that spreads an infectious disease; often, this infectious host is not affected by the illness.
  2. A DNA molecule that replicates on its own in a host cell and can be used as a vehicle in the laboratory for replicating other types of DNA.


Among other things, "VECTOR" is a cereal produced by Kellogg's cereal brand in North America. It is unique in that it comes in an especially large cereal box. Apparently "VECTOR" consolidates the expertise of over 280 nutritionists, engineers, product development and other food specialists from all over the world.

It is also intriguing to note that on the "VECTOR" box there are directions for use:

'Place 55g (330ml,  1 1/4 cup) of VECTOR in a bowl. Add 200ml (3/4 cup) skim milk'

One might ask why they specify skimmed milk. This is because it is a healthy cereal and they encourage it to be consumed in a healthy manner. I personally always recommend full fat milk but then I suppose I'm not a very healthy guy.

Which leads to the second obvious question - if I am not a healthy guy, why would I eat a healthy cereal. The answer is that its surprisingly good. Watch out when you first eat it though. It should be taken slowly as there are these little white bits that seem to get stuck in your teeth. Even an expert "VECTOR" eater will find it difficult to avoid these.

On the plus side the flakes are far better than any other cereal flakes and apparently provide the eater with a large portion of his/her required daily allowance of vitamins.


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:


(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    /    \   b
      /    m   \
     /          \

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!


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:


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.

Vec"tor (?), n. [L., a bearer, carrier. fr. vehere, vectum, to carry.]


Same as Radius vector.

2. Math.




© Webster 1913.

Log in or registerto write something here or to contact authors.