# Expression a vector in different basis

Gold Member

## Homework Statement

Consider the vector $$\vec A$$ whose origin is $$\vec r$$.
1)Express the vector $$\vec A$$ in a basis of Cartesian coordinates, cylindrical and spherical ones.
2)Repeat part 1) if the origin is $$\vec r$$ + $$\vec r_0$$.

None given.

## The Attempt at a Solution

1)In Cartesian coordinates, $$\vec A=(r_x+a_x,r_y+a_y, r_z+a_z)$$. If we change the origin as in part 2), then $$\vec A=(r_x+r_{0x}+a_x,r_y+r_{0y}+a_y, r_z+r_{0z}+a_z)$$.

For cylindrical coordinates, I've sketched a 3 dimensional graphic but I don't see how I can express $$\vec A$$. Life would be easier if I could use some linear algebra maybe. I just don't know how to start and if it's a good idea.
Thanks for any suggestion.

Going from cylindrical coordinates to cartesian coordinates, we can use the transformations $$x = r \cos(\theta)$$, $$y = r \sin(\theta)$$, and, of course, $$z = z_{\text{cyl}}$$.

Now, going from cartesian to cylindrical isn't as obvious, but is still simple. For example, the radius, r, is simply $$r = \sqrt{x^2 +y^2}$$.

This might help: http://en.wikipedia.org/wiki/Cylindrical_coordinate_system#Cartesian_coordinates"

Last edited by a moderator:
Gold Member
Going from cylindrical coordinates to cartesian coordinates, we can use the transformations $$x = r \cos(\theta)$$, $$y = r \sin(\theta)$$, and, of course, $$z = z_{\text{cyl}}$$.

Now, going from cartesian to cylindrical isn't as obvious, but is still simple. For example, the radius, r, is simply $$r = \sqrt{x^2 +y^2}$$.

This might help: http://en.wikipedia.org/wiki/Cylindrical_coordinate_system#Cartesian_coordinates"

I think I'm stupid, I already knew this. I don't know why I didn't think about applying it. I'm going to try this tomorrow (it's too late). So what I've done so far is ok?

Last edited by a moderator:
vela
Staff Emeritus
Homework Helper
No, you've misunderstood the question. The vector A is assigned to the point r. The problem is asking you to express A in terms of the coordinate unit vectors at that point, and when it's parallel transported it to the point r+r0.

Remember that the direction of most of the unit vectors, like $\hat{r}$, depends on what point you're talking about.

Gold Member
No, you've misunderstood the question. The vector A is assigned to the point r. The problem is asking you to express A in terms of the coordinate unit vectors at that point, and when it's parallel transported it to the point r+r0.

Remember that the direction of most of the unit vectors, like $\hat{r}$, depends on what point you're talking about.

I'm not sure I'm understanding. I've sketched the point r and from it I drew $$\vec A$$. I mean, I took the origin of $$\vec A$$ being r.
At point r, the unit vectors in Cartesian coordinates are the same as in the origin 0. Or not? I mean $$\hat i$$, $$\hat j$$ and $$\hat k$$. So $$\vec A$$ would be $$a_x \hat i + a_y \hat j + a_z \hat k$$. Hmm I don't think so...
Also, I don't understand when you talked about "when it's parallel transported it to the point...".

In fact I don't understand what they ask me to do. It doesn't look so hard, but I don't know what to do.

vela
Staff Emeritus
Homework Helper
I'm not sure I'm understanding. I've sketched the point r and from it I drew $$\vec A$$. I mean, I took the origin of $$\vec A$$ being r.
At point r, the unit vectors in Cartesian coordinates are the same as in the origin 0. Or not? I mean $$\hat i$$, $$\hat j$$ and $$\hat k$$. So $$\vec A$$ would be $$a_x \hat i + a_y \hat j + a_z \hat k$$. Hmm I don't think so...
That's right, actually.
Also, I don't understand when you talked about "when it's parallel transported it to the point...".
I just mean the vector A is moved to the new point without changing its magnitude and direction.
In fact I don't understand what they ask me to do. It doesn't look so hard, but I don't know what to do.
It's probably easiest to explain using an example. I'll just use R2 to keep it simple. Let A=(1,0). Now consider the points P=(1,1) and Q=(2,0) in the xy plane; in polar coordinates, you'd have rP=sqrt(2), θP=π/4 for P and rQ=2, θQ=0 for Q. Therefore, at P, you get:

$$\hat{r}_P=(\cos\theta_P,\sin\theta_P)=\left(\frac{1}{\sqrt{2}},\frac{1}{\sqrt{2}}\right)$$

$$\hat{\theta}_P=(-\cos\theta_P,\sin\theta_P)=\left(-\frac{1}{\sqrt{2}},\frac{1}{\sqrt{2}}\right)$$

$$\vec{A}=1\hat{i}=\frac{1}{\sqrt{2}}\hat{r}_P-\frac{1}{\sqrt{2}}\hat{\theta}_P$$

and at Q, you get:

$$\hat{r}_Q=(\cos\theta_Q,\sin\theta_Q)=(1,0)$$

$$\hat{\theta}_Q=(-\cos\theta_Q,\sin\theta_Q)=(0,1)$$

$$\vec{A}=1\hat{i}=1\hat{r}_Q$$

Gold Member
That's right, actually.

I just mean the vector A is moved to the new point without changing its magnitude and direction.

It's probably easiest to explain using an example. I'll just use R2 to keep it simple. Let A=(1,0). Now consider the points P=(1,1) and Q=(2,0) in the xy plane; in polar coordinates, you'd have rP=sqrt(2), θP=π/4 for P and rQ=2, θQ=0 for Q. Therefore, at P, you get:

$$\hat{r}_P=(\cos\theta_P,\sin\theta_P)=\left(\frac{1}{\sqrt{2}},\frac{1}{\sqrt{2}}\right)$$

$$\hat{\theta}_P=(-\cos\theta_P,\sin\theta_P)=\left(-\frac{1}{\sqrt{2}},\frac{1}{\sqrt{2}}\right)$$

$$\vec{A}=1\hat{i}=\frac{1}{\sqrt{2}}\hat{r}_P-\frac{1}{\sqrt{2}}\hat{\theta}_P$$

and at Q, you get:

$$\hat{r}_Q=(\cos\theta_Q,\sin\theta_Q)=(1,0)$$

$$\hat{\theta}_Q=(-\cos\theta_Q,\sin\theta_Q)=(0,1)$$

$$\vec{A}=1\hat{i}=1\hat{r}_Q$$
Thanks, this was really useful!

I'm having a problem. So in Cartesian coordinates, we've said that $$a_x \hat i + a_y \hat j + a_z \hat k$$. Now I want to do cylindrical ones.
I've sketched the vector r. Considering only the x-y plane, I have that $$\hat r =(\cos \varphi, \sin \varphi)$$ and $$\hat \phi=(-\cos \varphi, \sin \varphi)$$. Now I must write $$\vec A$$ as a linear combination of $$\hat r$$ and $$\hat \varphi$$.
I already know that $$a_z=a_z \hat k$$. It's clear that $$a_x$$ can be written as a (linear ?) combination of only $$\hat r$$ and $$\hat \varphi$$. To me it's clear it will be something of the form $$B\hat r - B\hat \phi$$. Is B worth $$\frac{a_x}{2 \cos \varphi}$$?
If so, then I'd get $$\vec A=\left ( \frac{a_x}{2 \cos \varphi} \hat r-\frac{a_x}{2 \cos \varphi} \hat \varphi, \frac{a_y}{2\sin \varphi} \hat \varphi +\frac{a_y}{2 \sin \varphi} \hat r, a_z \hat k \right )$$. I'd appreciate a feedback. I'm not confident at all.

vela
Staff Emeritus
Homework Helper
Looks good except for the way you wrote some stuff down.
If so, then I'd get $$\vec A=\left ( \frac{a_x}{2 \cos \varphi} \hat r-\frac{a_x}{2 \cos \varphi} \hat \varphi, \frac{a_y}{2\sin \varphi} \hat \varphi +\frac{a_y}{2 \sin \varphi} \hat r, a_z \hat k \right )$$. I'd appreciate a feedback. I'm not confident at all.
You're mixing up the notation. If you include the unit vectors explicitly, you should write it as a sum:

$$\vec A=\left(\frac{a_x}{2 \cos \varphi} \hat r-\frac{a_x}{2 \cos \varphi} \hat \varphi\right)+\left(\frac{a_y}{2\sin \varphi} \hat \varphi +\frac{a_y}{2 \sin \varphi} \hat r\right)+ a_z \hat k$$

After combining terms, you get

$$\vec A=\left(\frac{a_x}{2 \cos \varphi} + \frac{a_y}{2 \sin \varphi}\right) \hat r+\left(-\frac{a_x}{2 \cos \varphi}+\frac{a_y}{2\sin \varphi}\right) \hat \varphi + a_z \hat k$$

Now if you write it as an ordered triplet $(r,\varphi,z)$, you'd say:

$$\vec A=\left(\frac{a_x}{2 \cos \varphi} + \frac{a_y}{2 \sin \varphi},-\frac{a_x}{2 \cos \varphi}+\frac{a_y}{2\sin \varphi}, a_z \right)$$

Gold Member
Ah yes, you're right. I can't believe I got it right. I'm going to tackle the rest. Thanks a lot for all.