\chapter{Coordinate systems}

Readers will be familiar with coordinate systems, however we will now take a look at coordinate systems in a more rigorous framework.

Coordinate frame is a Basis that formed based on some arbitrary 'origin' coordinate. It encapsulates the idea 
For instance, at some coordinate $p$, one may want a frame representing the directions of the increase of each coordinate (cartesian, cylindrical, spherical frames), or perhaps one wants a frame with directions along a curve, orthogonal to the bend of a curve, and another direction orthogonal to both of those (Frenet-Serret frame).

Considering different coordinate frames can immensely reduce and facilitate the required computations for many types of integrals one encounters in vector analysis by abusing the symmetry of various problems, and is also vital in the study of differential geometry.


We first study the former; frames of coordinate systems.

Note that although many frames we use are orthonormal basis', but this is not a requirement; we'll see examples of these much later on.

coordinate frame
\begin{definition}[Coordinate system on a topological space]
A \emph{Coordinate system} is an ordered pair $(C,\mu)$ such that $\mu : C \to X$ is a homeomorphism.
\end{definition}

\begin{definition}[Smooth coordinate system on a differentiable manifold]
A \emph{smooth coordinate system} is an ordered pair $(C,\mu)$ such that $\mu : C \to X$ is a diffeomorphism.
\end{definition}


\begin{definition}[Standard basis vectors with respect to point $p$]
Consider an $n$-tuple as a smooth coordinate system on a linear space with dimension $n$ by the diffeomorphism $\mathbf{r}$ The \emph{standard contravariant basis with respect to $p$} is a basis for the space defined as the following.
\[\mathbf{e}_{q^i} = \frac{\frac{\partial \mathbf{r}}{\partial q^i}(p)\]
\end{definition}


Many useful coordinate systems tend to have these basis vectors orthogonal relative to any point, however examples such as skew coordinates (cartesian coordinates where one axis is skewed slighly) do not produce an orthoigonal basis at every point (in fact, for skew coordinates they are never an othogonal basis).

\begin{definition}[Orthogonal coordinate system]
Orthogonal coordinate system is a coordinate system whose standard basis vectors with respect to any point form an orthonormal basis.
\end{definition}



\section{Cartesian $\mathbb{R}^n$ frame}


This is the standard coordinate system for $\mathbb{R}^n$, represented by specifying elements of $\mathbb{R}^n$ in the most natural way; choosing an element from each of the copies of $\mathbb{R}$ in the cartesian product $\mathbb{R}^n$.

Transform from cartesian basis to cartesian basis is done by identity linear transform



\[(x,y,z)\]

\[\mathbf{r}(x,y,z) = \begin{bmatrix} x \\ y \\ z \end{bmatrix}\]

	\[ \mathcal{F} =  \{  \mathbf{e}_{x} , \mathbf{e}_{y} ,  \mathbf{e}_{z} \}   = \{ \begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix} ,  \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix} ,  \begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix} \} = \{ \mathbf{i} \mathbf{j}, \mathbf{k}\} \]


The cartesian frame has the interesting property in that the generated basis is the same relative to any coordinate point. As it turns out, other frames do not have this property. 









\section{Generalizing to a curvilinear orthonormal frame}

The cartesian coordinate system is the standard, we can define new curvilinear coordinate systems by introducing invertible differentiable functions that translate the new coordinates tocartesian coordinates.


From any coordinate system, we define its coordinate frame by the following.

This normalization of a linear transform is essentially saying that the basis for the new coordinate frame has vectors representing the direction of infinitesimal increase for each coordinate at some given point. This means that the coordinate frame can have a whole new basis for different points. We normalize it for the sake of making the vectors have length 1.

As it turns out, the basis vectors are always orthogonal if our cartesian to new coordinate functions are differentiable, so we have an orthonormal basis!



\section{Polar $\mathbb{R}^2$ basis}
\[x(r,\theta) = r \cos (\theta)\]
\[y(r,\theta) = r \sin(\theta)\]

One thing to note is that Cartesian $(0,0)$ is mapped to infinte amount of points $(0,\theta), \theta \in [0,2\pi)$. There are a few ways to patch this up so that this can be a coordinate system according to our definition, commonly by imposing the restriction $r > 0$, or allowing only 1 angle when $r=0$.

According to the definition of a coordinate frame when these functions are differentiable and invertible (which they are on $r\in (0,\infty) ,\theta \in [0,2\pi)$), we have the following by applying the linear transform an then normalizing.

\[ \mathbf{r} = \cos (\theta) \mathbf{x} + \sin (\theta) \mathbf{y} \]
\[ \mathbf{\theta} = -\sin (\theta) \mathbf{x} + \cos(\theta) \mathbf{y} \]


\section{Cylindrical $\mathbb{R}^3$ basis}



Cylindrical frame
\[(r,\theta,z)\]
\[\mathbf{r}(r,\theta,z) = \begin{bmatrix} r \cos (\theta)  \\ r \sin (\theta) \\ z \end{bmatrix}\]

\[ \mathcal{F} =  \{  \mathbf{e}_{r} , \mathbf{e}_{\theta} ,  \mathbf{e}_{z} \}   = \{ \begin{bmatrix} \cos (\theta) \\ \sin (\theta) \\ 0 \end{bmatrix} ,  \begin{bmatrix} -\sin (\theta) \\ \cos (\theta) \\ 0 \end{bmatrix} ,  \begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix} \} \]




\section{Spherical $\mathbb{R}^3$ basis}


Spherical frame
\[(\rho,\theta,\phi)\]
\[ \mathbf{r}(\rho,\theta,\phi) = \begin{bmatrix} \rho \sin (\phi) \cos (\theta)  \\ \rho \sin (\phi) \sin (\theta) \\ \rho \cos (\phi) \end{bmatrix}\]
	\[ \mathcal{F} =  \{  \mathbf{e}_{\rho} , \mathbf{e}_{\theta} ,  \mathbf{e}_{\phi} \}   = \{ \begin{bmatrix} \sin (\phi) \cos (\theta) \\ \sin (\phi) \sin (\theta) \\ \cos (\phi) \end{bmatrix} ,  \begin{bmatrix} \cos (\phi) \cos (\theta) \\ \cos (\phi)  \sin (\theta) \\ -\sin (\phi) \end{bmatrix} ,  \begin{bmatrix} \cos (\phi) \\ -\sin (\phi) \\ 0 \end{bmatrix} \} \]



\section{Applications for line integrals}
\section{Applications for surface and flux integrals}








