How Do You Derive and Invert Spherical Coordinate Unit Vectors?

A^{-1}=A^T=\begin{pmatrix} \sin\theta\cos\phi & \cos\theta\cos\phi &-\sin\phi \\ \sin\theta\sin\phi & \cos\theta\sin\phi & \cos\phi \\ \cos\theta & -\sin\theta & 0\end{pmatrix}In summary, the unit vectors in spherical coordinates, \hat{r}, \hat{\theta}, and \hat{\phi}, can be expressed in terms of the unit vectors in Cartesian coordinates, \hat{x}, \hat{y}, and \hat{z}, by using the equations:\hat{r} = \sin \theta \cos
  • #1
Yitzach
61
0

Homework Statement


Express in unit vectors [tex]\hat{r}[/tex], [tex]\hat{\theta}[/tex], [tex]\hat{\phi}[/tex] in terms of [tex]\hat{x}[/tex], [tex]\hat{y}[/tex], [tex]\hat{z}[/tex] (that is derive the relevant equations). ... Also work out the inverse forulas giving [tex]\hat{x}[/tex], [tex]\hat{y}[/tex], [tex]\hat{z}[/tex] in terms of [tex]\hat{r}[/tex], [tex]\hat{\theta}[/tex], [tex]\hat{\phi}[/tex] (and [tex]\theta[/tex], [tex]\phi[/tex]).


Homework Equations


[tex]\hat{r} = sin \theta cos \phi \hat{x} +sin \theta sin \phi \hat{y} +cos \theta \hat{z}[/tex]
[tex]\hat{\theta} = cos \theta cos \phi \hat{x} +cos \theta sin \phi \hat{y} -sin \theta \hat{z}[/tex]
[tex]\hat{\phi} = -sin \phi \hat{x} +cos \phi \hat{y}[/tex]


The Attempt at a Solution


That looked like a linear system to me so I put the spherical coordinate unit vectors in a 3x1 matrix, the trig in a 3x3 matrix, and the Cartesian in a 3x1 matrix. Called the 3x3 [A] and took its inverse.
The method I used to arrive with the inverse is [A]-1=[tex]\frac{adj A}{det A}[/tex]=[tex]\frac{adj A}{|[A]|}[/tex]. The determinate of A is [tex]sin^{2}\theta sin^{2}\phi + cos^{2}\theta cos^{2}\phi + cos^{2}\theta sin^{2}\phi + sin^{2}\theta cos^{2}\phi = 1[/tex]
The solution I came up with is:
[tex]\hat{x} = sin \theta cos \phi \hat{r} -sin \theta sin \phi \hat{\theta} +cos \theta \hat{\phi}[/tex]
[tex]\hat{y} = -cos \theta cos \phi \hat{r} +cos \theta sin \phi \hat{\theta} +sin \theta \hat{\phi}[/tex]
[tex]\hat{z} = -sin \phi \hat{r} +cos \phi \hat{\theta}[/tex]
The problem I'm having is that [A][A]-1[tex]\neq[/tex]the identity matrix. Some of the symptoms are [tex]\frac{d}{d\theta}[/tex]|[A][A]-1|=0, [tex]\frac{d}{d\phi}[/tex]|[A][A]-1|[tex]\neq[/tex]0, |A-1|=1, [tex]\frac{d}{d\theta}[/tex]|[A]|=0, and [tex]\frac{d}{d\phi}[/tex]|[A]|[tex]\neq[/tex]0.
Either this operation is not allowed, not defined in this manner, or I screwed up. If you happen to know which and in what manner please say so. I have not done the first part yet figuring I would take care of what looked to be the easy part first. That may help in this second part. If you happen to have pointers on how to proceed in the first part, please say so. I'm going to go poking through my notes now to see what might work there.
 
Physics news on Phys.org
  • #2
Your method looks fine to me, as does your determinant...You must have made a mistake in taking the adjoint of A.

[tex]A=\begin{pmatrix}A_{11} & A_{12} & A_{13}\\ A_{21} & A_{22} & A_{23} \\A_{31} & A_{32} & A_{33}\end{pmatrix}\implies A^{\dagger}=\begin{pmatrix}A_{11}^* & A_{21}^* & A_{31}^*\\ A_{12}^* & A_{22}^* & A_{32}^* \\A_{13}^* & A_{23}^* & A_{33}^*\end{pmatrix}[/tex]
 
Last edited:
  • #3
After redoing the adj A, I came up with:
[tex]\hat{x} = sin \theta cos \phi \hat{r} -sin \theta sin \phi \hat{\theta} +cos \theta \hat{\phi}[/tex]
[tex]\hat{y} = -cos \theta cos \phi \hat{r} +cos \theta sin \phi \hat{\theta} +sin \theta \hat{\phi}[/tex]
[tex]\hat{z} = -sin \phi \hat{r} -cos \phi \hat{\theta}[/tex]
I also realized that as [A]['B][tex]\neq[/tex]['B][A]. I would save some headache with [A]-1[A] instead. This is closer as |[A]-1[A]|=1. But [A]-1[A][tex]\neq[/tex]['I].

Is there any to keep the server from messing with the letter case besides inserting the most discrete character you can find?
 
  • #4
Yitzach said:
After redoing the adj A, I came up with:
[tex]\hat{x} = sin \theta cos \phi \hat{r} -sin \theta sin \phi \hat{\theta} +cos \theta \hat{\phi}[/tex]
[tex]\hat{y} = -cos \theta cos \phi \hat{r} +cos \theta sin \phi \hat{\theta} +sin \theta \hat{\phi}[/tex]
[tex]\hat{z} = -sin \phi \hat{r} -cos \phi \hat{\theta}[/tex]

No, this is still incorrect.

Your matrix [itex]A[/itex] is

[tex]A=\begin{pmatrix}\sin\theta\cos\phi & \sin\theta\sin\phi & \cos\theta \\ \cos\theta\cos\phi & \cos\theta\sin\phi & -\sin\theta \\-\sin\phi & \cos\phi & 0\end{pmatrix}[/tex]

right?

Is there any to keep the server from messing with the letter case besides inserting the most discrete character you can find?

Sorry, not my area of expertise.
 
  • #5
I don't see how that is incorrect. Yes that is my A. I did the adj A again and came up with the same thing. If I replace the position with letters except for zero I come up with: [tex]A=\begin{pmatrix}A & B & C \\ D & E & F \\ G & H & 0\end{pmatrix}[/tex]
The adj A is [tex]adj A=\begin{pmatrix}-HF & -GF & DH-GE \\ -HC & -GC & AH-GB \\ BF-EC & AF-DC & AE-DB\end{pmatrix}[/tex]
Filling in the functions into the letters I come up with: [tex]adj A=\begin{pmatrix}(-1)^{2}\sin\theta\cos\phi & (-1)^{3}\sin\theta\cos\phi & \cos\theta\cos^{2}\phi--\cos\theta\sin^{2}\phi \\ -\cos\theta\cos\phi & (-1)^{2}\cos\theta\sin\phi & \sin\theta\cos^{2}\phi--\sin\theta\sin^{2}\phi \\ -\sin^{2}\theta\sin\phi-\cos^{2}\theta\sin\phi & -\sin^{2}\theta\cos\phi-\cos^{2}\theta\cos\phi & \sin\theta\cos\phi\cos\theta\sin\phi-\cos\theta\cos\phi\sin\theta\sin\phi \end{pmatrix}[/tex]

That mess simplifies by the cos/sin Pythagorean Identity and distributive property of multiplication to the second solution I came up with.
 
  • #6
Yitzach said:
I don't see how that is incorrect. Yes that is my A. I did the adj A again and came up with the same thing. If I replace the position with letters except for zero I come up with: [tex]A=\begin{pmatrix}A & B & C \\ D & E & F \\ G & H & 0\end{pmatrix}[/tex]
The adj A is [tex]adj A=\begin{pmatrix}-HF & -GF & DH-GE \\ -HC & -GC & AH-GB \\ BF-EC & AF-DC & AE-DB\end{pmatrix}[/tex]

Not quite, the adjugate matrix is the transpose of the matrix of cofactors. You also have a couple of negative sign errors. Remember, [itex]C_{ij}=(-1)^{i+j}M_{ij}[/itex] where [itex]M_{ij}[/itex] is the {i,j} minor of [itex]A[/itex]. What you've actually calculated is a matrix of the minors of [itex]A[/itex].

[tex]\text{adj}(A)=\begin{pmatrix}-HF & +GF & DH-GE \\ HC & -GC & -AH+GB \\ BF-EC & -AF+DC & AE-DB\end{pmatrix}^T[/tex]
 
  • #7
You could also save yourself from calculating a cofactor matrix at all by recognizing that both coordinate bases are orthogonal, and hence [itex]A[/itex] must be an orthogonal matrix, so that [itex]A^{-1}=A^T[/itex]
 
  • #8
Paying attention to what the book says helps. That was staring me in the face just a little above the definition of the adjoint.
The transpose works better, more foolproof. I didn't like that transpose method myself because the proper inverse should work and because I had know idea as to why it worked. As I recall, it felt like it appeared out the blue and I said, "What is this?" and dropped it.
 
Last edited:

FAQ: How Do You Derive and Invert Spherical Coordinate Unit Vectors?

What is the inverse of a matrix of functions?

The inverse of a matrix of functions is a mathematical operation in which a matrix is transformed into a new matrix that, when multiplied with the original matrix, results in the identity matrix. In other words, it is a way to "undo" the effects of a matrix of functions.

Why is finding the inverse of a matrix of functions important?

Finding the inverse of a matrix of functions is important because it allows us to solve equations that involve matrices, which are commonly used to represent data in fields such as engineering, economics, and computer graphics. It also allows us to perform operations such as division and finding solutions to systems of equations.

How do you find the inverse of a matrix of functions?

To find the inverse of a matrix of functions, you can use the Gauss-Jordan elimination method or the adjugate method. The Gauss-Jordan elimination method involves row operations to transform the original matrix into the identity matrix, while the adjugate method involves finding the adjugate matrix and multiplying it by the reciprocal of the determinant of the original matrix.

Can every matrix of functions have an inverse?

No, not every matrix of functions has an inverse. For a matrix to have an inverse, it must be a square matrix (having the same number of rows and columns) and its determinant must not be equal to zero. If the determinant is zero, the matrix is said to be singular and does not have an inverse.

What are some applications of using the inverse of a matrix of functions?

The inverse of a matrix of functions has many applications in various fields. It is used in solving systems of linear equations, calculating the coefficients of a polynomial function, and finding the coefficients of a linear transformation. It is also used in computer graphics to rotate, scale, and translate objects in 2D and 3D space.

Back
Top