# Homework Help: Transformation matrix derivation problem

1. Sep 1, 2009

### Fryderyk

1. The problem statement, all variables and given/known data

As part of an assignment, I need to derive a transformation matrix to convert a vector in cartesian coordinates to spherical coordinates.

2. Relevant equations

What I've got so far is:

For an arbitrary vector V,

$$\textbf{V}=\left[\begin {array}{ccc}V_{x}&V_{y}&V_{z}\end{array}\right]\left[\begin{array}{c}\textbf{i}\\\textbf{j}\\\textbf{k}\end{array}\right] = \left[\begin{array}{ccc}V_{R}&V_{\theta}&V_{\phi}\end{array}\right]\left[\begin{array}{c}\textbf{e}_{R}\\\textbf{e}_{\theta}\\\textbf{e}_{\phi}\end{array}\right]$$

Knowing that VR is the component of V in the eR direction, then:

$$V_{R}=aV_{x}+bV_{y}+cV_{z}$$

where a, b and c are some transformation coefficients to be derived from geometry.

Similarly,

$$V_{\theta}=dV_{x}+eV_{y}+fV_{z}$$
and
$$V_{\phi}=gV_{x}+hV_{y}+iV_{z}$$

From this, a transformation matrix T exists such that:

$$\left[\begin{array}{ccc}V_{x}&V_{y}&V_{z}\end{array}\right]\textit{T}=\left[\begin{array}{ccc}aV_{x}+bV_{y}+cV_{z}&dV_{x}+eV_{y}+fV_{z}&gV_{x}+hV_{y}+iV_{z}\end{array}\right]=\left[\begin{array}{ccc}V_{R}&V_{\theta}&V_{\phi}\end{array}\right]$$

3. The attempt at a solution

My problem is finding this matrix T.
It's obvious from inspection that:

$$T=\left[\begin{array}{ccc}a&d&g\\b&e&h\\c&f&i\end{array}\right]$$

But, I'm not sure that just stating 'it's obvious that' will be sufficient.
I'm wondering if and how the below equation can be rearranged and solved to give T.

$$\left[\begin{array}{ccc}V_{x}&V_{y}&V_{z}\end{array}\right]\textit{T}=\left[\begin{array}{ccc}V_{R}&V_{\theta}&V_{\phi}\end{array}\right]$$

After this point, finding the coefficients shouldn't be a problem.

Thank you

2. Sep 2, 2009

### tiny-tim

Welcome to PF!

Hi Fryderyk! Welcome to PF!

(have a theta: θ and a phi: φ )
Yes, you're really just stating the obvious …

Finding T and finding a b c etc are the same thing.

Try it this way … you have two sets of axes, with angles between them, and you first need to find the angles …

do the two-dimensional case first (it's easier! ) …

er and eθ are at angle θ to i and j, so the matrix is … ?
:rofl: :rofl:

3. Sep 4, 2009

### demha

hi, im new to PF and i have a very similer problem to this. I am also having trouble finding the T matrix. so far i hav found:
R= (x^2+y^2+z^2)^1/2
theta= sin-1(y/(x^2+y^2)^1/2)
phi =??

hope some one can help...
thanks

4. Sep 4, 2009

### tiny-tim

Welcome to PF!

Hi demha! Welcome to PF!

(have a square-root: √ and try using the X2 tag just above the Reply box )
You seem to be trying to find a matrix that transforms "global" coordinates.

A matrix is linear, and only gives linear transformations, but Cartesian to polar vectors isn't linear.

The matrix T isn't intended to convert vectors which start at the origin … it's only for converting "local" vectors at a particular point (x,y,z) = (r,θ,φ) … so you're converting from i j and k at that point to er eθ and eφ at that point.

For that, you don't need √ or sin-1, you just use the angles.

As I said to Fryderyk, try the two-dimensional case first.