# Vector symbols explained

Here you will find the mathematical notation used for the n-vector page.

The notation system used for the n-vector page and in the files for download is presented in Chapter 2 of the following thesis: Gade (2018): Inertial Navigation - Theory and Applications. A simplified presentation is given here.

## Coordinate frame

coordinate frame has a position (origin), and three axes (basis vectors) xy and z (orthonormal). Thus, a coordinate frame can represent both position and orientation, i.e. 6 degrees of freedom. It can be used to represent a rigid body, such as a vehicle or the Earth, and it can also be used to represent a "virtual" coordinate frame such as North-East-Down.

Coordinate frames are designated with capital letters, e.g. the three generic coordinate frames AB, and C.

We also have specific names for some common coordinate frames:

 Coordinate frame Description E Earth N North-East-Down B Body, i.e. the vehicle

Note that it is no problem to only use the position or the orientation of a coordinate frame. E.g., in some cases, we just care about the position of point B and C (and sometimes we only care about the orientation of N).

## General vector

A 3D vector given with numbers is written e.g.
. The three numbers are the vector components along the x-y- and z-axes of a coordinate frame. If the name of the vector is k, and the coordinate frame is A, we will use bold k and A as trailing superscript, i.e.:

Thus
is the 3D vector that is constructed by going 2 units along the x-axis of coordinate frame A, 4 units along the y-axis, and 6 along the z-axis. We say that the vector k is decomposed in A.

## Position vector

Instead of the general vector k, we can have a specific vector that goes from A to B. This vector can be decomposed in CAB, and C are three arbitrary coordinate frames. We would write this vector:

In program code: p_AB_C

The letter p is used since this is a position vector (the position of B relative to A, decomposed/resolved in the axes of C).

### Example a)

From the subscript, we see that this is the vector that goes from E (center of the Earth) to B (the vehicle). The superscript tells us that it is decomposed in E, which we now assume has its z-axis pointing towards the North Pole. From the values, we see that the vector goes 6371 km towards the North Pole, and zero in the x and y directions. If we assume that the Earth is a sphere with radius 6371 km, we see that B is at the North Pole.

### Example b)

The vector goes from B, e.g. an aircraft, to C, e.g. an object. The vector is decomposed in N (which has North-East-Down axes). This means that C is 50 m north of B and 60 m east, and C is also 5 m above B.

### Properties of the position vector

For the general position vector
, we have the property:

I.e. swapping the coordinate frames in the subscript gives a vector that goes in the opposite direction. We also have: I.e., going from A to D is the same as first going from A to B, then from B to D. From the equation, we see that B is cancelled out. ABC, and D are arbitrary coordinate frames.

## Rotation matrix

, we could also have a coordinate frame B, with different orientation than A. The same vector k could be expressed by components along the xy and z-axes of B instead A, i.e. it can also be decomposed in B, written
. Note that the length of
equals the length of
. We will now have the relation:

is the 9 element (3x3) rotation matrix (also called direction cosine matrix) that transforms vectors decomposed in B to vectors decomposed in A. Note that the B in
should be closest to the vector decomposed in B (following the "the rule of closest frames", see Section 2.5.3 in Inertial Navigation - Theory and Applications for details). If we need to go in the other direction, we have:

Now we see that A is closest to A.

### Properties of the rotation matrix

We have that

where the T means matrix transpose. We also have the following property (closest frames are cancelled):

If we compare these properties with the position vector, we see that they are very similar: minus is replaced by transpose, and plus is replaced by matrix multiplication. AB, and C are three arbitrary coordinate frames.

## n-vector

The n-vector is in almost all cases decomposed in E, and in the simplest form, we will write it

This simple form can be used in cases where there is no doubt about what the n-vector expresses the position of. In such cases, we can also express the position using e.g. the variables lat and long, without further specification.

However, if we are interested in the position of multiple objects, e.g. A and B, we must specify which of the two, both for n-vector and for latitude/longitude. In this case we will write:

and
(program code: n_EA_E and n_EB_E

And

and

The subscript E might seem redundant here, it could be sufficient to use only A or B. However, we have chosen to also include the E, since both n-vector and latitude/longitude are depending on the reference ellipsoid that is associated with E (see Section 4.1. in Gade (2010) for more about this). Note however, that the subscript rules (swapping and canceling) we had for
and
cannot be used for n-vector or lat/long.

For spherical Earth, we have a simple relation between
and
:

where
is the radius of the Earth,
is the height of B and