## Intro

So you're in for a game of chess? Alright, you start. You spend quite a bit of time thinking about your first move. But then, eventually, you move your knight to...

How should you describe that position? I mean, it's kinda awkward to be saying: "I move my left knight two steps forward and one step to the right". Your left, or my left? And should I assume that forward is *your* forward?

Instead, you might express your move in terms of coordinates.

Coordinates are used pretty much everywhere. For example, when your GPS informs you about your position, it's essentially taking a bunch of coordinates and translating them into "you're 100 metres from the McDonald's at the corner". Awesome, right?

## Koncept

Coordinates allow us to express positions. They tell us which point in space we refer to.

And this is super handy. Rather than saying "move to the left - no, not that much! - just a tiny bit", say something like "move to position ". That'll do.

But a position mustn't refer to an actual position. For example, mathematicians might let the axis represent time and the axis represent average stock yield. Then your position, if you may call it as such, is the average stock yield after a given time.

## Summering

Cartesian coordinate is the coordinate system we most often use it is defined with and . There are other coordinate systems that are equally valid, such as the polar coordinates and .

In the polar coordinate system we instead define every point as a distance from origo we also have that is defined as the angle that the point have relative the axis.

We can also define and with and

## Coordinate transformations

Coordinate systems are used to describe the location of points in space. In order to do so, they must define some measures of position in the system.

We always need as many measures, called coordinates, as there are dimensions in the space.

### Coordinates in 2D

The most classic example is the *Cartesian coordinate system* in 2 dimensions, formed by the and axes as we are used to. In this system, we denote a point as , describing its length of displacement from the origin in the directions of both axes.

But is this the only choice we have for a coordinate system in 2D? Certainly not.

Look at the system below with and axes, and compare with the Cartesian one. Both are able to describe points in the same space, and the use of and is simply a convention.

In fact, we can easily swap between the two, and convert the representation in one coordinate system to another through a *coordinate transformation*.

Consider the point in the Cartesian coordinate system. If we define the transformation from - to -coordinates as

we see that it becomes after the transformation. The point is still in the exact same place, it is just represented in another coordinate system.

The reason we want to be able to represent a point differently is because it is sometimes more convenient to use one over the other.

### Coordinates in 3D

If the choice of coordinate axes is ambiguous, how have we decided to extend the Cartesian coordinate system from 2 dimensions to 3?

Although not necessary, we generally want the axes to be perpendicular to each other. Note, however, that there are two opposite options for the -axis to be perpendicular to both the - and -axis. By convention, we therefore turn to the *right-hand rule*:

*The right-hand rule*

Using your right hand, let your index finger point in the direction of the -axis, and your middle finger in the direction of the -axis.

Then, the direction of the -axis in the Cartesian coordinate system of 3 dimensions is defined as the one in which your thumb points.

Just as for coordinate systems in 2D, we can define a different one and transform points between them as we like. In the following lecture notes, we will examine two useful alternative coordinate systems in 3D.

## Cylindrical coordinates

### Polar coordinates

As an alternative to Cartesian coordinates using distances along the - and -axis respectively, we can use polar coordinates to represent a point in two dimensions.

This form uses only one distance from the origin, as well as an angle , measured in the counter-clockwise direction from the positive -axis. Hence, a point in polar form is written as .

The coordinate transformation from Cartesian to polar coordinates looks as follows:

### Cylindrical coordinates

If we equip the polar coordinate system with a -axis, we get a coordinate system in 3 dimensions called *cylindrical coordinates*.

Cylindrical coordinates are polar coordinates with a -axis

As per usual, we use our right hand to define the directional relationships in the coordinate system:

*The right hand rule for direction of rotation:*

Using the right hand, let the thumb point in the direction of the -axis, and curl your fingers.

Then, if you twist the hand in the direction that the fingers point, this will define the direction of rotation for the angle .

To visualize what cylindrical coordinates can look like in practice, imagine a car driving up a circular ramp in a parking garage. The position of the car, taken from the center of the ramp as the origin, can be described using the radius of the ramp, the current angle to some defined horizontal direction (the regular -axis), and the height given by the -axis.

This example highlights one of the pros of cylindrical coordinates. Since the radius remains unchanged during the drive up the ramp, the only changing quantities in this particular case are the angle and the height.

A point expressed in cylindrical coordinates takes the form , and the coordinate transformation from the Cartesian coordinate system in 3 dimensions look as follows:

From these formulas, we can derive a set of equations to convert coordinates the other way around too:

## Spherical coordinates

During your summer vacation, you went to Sri Lanka with your friends. It was a blast. Sunbathing, partying, discovering the region. As you were out kayaking, you found a hidden lagoon. But it wasn't marked out on the map, so you had no way of remembering the location. Too bad.

In order to describe positions on spherical surfaces, like the earth's surface, you can use (surprise surprise!) spherical coordinates. It would've been quite cumbersome to work out your position in normal coordinates. Spherical coordinates are tailored for this kind of problem.

Given some radius , set

See the picture below.

Normally, we say and . If so, then there's only one set of coordinates which corresponds to a given position. But we could, as we shall see further on, let and be any real number.

Finally, here's a heads up. When we indicate spherical coordinates, the order of and is important. If you don't get the order right, you might be haunted by Einstein's ghost. Just so you know.