| Line 175: |
Line 175: |
| | ::<math>x = r \cos \theta\,</math> | | ::<math>x = r \cos \theta\,</math> |
| | ::<math>y = r \sin \theta\,</math> | | ::<math>y = r \sin \theta\,</math> |
| | + | |
| | ::<math>r = \sqrt{x^2 + y^2}\,</math> | | ::<math>r = \sqrt{x^2 + y^2}\,</math> |
| | ::<math>\theta = \tan^{-1} (y/x)\,</math> | | ::<math>\theta = \tan^{-1} (y/x)\,</math> |
| Line 182: |
Line 183: |
| | ::<math>y = r \sin \theta \sin \phi\,</math> | | ::<math>y = r \sin \theta \sin \phi\,</math> |
| | ::<math>z = r \cos \theta\,</math> | | ::<math>z = r \cos \theta\,</math> |
| | + | |
| | ::<math>r = \sqrt{x^2 + y^2 + z^2}\,</math> | | ::<math>r = \sqrt{x^2 + y^2 + z^2}\,</math> |
| | ::<math>\theta = \tan^{-1} (\sqrt{x^2 + y^2} / z)\,</math> | | ::<math>\theta = \tan^{-1} (\sqrt{x^2 + y^2} / z)\,</math> |
| Line 247: |
Line 249: |
| | In other words, the transformation of vector components is just a matrix multiplication by the Jacobian matrix | | In other words, the transformation of vector components is just a matrix multiplication by the Jacobian matrix |
| | ::<math>\begin{bmatrix}J(u, v, w / x, y, z)\end{bmatrix}</math> | | ::<math>\begin{bmatrix}J(u, v, w / x, y, z)\end{bmatrix}</math> |
| | + | |
| | + | We make a simplification to avoid having our notation get completely out of control. In keeping with our goal of expressing everything just in terms of the new coordinate system: |
| | + | *The matrix that we have been calling [J(x, y, z / u, v, w)] we will call just [J]. That is, [J] for a coordinate system means [J(Cartesian/the coordinate system under discussion)]. |
| | + | *The matrix that goes the other way, formerly called [J(u, v, w / x, y, z)] we will call <math>[J]^{-1}</math>. It's just the inverse of the first matrix. |
| | + | We will call [J] the "Jacobian of the coordinate system". |
| | + | |
| | + | ::The astute reader will notice that this is not a good definition. [J] depends on the choice of the "reference" Cartesian system, so we're not justified in calling it just "the Jacobian". But it turns out that it won't make any difference. We will always get the same answers, no matter what reference system we used. See the exercises. |
| | + | |
| | + | Therefore: |
| | + | ::<math>\begin{bmatrix} A_u \\ A_v \\ A_w \end{bmatrix} = [J]^{-1} \begin{bmatrix} A_x \\ A_y \\ A_z \end{bmatrix}</math> |
| | + | and: |
| | + | ::<math>\begin{bmatrix} A_x \\ A_y \\ A_z \end{bmatrix} = [J] \begin{bmatrix} A_u \\ A_v \\ A_w \end{bmatrix}</math> |
| | | | |
| | For polar coordinates in two dimensions, we have: | | For polar coordinates in two dimensions, we have: |
| − | ::<math>\begin{bmatrix} A_r \\ A_\theta \end{bmatrix} = \begin{bmatrix}J(r, \theta / x, y)\end{bmatrix} \begin{bmatrix} A_x \\ A_y \end{bmatrix}</math> | + | ::<math>\begin{bmatrix} A_r \\ A_\theta \end{bmatrix} = \begin{bmatrix}J(r, \theta / x, y)\end{bmatrix} \begin{bmatrix} A_x \\ A_y \end{bmatrix} = \begin{bmatrix} \displaystyle\frac{\partial r}{\partial x} & \displaystyle\frac{\partial r}{\partial y} \\ \\ \displaystyle\frac{\partial \theta}{\partial x} & \displaystyle\frac{\partial \theta}{\partial y}\end{bmatrix} \begin{bmatrix} A_x \\ A_y \end{bmatrix} = \begin{bmatrix} \cos \theta & \sin \theta \\ \\ \displaystyle\frac{- \sin \theta}{r} & \displaystyle\frac{\cos \theta}{r} \end{bmatrix} \begin{bmatrix} A_x \\ A_y \end{bmatrix}</math> |
| − | or
| |
| − | ::<math>\begin{bmatrix} A_r \\ A_\theta \end{bmatrix} = \begin{bmatrix} \displaystyle\frac{\partial r}{\partial x} & \displaystyle\frac{\partial r}{\partial y} \\ \\ \displaystyle\frac{\partial \theta}{\partial x} & \displaystyle\frac{\partial \theta}{\partial y}\end{bmatrix} \begin{bmatrix} A_x \\ A_y \end{bmatrix}</math>
| |
| − | | |
| − | Working this out:
| |
| − | ::<math>\begin{bmatrix} A_r \\ A_\theta \end{bmatrix} = \begin{bmatrix} \cos \theta & \sin \theta \\ \\ \displaystyle\frac{- \sin \theta}{r} & \displaystyle\frac{\cos \theta}{r} \end{bmatrix} \begin{bmatrix} A_x \\ A_y \end{bmatrix}</math>
| |
| | And, going the other way: | | And, going the other way: |
| − | ::<math>\begin{bmatrix} A_x \\ A_y \end{bmatrix} = \begin{bmatrix} \cos \theta & - r \sin \theta \\ \sin \theta & r \cos \theta \end{bmatrix} \begin{bmatrix} A_r \\ A_\theta \end{bmatrix}</math> | + | ::<math>\begin{bmatrix} A_x \\ A_y \end{bmatrix} = [J] \begin{bmatrix} A_r \\ A_\theta \end{bmatrix} = \begin{bmatrix} \cos \theta & - r \sin \theta \\ \sin \theta & r \cos \theta \end{bmatrix} \begin{bmatrix} A_r \\ A_\theta \end{bmatrix}</math> |
| | | | |
| | Let's look at some vectors whose components are given in general coordinates—there are some important and striking aspects of this. | | Let's look at some vectors whose components are given in general coordinates—there are some important and striking aspects of this. |
| Line 270: |
Line 279: |
| | Its Cartesian components are: | | Its Cartesian components are: |
| | ::<math>(A_x=- r \sin \theta, A_y=r \cos \theta)\,</math> | | ::<math>(A_x=- r \sin \theta, A_y=r \cos \theta)\,</math> |
| − | It always points "laterally", at right angles to the radial direction. More surprisingly, its length is <math>\sqrt{A_x^2 + A_y^2} = r\,</math>. The angular basis vector is ''not'' a unit vector! It is bigger when farther away from the origin, even though the sum of the squares of its components is 1.<ref>Some textbooks use a definition of vector components such that basis vectors always have length 1. Such a treatment imposes the requirement that the coordinate lines be perpendicular everywhere. The formulas for vector operations are more complicated and less elegant when this is done.</ref> | + | It always points "laterally", at right angles to the radial direction. More surprisingly, its length is <math>\sqrt{A_x^2 + A_y^2} = r\,</math>. The angular basis vector is ''not'' a unit vector! It is bigger when farther away from the origin, even though the sum of the squares of its components is 1.<ref>Some textbooks use a definition of vector components such that basis vectors always have length 1. Such a treatment imposes the requirement that the coordinate lines be perpendicular everywhere. The formulas for vector operations are more complicated and less elegant when this is done.</ref> In general curvilinear coordinates, the "square root of the sum of the squares of the components" rule is not correct for the length of a vector. The correct rule will be given [[some link to the norm|below]]. |
| | + | |
| | + | ===The Dot Product in Arbitrary Coordinates=== |
| | | | |
| | We need a better formula for the dot product than the rule that works for Cartesian coordinates: | | We need a better formula for the dot product than the rule that works for Cartesian coordinates: |
| | ::<math>\vec{A} \cdot \vec{B} = A_x B_x + A_y B_y + A_z B_z\,</math> | | ::<math>\vec{A} \cdot \vec{B} = A_x B_x + A_y B_y + A_z B_z\,</math> |
| − |
| |
| − | ===The Dot Product in Arbitrary Coordinates===
| |
| | | | |
| | Given two vectors <math>\vec{A}</math> and <math>\vec{B}</math>, described in a u/v/w coordinate system, we can find their dot product by converting to Cartesian coordinates and using the simple rule that we know, which is the sum of the pairwise products of the vector components. This means that, at least momentarily, we will have to keep track of the vectors' components in both the Cartesian system, which we have been calling <math>A_x</math>, <math>A_y</math>, and <math>A_z</math>, and in the new coodinate system, which we have been calling <math>A_u</math>, <math>A_v</math>, and <math>A_w</math>. To do the required matrix manipulations, we have to give the components numbers instead of names. Things like <math>A_{u_1}</math>, <math>A_{u_2}</math>, and <math>A_{u_3}</math> are just too unwieldy.<ref>This is a well known notational problem in multivariable calculus. It is one of the reasons why tensor algebra textbooks are so hard to read.</ref> So we will make this simplification: | | Given two vectors <math>\vec{A}</math> and <math>\vec{B}</math>, described in a u/v/w coordinate system, we can find their dot product by converting to Cartesian coordinates and using the simple rule that we know, which is the sum of the pairwise products of the vector components. This means that, at least momentarily, we will have to keep track of the vectors' components in both the Cartesian system, which we have been calling <math>A_x</math>, <math>A_y</math>, and <math>A_z</math>, and in the new coodinate system, which we have been calling <math>A_u</math>, <math>A_v</math>, and <math>A_w</math>. To do the required matrix manipulations, we have to give the components numbers instead of names. Things like <math>A_{u_1}</math>, <math>A_{u_2}</math>, and <math>A_{u_3}</math> are just too unwieldy.<ref>This is a well known notational problem in multivariable calculus. It is one of the reasons why tensor algebra textbooks are so hard to read.</ref> So we will make this simplification: |
| Line 282: |
Line 291: |
| | | | |
| | Once we reformulate the rules for vectors in terms of the coordinate system of interest, we will only use <math>A_1</math>, <math>A_2</math>, and <math>A_3</math> (or <math>A_u</math>, <math>A_v</math>, and <math>A_w</math>), and we will never have to look at another tilde again. | | Once we reformulate the rules for vectors in terms of the coordinate system of interest, we will only use <math>A_1</math>, <math>A_2</math>, and <math>A_3</math> (or <math>A_u</math>, <math>A_v</math>, and <math>A_w</math>), and we will never have to look at another tilde again. |
| − |
| |
| − | We make another simplification to avoid having our notation get completely out of control. In keeping with our goal of expressing everything just in terms of the new coordinate system:
| |
| − | *The matrix that we have been calling [J(x, y, z / u, v, w)] we will call just [J].
| |
| − | *The matrix that goes the other way, formerly called [J(u, v, w / x, y, z)] we will call <math>[J]^{-1}</math>. It's just the inverse of the first matrix.
| |
| − | We will call [J] the "Jacobian of the coordinate system".
| |
| − |
| |
| − | ::The astute reader will notice that this is not a good definition. [J] depends on the choice of the "reference" Cartesian system, so we're not justified in calling it just "the Jacobian". But it turns out that it won't make any difference. We will always get the same answers, no matter what reference system we used. See the exercises.
| |
| | | | |
| | We can now calculate the dot product of <math>\vec{A}</math> and <math>\vec{B}</math>, from their components and the Jacobian. We know that | | We can now calculate the dot product of <math>\vec{A}</math> and <math>\vec{B}</math>, from their components and the Jacobian. We know that |
| Line 309: |
Line 311: |
| | ::<math>\vec{A} \cdot \vec{B} = \sum_{jk} [g]_{jk} A_j B_k</math> | | ::<math>\vec{A} \cdot \vec{B} = \sum_{jk} [g]_{jk} A_j B_k</math> |
| | This is the rule for the dot product in general coordinates. The matrix [g] is called the ''metric tensor'' or just the ''metric''. We will have occasion to use its determinant, which we will call just g. Actually, its square root is more commonly used. | | This is the rule for the dot product in general coordinates. The matrix [g] is called the ''metric tensor'' or just the ''metric''. We will have occasion to use its determinant, which we will call just g. Actually, its square root is more commonly used. |
| | + | |
| | + | For those who really like equations that express things in terms of matrix multiplication, this could be written as: |
| | + | ::<math>\vec{A} \cdot \vec{B} = \begin{bmatrix} A_1 ... A_N \end{bmatrix} [g] \begin{bmatrix} B_1 \\ ... \\ B_N \end{bmatrix}</math> |
| | + | The first vector is written in the form of a row instead of the more traditional column. This gives a 1xN matrix times am NxN matrix times an Nx1 matrix, which is a 1x1 matrix. The single value in that matrix is the dot product. |
| | | | |
| | To review what we have for two popular systems, in 2-dimensional polar coordinates: | | To review what we have for two popular systems, in 2-dimensional polar coordinates: |
| Line 324: |
Line 330: |
| | ::<math>[J] = \begin{bmatrix} \sin \theta \cos \phi & r \cos \theta \cos \phi & - r \sin \theta \sin \phi \\ \sin \theta \sin \phi & r \cos \theta \sin \phi & r \sin \theta \cos \phi \\ \cos \theta & - r \sin \theta & 0 \end{bmatrix}</math> | | ::<math>[J] = \begin{bmatrix} \sin \theta \cos \phi & r \cos \theta \cos \phi & - r \sin \theta \sin \phi \\ \sin \theta \sin \phi & r \cos \theta \sin \phi & r \sin \theta \cos \phi \\ \cos \theta & - r \sin \theta & 0 \end{bmatrix}</math> |
| | | | |
| − | ::<math>[J]^{-1} = \begin{bmatrix} \sin \theta \cos \phi & \sin \theta \sin \phi & cos \theta \\ \\ \displaystyle\frac{\sin \theta \cos \phi}{r} & \displaystyle\frac{\cos \theta \sin \phi}{r} & - \displaystyle\frac{\sin \theta}{r} \\ \\ - \displaystyle\frac{\sin \phi}{r \sin \theta} & \displaystyle\frac{\cos \phi}{r \sin \theta} & 0 \end{bmatrix}</math> | + | ::<math>[J]^{-1} = \begin{bmatrix} \sin \theta \cos \phi & \sin \theta \sin \phi & \cos \theta \\ \\ \displaystyle\frac{\cos \theta \cos \phi}{r} & \displaystyle\frac{\cos \theta \sin \phi}{r} & - \displaystyle\frac{\sin \theta}{r} \\ \\ - \displaystyle\frac{\sin \phi}{r \sin \theta} & \displaystyle\frac{\cos \phi}{r \sin \theta} & 0 \end{bmatrix}</math> |
| | | | |
| | ::<math>[g] = \begin{bmatrix} 1 & 0 & 0 \\ 0 & r^2 & 0 \\ 0 & 0 & r^2 \sin^2 \theta \end{bmatrix}</math> | | ::<math>[g] = \begin{bmatrix} 1 & 0 & 0 \\ 0 & r^2 & 0 \\ 0 & 0 & r^2 \sin^2 \theta \end{bmatrix}</math> |
| Line 334: |
Line 340: |
| | or, going back to giving the coordinates names: | | or, going back to giving the coordinates names: |
| | ::<math>\vec{A} \cdot \vec{B} = A_r B_r + r^2 A_\theta B_\theta</math> | | ::<math>\vec{A} \cdot \vec{B} = A_r B_r + r^2 A_\theta B_\theta</math> |
| | + | |
| | + | In spherical coordinates: |
| | + | ::<math>\vec{A} \cdot \vec{B} = A_r B_r + r^2 A_\theta B_\theta + r^2 \sin^2 \theta A_\phi B_\phi</math> |
| | | | |
| | The metric is always a symmetric matrix. (Exercise: Prove this. Use the definition in terms of <math>[J]</math> and <math>[J]^{-1}</math>.) For all coordinate systems that have the coordinate lines crossing at right angles everywhere (which includes all the common systems), the metric is a ''diagonal matrix''—the only nonzero items are on the main diagonal. | | The metric is always a symmetric matrix. (Exercise: Prove this. Use the definition in terms of <math>[J]</math> and <math>[J]^{-1}</math>.) For all coordinate systems that have the coordinate lines crossing at right angles everywhere (which includes all the common systems), the metric is a ''diagonal matrix''—the only nonzero items are on the main diagonal. |
| | + | |
| | + | ===The Length of a Vector in Arbitrary Coordinates=== |
| | + | |
| | + | The length of a vector (sometimes called the "norm") is the square root of the dot product of the matrix with itself. Note that this is defined in terms of something that we have defined in a purely geometrical way, independent of any coordinate system. Note also that it is consisten with our earlier definition of the dot product of two vectors as the product of their lengths, times the cosine of the angle between them. |
| | + | |
| | + | The length of a vector is usually written with a sort of double absolute value sign. |
| | + | |
| | + | In polar coordinates, we have: |
| | + | ::<math>\Vert\vec{A}\Vert = \sqrt{A_r^2 + r^2 A_\theta^2}</math> |
| | + | In spherical coordinate: |
| | + | ::<math>\Vert\vec{A}\Vert = \sqrt{A_r^2 + r^2 A_\theta^2 + r^2 \sin^2 \theta A_\phi^2}</math> |
| | | | |
| | ===The Cross Product in Arbitrary Coordinates=== | | ===The Cross Product in Arbitrary Coordinates=== |
| Line 344: |
Line 364: |
| | ::<math>\vec{A} \times \vec{B} = \sqrt{g}\ [g]^{-1}\ \vec{P} = \sqrt{g}\ [g]^{-1}\ \begin{vmatrix}\hat{u}&\hat{v}&\hat{w}\\ A_u & A_v & A_v \\ B_u & B_v & B_w \end{vmatrix}</math> | | ::<math>\vec{A} \times \vec{B} = \sqrt{g}\ [g]^{-1}\ \vec{P} = \sqrt{g}\ [g]^{-1}\ \begin{vmatrix}\hat{u}&\hat{v}&\hat{w}\\ A_u & A_v & A_v \\ B_u & B_v & B_w \end{vmatrix}</math> |
| | | | |
| | + | In the case that [g] is a diagonal matrix, this can be simplified. [g] is a diagonal matrix for any "orthogonal" coordinate system, that is, one in which the coordinate lines always cross at right angles. This is true for all common coordinate systems, including polar, spherical, and cylindrical, so we will frequently make use of this simplification. |
| | + | |
| | + | If <math>[g]</math> is diagonal, the only nonzero elements are <math>g_{11}</math>, <math>g_{22}</math>, and <math>g_{33}</math>. The only nonzero elements of <math>[g]^{-1}</math> are <math>\frac{1}{g_{11}}</math>, <math>\frac{1}{g_{22}}</math>, and <math>\frac{1}{g_{33}} </math>. In this case, the cross product formula is: |
| | + | ::<math>\vec{A} \times \vec{B} = \sqrt{g_{11}g_{22}g_{33}}\ \begin{vmatrix}\frac{1}{g_{11}}\hat{u}&\frac{1}{g_{22}}\hat{v}&\frac{1}{g_{33}}\hat{w}\\ A_u & A_v & A_v \\ B_u & B_v & B_w \end{vmatrix} = \begin{vmatrix}\sqrt{\frac{g_{22}g_{33}}{g_{11}}}\hat{u}&\sqrt{\frac{g_{11}g_{33}}{g_{22}}}\hat{v}&\sqrt{\frac{g_{11}g_{22}}{g_{33}}}\hat{w}\\ A_u & A_v & A_v \\ B_u & B_v & B_w \end{vmatrix}</math> |
| | + | |
| | + | In spherical coordinates, this becomes: |
| | + | ::<math>\vec{A} \times \vec{B} = \begin{vmatrix}r^2 \sin \theta \hat{r}&\sin \theta \hat{\theta}&\frac{\hat{\phi}}{\sin^2 \theta}\\ A_u & A_v & A_w \\ B_u & B_v & B_w \end{vmatrix}</math> |
| | + | |
| | + | Example: Suppose <math>\vec{A}</math> is a radial basis vector: |
| | + | ::<math>\vec{A} = \hat{r} = \begin{vmatrix}1 \\ 0 \\ 0 \end{vmatrix}</math> |
| | + | (The length of <math>\vec{A}</math> is 1.) |
| | + | Let <math>\vec{B}</math> be a <math>\theta</math>-pointing basis vector: |
| | + | ::<math>\vec{B} = \hat{\theta} = \begin{vmatrix} 0 \\ 1 \\ 0 \end{vmatrix}</math> |
| | + | (The length of <math>\vec{B}</math> is r.) |
| | + | <math>\vec{B}</math> is a vector at the surface of a sphere of radius r that points "south", tangential to the surface. <math>\vec{A}</math> points outward from the surface, that is "up". <math>\vec{A}</math> and <math>\vec{B}</math> are orthogonal. (Prove it; caclulate <math>\vec{A} \cdot \vec{B}</math>.) |
| | + | |
| | + | By the formula for the cross product, we have: |
| | + | ::<math>\vec{A} \times \vec{B} = \begin{vmatrix}r^2 \sin \theta \hat{r}&\sin \theta \hat{\theta}&\frac{\hat{\phi}}{\sin^2 \theta}\\ 1 & 0 & 0 \\ 0 & 1 & 0 \end{vmatrix} = \frac{1}{\sin \theta}\ \hat{\phi} = \begin{vmatrix} 0 \\ 0 \\ \frac{1}{\sin \theta} \end{vmatrix}</math> |
| | + | |
| | + | This points "east" at the surface of the sphere of radius r, is perpendicular to the other two vectors, and has length r, which is the product of the lengths of the other two vectors. The geometrical properties of the cross product (perpendicular to each of the given vectors, and of length equal to the product of their lengths times the sine of the angle between them) are obeyed. The cross product, like all other vector operations, is a ''geometric invariant''. It doesn't matter what coordinate system was used to calculate the components—the answer is the same. |
| | + | |
| | + | ===The Divergence in Arbitrary Coordinates=== |
| | + | |
| | + | Here's the definition of the divergence operator in arbitrary curvilinear coordinates: |
| | + | |
| | + | ::<math>\nabla \cdot \vec{A} = \frac{1}{\sqrt{g}} \sum_i \frac{\partial}{\partial x_i}\ (\sqrt{g}\ A_i) = \sum_i \frac{\partial A_i}{\partial x_i} + \frac{1}{\sqrt{g}}\ \sum_i \frac{\partial \sqrt{g}}{\partial x_i}\ A_i</math> |
| | + | In practice, it's not as forbidding as it looks, for vector fields that are well suited to the particular coordinate system. |
| | + | |
| | + | ::::***** Need to put in some examples, etc. I have them worked out, but typing them in is tedious. |
| | + | |
| | + | ===The Curl in Arbitrary Coordinates=== |
| | + | |
| | + | Here's the definition of the curl operator in arbitrary curvilinear coordinates: |
| | + | |
| | + | First, to find the curl of a vector field <math>\vec{A}</math>, let the matrix <math>[g]</math> operate on <math>\vec{A}</math>, yielding <math>\vec{B}</math>: |
| | + | ::<math>\vec{B} = [g] \vec{A}</math> |
| | + | ::Special case: If the coordinate system is orthogonal, so that <math>[g]</math> is diagonal, this is very easy: |
| | + | ::::<math>B_u = g_{11} A_u\ \ \ B_v = g_{22} A_v\ \ \ B_w = g_{33} A_w</math> |
| | + | Then the curl is: |
| | + | ::<math>\nabla \times \vec{A} = \frac{1}{\sqrt{g}} \begin{vmatrix} \hat{u} & \hat{v} & \hat{w} \\ \frac{\partial}{\partial u} & \frac{\partial}{\partial v} & \frac{\partial}{\partial v} \\ B_u & B_v & B_w \end{vmatrix}</math> |
| | + | ::Or, if the coordinate system is orthogonal: |
| | + | ::::<math>\nabla \times \vec{A} = \frac{1}{\sqrt{g}} \begin{vmatrix} \hat{u} & \hat{v} & \hat{w} \\ \frac{\partial}{\partial u} & \frac{\partial}{\partial v} & \frac{\partial}{\partial v} \\ g_{11}A_u & g_{22}A_v & g_{33}A_w \end{vmatrix}</math> |
| | + | |
| | + | ::::***** Need to put in some examples, etc. I have them worked out, but typing them in is tedious. |
| | | | |
| | | | |