logo back up home forward   further reading more topics »

Maths - 2 Dimentional Vector Geometry

Abstract

This page is about how vectors can represent objects in two dimensions and some useful concepts for analysing 2D geometry.

This page assumes an understanding of coordinate systems described here, you may also want to review angles .

Points and Lines from the Origin

We can use a 2 dimensional vector to represent a displacement from the origin and therefore specify a given point by showing its displacement from the origin. For instance, the point shown below is 5 up and 9 right, which can be represented by the vector (9,5). By convention the x coordinate is shown first, then the y coordinate.

vector in 2 dimentions

Angles

In two dimensions angles are scalar quantities.

angle between 2D vectors

If we have two 2D vectors (V1 and V2) then we could work out the angle between them, at the origin, by using:

angle = acos(v1•v2)

or

angle = atan2(v2.y,v2.x) - atan2(v1.y,v1.x)

depending on whether we want to make the angle negative if V1 and V2 are swapped over. This is more fully explained on this page.

The first version uses the vector dot product '•' which generates a scalar from two vectors as explained here. The second version uses the x and y components of the vectors.

If we want to work out an angle at a point other than the origin, then we can translate the point to the origin by subtracting the displacement from all the vectors.

Areas

In two dimensions areas are scalar quantities. An area can be represented by one number, this does not say anything about the shape of the two dimensional object just the amount of 'surface' it contains.

angle between vectors in 2 dimentions

Any two dimensional closed shape encloses an area, this might be a simple shape like a rectangle or a circle or it could be a very complex shape. In any case its area is a single scalar number.

As an example let us take the area enclosed by two vectors as shown in yellow in the diagram above, this area is given by:

area = V1x * V2.y - V1y * V2.x

This is the green area in the diagram below:

angle between vectors in 2 dimentions

Any idea how I can show, geometrically using these diagrams, green area is the same as the yellow area?

Where next

These topics can be extended to three dimensions as discussed here.

To generalise further we can get more insight by looking at these same topics in terms of Clifford Algebra and Geometric Algebra as discussed here.


metadata block
see also:

 

Correspondence about this page

Book Shop - Further reading.

Where I can, I have put links to Amazon for books that are relevant to the subject, click on the appropriate country flag to get more details of the book or to buy it from them.

cover Feynman lectures on Physics 3 volume set.

 

 

Commercial Software Shop

Where I can, I have put links to Amazon for commercial software, not directly related to the software project, but related to the subject being discussed, click on the appropriate country flag to get more details of the software or to buy it from them.

 

Can you help?

Please send me any improvements to here. I would appreciate ideas to make the pages more useful including error correction, ideas for new pages, improvements to wording. It helps if you quote the full URL of the page.

 

Terminology and Notation

Specific to this page here:

 

program

I am working on a project which uses these principles, if you would like to help me with this you are welcome to join in, here:

http://sourceforge.net/projects/mjbworld/

This site may have errors. Don't use for critical systems.

Copyright (c) 1998-2008 Martin John Baker - All rights reserved.