Scroll back to top
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.
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.
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:
Azimuth:
Inclination:
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.
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.
If the spherical coordinates change with time then this causes the spherical basis vectors to rotate with the following angular velocity.
The rotation of the basis vectors caused by changing coordinates can be directly computed, giving the time derivatives below.
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.
Application alert!
Shortest flight paths uses spherical coordinates.
Spherical coordinates can be used to find the shortest flight path between two places on a globe.
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 cylindrical 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:
Azimuth:
Elevation:
Cylindrical 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.
If the cylindrical coordinates change with time then this causes the spherical basis vectors to rotate with the following angular velocity.
The rotation of the basis vectors caused by changing coordinates gives the time derivatives below.
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.
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.