A *vector* is an arrow with a length and a
direction. Just like positions, vectors exist before we
measure or describe them. Unlike positions, vectors can
mean many different things, such as position vectors,
velocities, etc. Vectors are not anchored to particular
positions in space, so we can slide a vector around and
locate it at any position.

Change:

Two vectors, which may or may not be the same vector. Moving a vector around does not change it: it is still the same vector.

Some textbooks differentiate between *free
vectors*, which are free to slide around, and
*bound vectors*, which are anchored in space. We
will only use free vectors.

We will use the over-arrow notation \( \vec{a} \) for vector quantities. Other common notations include bold \( \boldsymbol{a} \) and under-bars \( \underline{a} \). For unit (length one) vectors we will use an over-hat \( \hat{a} \).

Cartesian coordinates (also known as rectangular coordinates) are the regular \(x,y\) or \(x,y,z\) coordinates in 2D and 3D, with perpendicular straight-line axes.

coordinate | name | range | definition |
---|---|---|---|

\(x\) | horizontal | \(-\infty \lt x \lt \infty\) | horizontal distance from the \(y\)-axis |

\(y\) | vertical | \(-\infty \lt y \lt \infty\) | vertical distance from the \(x\)-axis |

In 3D the \(x\),\(y\),\(z\) axes are oriented in *right-handed
order*, so that fingers curling from \(x\) to \(y\) means
the thumb points in the \(z\) direction.

Cartesian coordinate system, showing the origin \(O\) and three positions with their coordinates.

Notation note

When writing coordinates we can either list the coordinate values explicitly, like \(x = 2\), \(y = 1\), or we can just write the numbers in an ordered list, like \( (2, 1) \).

Writing them as a list assumes that we know which coordinate system we are using, and which order the coordinates are in. We will typically write the coordinate values explicitly to avoid confusion. This also applies to vector components.

Did you know?

While the idea of \(x,y\) coordinates specifying positions
might seem obvious, the use of algebraic quantities to
define geometry in this way was a major discovery of René
Descartes and a key event in the scientific
revolution. Descartes was also instrumental in
establishing the philosophical groundwork of The
Enlightenment, and we owe to him the famous phrase “*Cogito
ergo sum*”.

Polar coordinates are an alternative 2D coordinate system that are useful for rotating or circular motion.

coordinate | name | range | definition |
---|---|---|---|

\(r\) | radius | \(0 \le r \lt \infty\) | distance from the origin \(O\) |

\(\theta\) | angle | \(-\pi \lt \theta \le \pi\) | angle from the \(x\)-axis in the \(x\)–\(y\) plane |

The two common extensions of polar coordinates to 3D are cylindrical coordinates and spherical coordinates.

Polar coordinate system, showing the origin \(O\) and three positions with their coordinates.

To define polar coordinates, we relate them to another known coordinate system, typically Cartesian coordinates as follows, where we use the atan2 function.

Conversion between polar and Cartesian coordinates #rvp-ep

Did you know?

Angles can be measured in many different units. While radians are the most mathematically elegant unit, their use dates only from Roger Cotes in the 18th century. Degrees are a much older unit, dating back to the sexagesimal number system of the ancient Babylonians, and are convenient for celestial calculations because there are approximately 360 days in one year. Other units include grads (100 grads in a right angle) and mils (various definitions, all approximately equal to a milliradian).

Notation note

When solving for \(\theta\) in terms of \(x\) and \(y\) we know that \(\tan\theta = y / x\). However, this does not necessary mean that \( \theta = \tan^{-1}(y / x) \), because \(\tan\) is not a one-to-one function. For example, \( \tan^{-1}(1/1) \) is the same as \( \tan^{-1}(-1/-1) \). We thus need to take \( \theta = \tan^{-1}(y/x) + pi \) if the point is in quadrants II or III.

An alternative is to use the atan2 function, which takes \(x\) and \(y\) as separate arguments and correctly handles the conversion to \(\theta\) in any quadrant. This function is available in all common programming languages, including C, MATLAB, Python, and others.

Scientific calculators typically have special commands to convert to/from polar and Cartesian coordinates, which also automatically correctly handle the different quadrants.

When using coordinates to describe the location of physical positions in the real world, we must always have appropriate units of length for the coordinates. For example, the following coordinates all specify the same position:

It is important to distinguish between *units* and
*dimensions*. The base dimensions include mass (M),
length (L), and time (T), and can be combined to produce
dimensions such as L/T or L T\( ^{-1} \) for velocity. Each
physical quantity such as velocity has just one set of
dimensions, and there is no choice in this.

Units are particular ways of measuring dimensional quantities, and include the SI units kilogram (kg), meter (m), and second (s), as well as the customary U.S. units pound (lb) and foot (ft). A given physical quantity can be written in terms of many different units, although all of these must conform to the dimensions of the quantity. For example, velocity has dimension L/T and so it can be written in terms of the units m/s, ft/s, km/h, or many other choices.

Angles are an example of a *dimensionless* quantity
(having dimension 1), but they still have units, typically
either radians (rad) or degrees (°).

Did you know?

The SI unit system is the definitive system of measurement used in science and engineering. Other systems, such as U.S. customary units are defined in terms of SI units, so that an inch is defined to be exactly 2.54 cm, for example.

The National Institute of Standards and Technology (NIST) maintains an excellent reference guide to SI units, including precise rules and style conventions for writing units in scientific and engineering work.

A *unit vector* is any vector with a length of
one. We use the special over-hat notation \( \hat{a} \) to
indicate when a vector is a unit vector. Any non-zero vector
\( \vec{a} \) gives a unit vector \( \hat{a} \) that specifies the
direction of \( \vec{a} \).

Normalization to unit vector. #rvv-eu

Any vector can be written as the product of its length and direction:

Vector decomposition into length and direction. #rvv-ei

Three vectors and their decompositions into lengths and directional unit vectors.

To describe vectors mathematically, we write them as a
combination of *basis vectors*. An *orthonormal
basis* is a set of two (in 2D) or three (in 3D) basis
vectors which are *orthogonal* (have 90°
angles between them) and *normal* (have length equal
to one). We will not be using non-orthogonal or non-normal
bases.

Any other vector can be written as a *linear
combination* of the basis vectors:

Components of a vector. #rvv-ec

The numbers \(a_1, a_2, a_3\) are called the
*components* of \( \vec{a} \) in the \( \,\hat{\imath}, \hat{\jmath}, \hat{k} \) basis. If we are in 2D then we will
only have two components for a vector.

Writing a vector as the sum of scaled basis vectors. The scale factors are the components of the vector. Here \( \vec{a} = 3\hat\imath + 2\hat\jmath \), so the components of \( \vec{a} \) are \(a_1 = 3\) and \(a_2 = 2\).

We draw the symbol \(\odot\) (arrow tip) to indicate a vector coming out of the page, and \(\otimes\) (arrow fletching) to indicate an arrow going into the page.

Two standard arrangements of the basis vectors when working in 2D. Either \(\hat\jmath\) is the vertical and \( \hat{k} \) is out of the page, or \( \hat{k} \) is the vertical and \(\hat\jmath\) is into the page. In both cases \(\hat\imath\) is horizontal.

Notation note

Just as for position coordinates, we can write the vector components \(3\hat\imath + 2\hat\jmath\) as the ordered list \((3, 2)\) if we know which basis we are using. Because we often will be using several bases simultaneously, we will generally write the components explicitly in the \(3\hat\imath + 2\hat\jmath\) form.

Did you know?

The use of the letter \(i,j,k\) for basis vectors is due to
William
Hamilton, who was motivated by thinking of basis
vectors as extensions of the complex number \(i\). This
notation was popularized by the book *Vector
Analysis: A Text Book for the Use of Students of
Mathematics and Physics Founded upon the Lectures of
J. Willard Gibbs* (1901), by E. B. Wilson. This
book also introduced the use of bold letters to represent
vectors.

The length of a vector \( \vec{a} \) is written
either \( \| \vec{a} \| \) or just plain \(a\). The
length can be computed using *Pythagorus’
theorem*:

Pythagorus' length formula. #rvv-ey

Warning: Length must be computed in a single basis. #rvv-wl

Computing the length of a vector using Pythagorus' theorem.

Some common integer vector lengths are \( \vec{a} = 4\hat\imath + 3\hat\jmath \) (length \(a = 5\)) and \( \vec{b} = 12\hat\imath + 5\hat\jmath \) (length \(b = 13\)).

Warning: Adding vectors does not add lengths. #rvv-wa

Did you know?

Sets of three integers \(a,b,c\) where \(a^2 + b^2 = c^2\) are
called *Pythagorean
triples*. A long list of such triples is given on
the Plimpton
322 clay tablet written by the ancient Babylonians
around 1800 BCE, although it is unclear how they generated
these numbers. Pythagorean triples lead to complex
mathematics, including the curious patterns shown below
and Fermat's
Last Theorem.

The values of \(a\) and \(b\) for all Pythagorean triples \(a,b,c\) with \(a\) and \(b\) up to 2000.

To change the basis that a vector is written in, we need to know how the basis vectors are related. We do this by writing one set of basis vectors in terms of the other basis vectors. If we want to change from \( \hat\imath,\hat\jmath \) to \( \hat{u},\hat{v} \), then we need to write \( \hat\imath,\hat\jmath \) in terms of \( \hat{u},\hat{v} \) and then substitute the expressions.

Example: Example: Basis change. #rvv-xn

We can also write the general expressions for basis change, as below.

Change of basis formulas. #rvv-eg

In 2D the change between two orthonormal bases is a rotation by an angle \( \theta \), resulting in the change of basis expression below.

Change of basis formula in 2D. #rvv-e2

Vector expressions are true no matter which basis we write the vectors in, even if they are written in different bases.

Example: Vector addition in different bases. #rvv-xa

Example Problem: Cross product in different bases. #rvv-xx

Example: Dot product is independent of basis. #rvv-xd

The projection and complementary projection are:

Projection of \(\vec{a}\) onto \(\vec{b}\). #rvv-ep

Complementary projection of \(\vec{a}\) with respect to \(\vec{b}\). #rvv-em

Adding the projection and the complementary projection of a vector just give the same vector again, as we can see on the figure below.

Projection of \( \vec{a} \) onto \( \vec{b} \) and the complementary projection.

As we see in the diagram above, the complementary projection is orthogonal to the reference vector:

Complementary projection is orthogonal to the reference. #rvv-er

Two useful derivatives are the rates of change of a vector's length and direction:

Derivative of vector length. #rvc-el

Derivative of vector direction. #rvc-eu

An immediate consequence of the derivative of direction formula is that the derivative of a unit vector is always orthogonal to the unit vector:

Derivative of unit vector is orthogonal. #rvc-eu2

Recall that we can always write a vector as the product of its length and direction, so \( \vec{a} = a \hat{a} \). This gives the following decomposition of the derivative of \( \vec{a} \).

Vector derivative decomposition. #rvc-em2

Show:

Vector derivatives can be decomposed into length changes (projection onto \( \vec{a} \)) and direction changes (complementary projection). Compare to Figure #rvv-fu.

The spherical coordinate system extends polar coordinates into 3D by using an angle \(\phi\) for the third coordinate. This gives coordinates \((r, \theta, \phi)\) consisting of:

coordinate | name | range | definition |
---|---|---|---|

\(r\) | radius | \(0 \le r \lt \infty\) | distance from the origin |

\(\theta\) | azimuth | \(-\pi \lt \theta \le \pi\) | angle from the \(x\)-axis in the \(x\)–\(y\) plane |

\(\phi\) | inclination | \(0 \le \phi \le \pi\) | angle from the positive \(z\) axis |

The diagram below shows the spherical coordinates of a point \(P\). By changing the display options, we can see that the basis vectors are tangent to the corresponding coordinate lines. Changing \(\theta\) moves \(P\) along the \(\theta\) coordinate line in the direction \( \hat{e}_\theta \), and similarly for the other coordinates.

Show: | |

Coordinate lines: |

Radius: | \(r = \) 4 | |

Azimuth: | \(\theta = \) 45° | |

Inclination: | \(\phi = \) 45° |

Spherical coordinates are defined with respect to a set of Cartesian coordinates, and can be converted to and from these coordinates using the atan2 function as follows.

Conversion between spherical and Cartesian coordinates. #rvs-ec

The basis vectors are tangent to the coordinate lines and form an orthonormal basis \( \hat{e}_r, \hat{e}_\theta, \hat{e}_\phi \) that depends on the current position \(P\) as follows.

Spherical basis vectors. #rvs-eb

Warning: \((\hat{e}_r,\hat{e}_\theta,\hat{e}_\phi)\) is not right-handed #rvs-wr

If the spherical coordinates change with time then this causes the spherical basis vectors to rotate with the following angular velocity.

Angular velocity of the spherical basis. #rvs-ew

The rotation of the basis vectors caused by changing coordinates can be directly computed, giving the time derivatives below.

Time derivatives of spherical basis vectors. #rvs-et

A point \(P\) at a time-varying position \((r,\theta,\phi)\) has position vector \( \vec{r} \), velocity \( \vec{v} = \dot{\vec{r}} \), and acceleration \( \vec{a} = \ddot{\vec{r}} \) given by the following expressions in spherical components.

Position, velocity, and acceleration in spherical components. #rvs-ep

The cylindrical coordinate system extends polar coordinates into 3D by using the standard vertical coordinate \(z\) for the third. This gives coordinates \((r, \theta, z)\) consisting of:

coordinate | name | range | definition |
---|---|---|---|

\(r\) | radius | \(0 \le r \lt \infty\) | distance from the origin |

\(\theta\) | azimuth | \(-\pi \lt \theta \le \pi\) | angle from the \(x\)-axis in the \(x\)–\(y\) plane |

\(z\) | height | \(-\infty \le z \le \infty\) | vertical height |

The diagram below shows the spherical coordinates of a point \(P\). By changing the display options, we can see that the basis vectors are tangent to the corresponding coordinate lines. Changing \(\theta\) moves \(P\) along the \(\theta\) coordinate line in the direction \( \hat{e}_\theta \), and similarly for the other coordinates.

Show: | |

Coordinate lines: |

Radius:

\(r = \; \) 4

Azimuth:

\(\theta = \; \) 45\(^\circ\)

Elevation:

\(z = \; \) 4

Spherical coordinates are defined with respect to a set of Cartesian coordinates, and can be converted to and from these coordinates using the atan2 function, as described in the previos section of Spherical coordinates.

The basis vectors are tangent to the coordinate lines and form an orthonormal basis \( \hat{e}_r, \hat{e}_\theta, \hat{e}_z \) that depends on the current position \( \vec{P} \) as follows. We can write either \( \hat{e}_z \) or \( \hat{k}_z \) for the vertical basis vector.

Cylindrical basis vectors. #rvy-eb

If the cylindrical coordinates change with time then this causes the spherical basis vectors to rotate with the following angular velocity.

Angular velocity of the cylindrical basis. #rvy-ew

The rotation of the basis vectors caused by changing coordinates gives the time derivatives below.

Time derivatives of cylindrical basis vectors. #rvy-et

A point \(P\) at a time-varying position \((r,\theta, z)\) has position vector \( \vec{\rho} \), velocity \( \vec{v} = \dot{\vec{\rho}} \), and acceleration \( \vec{a} = \ddot{\vec{\rho}} \) given by the following expressions in cylindrical components.

Position, velocity, and acceleration in cylindrical components. #rvy-ep

Warning!

We normally write \( \vec{r} \) for the position vector of a point, but if we are using cylindrical coordinates \( r,\theta ,z \) then this is dangerous. This is because \( r \) might mean the magnitude of \( \vec{r} \) or the radial coordinate, which are different. To avoid this confusion we use \( \vec{\rho} \) for the position vector and \( r \) for the radial coordinate.

The Haystack antenna is a large radio telescope used for radar astronomy, atmospheric science, and satellite tracking. When tracking objects in space, such as satellites or celestial bodies, the orientation of the object relative to the antenna's coordinate system changes as both the object and the Earth move. The change of basis is used to transform the coordinates of the observed object from a global coordinate system (e.g., a celestial coordinate system) to a local coordinate system (relative to the antenna). This is essential for accurately pointing the antenna and tracking the object.

Reference material

Did you know?

The Haystack antenna was originally constructed in the 1960s for satellite tracking during the Cold War and has since been repurposed for scientific research.

The antenna is housed in a radome, a dome-like structure, to protect it from weather conditions while allowing it to operate smoothly. This structure also affects the antenna's orientation calculations, requiring constant adjustments via vector transformations.

If we want to fly from Urbana, USA to Delhi, India, which path should we follow? The locations of the two cities are:

Latitude | Longitude | |

Urbana | \(\phi = 40^\circ 6' 35'' \rm N\) | \(\lambda = 88^\circ 12' 15'' \rm W\) |

Delhi | \(\phi = 28^\circ 36' 36'' \rm N\) | \(\lambda = 77^\circ 13' 48'' \rm E\) |

Geographic coordinates are typically given in spherical coordinates, but without the radius and with the angles given in degrees, minutes, and seconds, with the latitude first, and the direction given as North/South or East/West rather than positive/negative. Also note that latitude is the elevation angle up from the equator, whereas spherical coordinates often use the inclination angle down from the polar axis.

Plotting the city locations on a map of the Earth gives the figure below. Such a map can give a very misleading idea of the shortest route, however.

Show:

Map of the Earth in an equirectangular projection, showing two possible flight paths from Urbana, USA to Delhi, India.

Reference material

Did you know?

To get an idea of what it looks like to fly along a great circle path, we can view the crew movies taken from the ISS. The movies taken at night are especially evocative, such as this montage by Michael König.

Technically the ISS is not following a great circle path around the Earth, because the Earth is rotating underneath it. However, because the speed of the ISS is much higher than the Earth's rotational velocity (90 min versus 24 h period), these paths are close to being great circles.

Finding the shortest distance between two points on the
sphere is not a simple calculation given their latitude and
longitude. As proved below, the
shortest path on the sphere is always a *great circle*,
which is the intersection of the sphere with a plane through
the origin. The shortest distance calculation thus reduces
to finding the angle between the vectors \( \vec{OA} \) and
\( \vec{OB} \), which can be easily done by finding their dot product after changing them
to rectangular coordinates.

Click and drag to rotate. | ||

Show: | Earth transparency: 20% | |

City A: | Latitude: | \(\phi_1 = \) 50° |

Longitude: | \(\lambda_1 = \) -20° | |

City B: | Latitude: | \(\phi_1 = \) -20° |

Longitude: | \(\lambda_1 = \) 65° |

Reference material

There are many different map projections that draw the surface of the spherical Earth on a two-dimensional map. Because the sphere is curved, a map projection cannot preserve both areas and angles simultaneously, leading to different trade-offs in choosing an appropriate projection for a given purpose. Some common projections are shown below.

Mercator: cylindrical, conformal (angle-preserving).

Hobo-Dyer: cylindrical, area-preserving.

Winkel tripel: non-cylindrical, compromise.

You might also be interested in what your choice of map projection says about your personality.

Given any two points \( A \) and \( B \) on the surface of the Earth, we choose coordinate axes and use spherical coordinates so that \( A \) is at \( (r = r_0, \theta = 0, \phi = \pi - \phi_0) \) and \( B \) is at \( (r = r_0, \theta = 0, \phi = \pi + \phi_0) \). Here \( r_0 \) is the radius of the Earth and \( 0 \le \phi_0 \le \pi/2 \). The total angle between \( \vec{OA} \) and \( \vec{OB} \) is \( \Delta\phi = 2\phi_0 \), so the great-circle distance between \( A \) and \( B \) is \( r_0 \Delta\phi \). We will now prove that this is the smallest possible distance.

Consider any path from \(A\) to \(B\) on the Earth's surface. Suppose we travel along this path, starting at \(A\) at time \(t = 0\) and ending at \(B\) at time \(t = 1\). Then the position vector at time \(t\) is given by \( \vec{r}(t) \) with spherical coordinates \(r_0\), \(\theta(t)\), \(\phi(t)\) and rectangular coordinates \(x(t), y(t), z(t)\).

The length \(L\) of our path can be computed by integrating the speed from the start time to the end time:

To switch from rectangular to spherical coordinates we use the conversion:

Differentiating these expressions and substituting (or using the spherical velocity expression) gives the path length expression:

Here we have used the fact that \( \dot{\theta}^2 \sin^2\phi \ge 0 \) to see that \(L\) must be at least as big as the great-circle distance \(r_0 \Delta \phi\). Thus the great-circle distance is the minimum path length between \(A\) and \(B\) on the surface of the sphere.

Did you know?

All the calculations on this page have assumed a spherical model of the Earth, given by

Because it spins with a period of about 24 hours, the Earth bulges outwards so the center is further from the equator than from the poles. A shape that better approximates the true Earth is thus an ellipsoid, given by:

Computing shortest path distances on ellipsoids turns out to be much harder than shortest paths on spheres. One set of equations for doing this are known as Vincenty's formulae.

There is no single best ellipsoid that fits the Earth. Instead there are many different ellipsoids in use, each of which fit the Earth better near different countries (e.g., NAD 83 for North America and WGS 84 for GPS world-wide). When even more accuracy is needed, such as for satellite orbit modeling, then true geoid models are used, with spherical harmonic expansions determined from satellite gravity measurements.