TITLE: What is (fundamentally) a coordinate system ?
QUESTION [10 upvotes]: Consider the following construction of vectors and points.
Let's start with a vector space, or more specifically a coordinate space $F^N$ over a field $F$ and of $N$ dimensions. The elements of this vector space are vectors $\vec{v}$ and we can express their coordinates using a basis $(\vec{e_1}, \vec{e_2}, ... \vec{e_N})$ of the vector space (and any coordinate space comes with a standard basis).
Using this vector space, one can construct the related affine space $A$, whose elements are points. As there is no origin in an affine space, to locate a point one need a coordinate system which can be specified by an origin and a basis. (First question: does this construction make sense ?)
My problem, is that I am not sure to understand what is fundamentally a coordinate system... My problem is the following: in 3D cartesian coordinates, it is pretty simple: the vector space is $\mathbb{R}^{3}$, so we can construct the related affine space with points, and by specifying an origin $O$ plus the standard basis, we can identify the position of the point $P$ by the coordinates of the vector going from $O$ to $P$. But with spherical coordinates I am lost and I am not sure to really understand what mathematical objects is/are $(r, \theta, \phi)$ and $(\vec{e_r}, \vec{e_\theta}, \vec{e_\phi})$: in the contrary of cartesian coordinates, the basis $(\vec{e_r}, \vec{e_\theta}, \vec{e_\phi})$ will change from one point to another. Why is that ? Is the vector space underlying $(r, \theta, \phi)$ and linked with $(\vec{e_r}, \vec{e_\theta}, \vec{e_\phi})$ the same as the one we use in the case of cartesian coordinates. I think I am missing a basic thing...

REPLY [4 votes]: A more geometric point of view is to consider the coordinates as scalar fields $x^1, x^2, \ldots$ on the vector space.  These scalar fields then determine two bases of vector fields:  the tangent basis vectors $e_i = \partial \vec x/\partial x^i$, and the cotangent basis vectors $e^i = \nabla x^i$.  These are fields, in that they may vary with respect to position.
Cartesian coordinates are somewhat special in that their tangent (and cotangent) basis vector fields are constant.  Hence, you can use them directly to describe positions.
For more general coordinates, that may not be the case.  Because the basis tangent and cotangent vector fields are fields, evaluating them at a specific point gives you bases for two vector spaces at that point.  For example, in spherical coordinates, you can't use the vectors $e_r, e_\theta, e_\phi$ in linear combinations to describe positions, but if you have a curve through an arbitrary point, you can use the values of $e_r, e_\theta, e_\phi$ at that particular point to talk about the direction of that curve.  You can do this at all points along the curve, but only using each point's set of tangent basis vectors.
More specifically, you could put a circle in the $xy$-plane centered on the origin, and its tangent vector would be $e_\phi$ everywhere, but you know in terms of Cartesian coordinates and basis vectors, it would be $e_y \cos \phi - e_x \sin \phi$.
While the positions in a flat space do belong to a vector space, it's not generally true that those vectors look like linear combinations of tangent basis vectors because, as you said, those tangent vectors vary with position.  You can write $\vec x = r\hat x(\theta, \phi)$ for instance in spherical coordinates, and then define the unit vector function $\hat x$ as having rotational symmetry and so on and so forth.  It's certainly not as simple as what you would have in Cartesian where $\vec x = x e_x + y e_y + z e_z$.  And that's unavoidable.