transforming a vector from cartesian to spherical and cylindrical co-ordinate system I know the formula(which i don't know how to copy here but it was in matrix form) for transforming a vector from cartesian system to spherical or cylindrical coordinate system.
But, I want to know its derivation.
I tried searching it on web but all i got was some jacobian formulas , that i have no idea about.
 A: There are a number of ways to derive this. It's maybe easiest to think about how to express the unit vectors in one coordinate system in terms of those of the other. I found many decent looking references when googling "vectors in spherical and cartesian coordinates", among them the following:
1)http://www.csupomona.edu/~ajm/materials/delsph.pdf
2)http://www.ie.itcr.ac.cr/acotoc/Maestria_en_Computacion/Sistemas_de_Comunicacion_II/Material/Biblio1/chapter%2002.pdf
3)http://www.physics.purdue.edu/~jones105/phys310/coordinates.pdf
In principle it's all already in the first picture in (1) here. However, working through (2) might be more helpful since it's a bit more explicit.
A: For the sake of simplicity (laziness?), let's look at the 2d case, switching from cartesian coordinates $(x,y)$ to polar $(r,\theta)$.  The 3d cases you mentioned are completely similar, and working them out would be a good exercise.
Let $\partial_x$ and $\partial_y$ denote the velocity vectors of the curves $t\mapsto (x+t,y)$, respectively $t\mapsto (x,y+t)$ (there is actually a reason for this notation!).  So $\partial_x$ and $\partial_y$ are the usual basis vectors $(1,0)$, $(0,1)$.
Similarly, let $\partial_r$ and $\partial_\theta$ denote the velocity vectors of the curves of constant $\theta$, respectively constant $r$. Differentiating $(r\cos\theta,r\sin\theta)$ with respect to $r$ and $\theta$, we get $$\partial_r =\cos(\theta)\partial_x + \sin(\theta)\partial_y$$
and
$$\partial_\theta = -r\sin(\theta)\partial_x + r\cos(\theta)\partial_y$$
For $r>0$ these form a basis for the vector space $\mathbb{R}^2$, so away from the origin, any vector field $v:\mathbb{R}\setminus\{0\}\rightarrow \mathbb{R}^2$ be written $v=\alpha(r,\theta)\partial_r+\beta(r,\theta)\partial_\theta$.  We can also write $v=a(x,y)\partial_x+b(x,y)\partial_y$. A comparison gives
$$a=\cos(\theta)\alpha-r\sin(\theta)\beta\hskip.8in b=\sin(\theta)\alpha + r\cos(\theta)\beta.$$
You can solve for $\alpha$ and $\beta$ if you like!
