You are on page 1of 13

C2-3 Basics of vector analysis*1

2.5 Transformation matrix between two orthogonal systems of coordinates


2.5.1 Rotation matrix
2.6 Gradient, divergence, curl, and Laplace operators in curvilinear
orthogonal system of coordinates.
2.6.1 In-plane polar coordinates
2.6.2 Spherical coordinates
2.6.3 Cylindrical coordinates

1*
Labels of the subjects and equation are continued from the 1st course C1_Basics of vectors
2

2.5 Transformation matrix between two orthogonal systems of


coordinates
 Relation between the unit vectors of two orthogonal systems of coordinates (relation
between two three-dimensional Euclidean orthonormal bases) can be written as the linear
combination
 e1   q11 q21 q31  e1   e1 
      
 e2    q12 q22 q32  e 2   [Q]  e 2 
T
(2.5.1)
 e   q     
 3   13 q23 q33  e 3   e3 
or synthetically
ei  qmi em (2.5.2)
From the orthonormality condition ei  ej   ij one obtains
 ij  ei  ej  qmiem  qnjen  qmi qnjem  en  qmi qnj mn  qmi qmj . (2.5.3a)
or by matrix notation
[Q]T [Q]  [I] , (2.5.4)
where [I] is the 3-dimensional unit matrix. A matrix [Q] which respects eq. (2.5.4) is called
orthogonal. As it is a transformation matrix it is non-singular (see Appendix 3, P1, where the
general case of non-orthogonal bases is considered), that is invertible; we denote the inverse
of [Q] by [Q]-1 .Then, from eq. (2.5.4) and noticing that [Q]1[Q]  [I ] one obtains that the
inverse of [Q] is equal to its transpose, that is
[Q]T  [Q]1 .
Also as [Q][Q]1  [I ] one has
[Q][Q]T  [I ]
Multiplying eq. (2.5.1) by [Q] at left one obtains
e m  qmiei . (2.5.5)
From the orthonormality condition e m  e n   mn one obtains
 mn  e m  e n  qmiei  qnj ej  qmi qnj ei  ej  qmi qnj ei  ej  qmi qnj ij  qmi qni . (2.5.3b)
or by matrix notation, as a check of the calculus
[Q][Q]T  [I ]

 From eq. (2.5.1) or (2.5.2) one obtains that the elements of [Q] are the direction
cosines
qmi  e m  ei . (2.5.6)

 Let the vector u be expressed in the two orthogonal systems of coordinates with a
common origin by the relation,
u  um e m  uiei . (2.5.7)
The scalar product of eq. (2.5.7) with e j yields
um e m  ej  um qmj  uiei  ej  ui ij  uj , (2.5.8)

qmj

that is
ui  qmi um . (2.5.9)
Similarly, one obtains
3

um  qmi ui . (2.5.10)


In matrix notation, eq. (2.5.9) has the form
 u1   q11 q21 q31  u1 
    
 u2    q12 q22 q32  u2  . (2.5.11)
 u   q  
 3   13 q23 q33  u3 
or
u  [Q]T u (2.5.12)

The scalar product of two vectors is invariant under the change of basis. This emerges as a
direct result from the definition of scalar product of two vectors.

As an exercise by using (2.5.9) and (2.5.3a) or (2.5.3b) prove that


a  b  aibi  a'i b'i

2.5.1 Rotation matrix


Rotation R̂ is an operator (transformation) by which the obtained by rotation vector must
keep its original length. Such a condition is also fulfilled by the transformation matrix [Q] in
eq. (2.5.1) (the unit vectors keep their length by the transformation). By writing the rotated
vector as
 u1   u1 
   
 u2   [R ]  u2  , (2.5.1.1)
 u  u 
 3  3
and comparing by eq. (2.5.11) we observe that, similarly to [Q], the matrix [R] is orthogonal.
In addition, useful in the characterization of rotation is the value of its determinant. Thus,
according to the properties of orthogonal matrices
det([I]) = det([R] [R]T]) = det([R])det([R]T]) = 1, (2.5.1.2)
where [R] are real matrices, and we obtain that
det([R]) = ±1. (2.5.1.3)
Thus, the matrix [R] is classified as proper and it corresponds to pure rotation if
det([R]) = 1, (2.5.1.4)
or improper and it corresponds to improper rotation,
det([R]) = - 2. (2.5.1.5)
One example of improper rotation is the inversion, which sends r to -r.

2.6 Curvilinear orthogonal systems of coordinates


The geometric symmetry of the shape of an object or motion can be used to simplify
the algebra by introducing particular system of coordinates. Next, we introduce the
generalized coordinates, and discuss the derivative operators in such systems. In next
sections, we apply the general theory to polar, spherical and cylindrical coordinates. We
denote by  u1 , u2 , u3  the set of generalized coordinates corresponding to the position vector
of a point in a three dimensional Euclidean space
r  r  u1 , u2 , u3  (2.6.1)
and by
4

e 1 ,e 2 ,e 3 (2.6.2)
the orthonormal set of unit vectors associated to it. The curvilinear coordinates are obtained as
directions of displacement of a point by keeping two of its coordinates constant and varying
the remained, see Fig. 5.

z e3

e2

i3 r e1

i1 i2 y

Fig. 5 Curvilinear orthogonal coordinates.

The infinitesimal variation of position vector of the point is expressed by


dr  g1du1  g 2 du2  g 3du3
, (2.6.3)
 h1e1du1  h2e 2 du2  h3e 3du3  hi ei dui
where hi are scaling functions (they give dimension of length, for example, when being
multiplied by dui) also referred to as Lamé coefficients. On another hand
r xk i k  x
dr  dul  dul  k i k dul . (2.6.4)
ul ul ul
By comparing eqs. (2.6.3) and the second equality of eq. (2.6.4) one obtains
1 r
ei  . (2.6.5)
hi ui
We remind the reader that there is no summation over the repeated underlined indices. By
comparing the magnitude of the factors of the infinitesimal quantities dui from eqs. (2.6.3)
and the last equality (2.6.4), we obtain
2
 x 
hi   k  . (2.6.6)
 u 
 i 
2
x j x x x x x x x  x 
Indeed, h i e i  h i e i  i j  k i k => hi2  j k i j  i k  j k  jk  j j   j  .
ui ui ui ui ui ui ui ui  ui 
Exercise 2.6.1
r 1 x j
Starting with h i e i  , prove that q ji  and show the equivalence with eq.
ui hi ui
(2.6.6).
5

Gradient of a scalar field


To obtain the expression of gradient of a scalar field f u1 , u2 , u3  in generalized
coordinates, we can use eqs. (2.6.3) , (2.1.1, 2) and write
df  (hiei dui  e j  j ) f  hi dui ij  j f  hii fdui . (2.6.7)
 
dr 
By comparing eq. (2.6.7) with
f
df  dui , (2.6.8)
ui
we obtain that in generalized coordinates the expression of Del operator is
1  e 
i  or the gradient   i . (2.6.9)
hi ui hi ui
Eq. (2.6.9) is valid for a generally n-dimensional space. Easily from eq. (2.6.9), we obtain
e u e e
ui  j i  j  ij  i (2.6.10)
h j u j h j hi

Exercise 2.6.2
It is instructive to present another method for obtaining the expression of Del operator
as follows [1]. The gradient of scalar function is written by using chain rule,
f f u f f
f  ik  ik l  i k  k ul  ul ,
xk ul xk ul ul
Find the Lamé's coefficients by this way and compare expressions with those obtained
from eq. (2.6.6). Prove the equivalence.

Divergence of a vector field


To obtain the expression of divergence of a vector field f u1 , u2 , u3  in generalized
coordinates, we can use eqs. (2.2.1) to write
  f    e j f j  . (2.6.11)
A direct calculation is a good way to obtain the result. Thus
  e1 f1     e 2  e 3  f1 
   h2 h3 u2  u3  f1     h2 h3 f1 u2  u3  (2.6.12)
  h2 h3 f1   u2  u3   h2 h3 f1  u2  u3  ,
where we used eq. (2.6.10) and iv) from Exercise 2.4.1 in the 3rd and the 5th equalities,
respectively. According to vi) and i) from Exercise 2.4.1, in the last equality from eq.
(2.6.12), the last term vanishes. Then, by using eq. (2.6.10), we can write
  e1 f1   h2 h3 f1   u2  u3 
e e  e (2.6.13)
 h2 h3 f1    2  3    f1h2 h3   1
 h2 h3  h2 h3
.
Then, eq. (2.6.13) is transformed with eq. (2.6.9) as follows:
e e   f1h2 h3  e1
  f1h2 h3   1  i 
h2 h3 hi ui h2 h3
. (2.6.14)
1   f1h2 h3   i1 1   f1h2 h3 
 
hi ui h2 h3 h1h2 h3 u1
6

Similarly are calculated the other two terms of eq. (2.6.11), and consequently, we can write
1   h2 h3 f1   h1h3 f 2   h1h2 f 3 
f    . (2.6.15)
h1h2 h3  u1 u2 u3 

Curl of a vector field


To obtain the expression of curl of a vector field f u1 , u2 , u3  in generalized
coordinates, we can use eq. (2.3.1) and write
  f  curl f :   e j f j . (2.6.16)
Again by a direct calculation, we have
  e1 f1     h1 f1u1    h1 f1   u1  h1 f1  u1 , (2.6.17)
where we used v) from Exercise 2.4.1. By using i) from Exercise 2.4.1, we cancel the last
term in (2.6.17) and have
e
  e1 f1   h1 f1   u1  h1 f1   1 . (2.6.18)
h1
With eq. (2.6.9), we have
e  h1 f1 
h1 f1   i , (2.6.19)
hi ui
and we can write
e  h1 f1  e1 e  h1 f1  e 3  h1 f1 
  e1 f1   i   2  . (2.6.20)
hi ui h1 h1h3 u3 h1h2 u2
Similarly, we can calculate the other two terms of eq. (2.6.16). Then by collecting the terms
we can write, for example, the component on e 3 as
1  h2 f 2 h1 f1  1  h2 f 2 h f 
  f 3       h3  h3 1 1  (2.6.21)
h1h2  u1 u2  h1h2 h3  u1 u2 
This can formally be written as a determinant form as follows
h1e1 h2e 2 h3e 3
1   
f  . (2.6.22)
h1h2 h3 u1 u2 u3
h1 f1 h2 f 2 h3 f 3

Laplace operator
According to definition (2.4.1) and eq. (2.6.17) the Laplace operator can be written as
1  h2 h3 f 1  h1h3 f 2  h1h2 f 3 
  f     
h1h2 h3  u1 u2 u3 
(2.6.23)
1    h2 h3 f    h1h3 f    h1h2 f  
        .
h1h2 h3  u1  h1 u1  u2  h2 u2  u3  h3 u3  
7

Next, we briefly discuss the physical significance of the derivative operators we


introduced.
i) The directional derivative  s f (r0 ) is the rate at which the function f (r )
changes at a point r0 in the direction s. With this useful concept one can show that:

P1 The gradient of a scalar field at a point r0 is the vector that has direction of the fastest
increase of the field and magnitude equal to the derivative of the field at r0 (see Appendix 2).

P2 The gradient of a scalar field at the position vector r0 is the vector perpendicular on
f (r0 )
the surface f (r )  constant, f (r0 )  n , where n is the normal vector to the surface
n
f (r0 )
f (r )  constant , oriented in the direction of increasing value of the constant, and is
n
the derivative in direction n (see Appendix 2).
For a more intuitive picture, the function f ( x, y )  cos 3 x  cos 3 y and its gradient is
shown in Fig. 6a, b. In the horizontal plane (x, y) the arrows show the direction and magnitude
of the gradient. In Fig. 6c, f (r )  x 2  y 2  z 2  constant and its gradient is represented.
Arrows point in direction of the gradient and their length is proportional to the magnitude of
the gradient in the figures.

a) b)

c)
Fig. 6 a) f ( x, y )  cos 3 x  cos 3 y and b) f ( x, y ) ; c) f (r )  x 2  y 2  z 2 and f (r ) .
8

Exercise 2.6.4
Consider the scalar field f(r)=1/r, where r=|r|. Calculate derivative of f(r) in point
A(-1,0,0) in direction AB where point B is of coordinates (1,2,1). Use definition (B.2)
from Appendix 2.

ii)   f can be found as representing the change in f per unit length in a region of
space. Then, if   f  0 there is no source or sink (ending point) for the vector field f, and if
  f  0 there is.
iii) 
Curl of the vector field f1 ( x, y , z )   y / x 2  y 2 , x / x 2  y 2 , 0 is zero 
on domain D, which is R3 excepting the z-axis. Then f1 (r ) is irrotational on D. On the other
hand, circulation of f1 (r ) on the unit circle with center in origin of the (x, y) -plane is equal to
2π (see Exercise 2.6.1.2). By decomposing circulation on the unit circle as circulation on the
paths ABC and CDA,
 f1  dl   f1  dl   f1  dl   f1  dl   f1  dl  2 ,
C ABC CDA ABC ADC

we see that circulation of f1 (r ) is path dependent, 


ABC
f1  dl  
ADC
f1  dl , consequently f1 (r )
is not a conservative field. Curl of the vector field
 2 2 2 2

f 2 ( x, y , z )  x / x  y , y / x  y , 0 is zero in R , consequently f 2 (r ) is irrotational 3

and conservative.
y y
3 3

2 2

1 1

0 x 0 x

1 1

2 2

3 3

3 2 1 0 1 2 3 3 2 1 0 1 2 3

a) b)
Fig. 7 The vector field in (x, y) plane for: a) f1 ( x, y , z )   y / x 2  y 2 , x / x 2  y 2 , 0  

which is not a conservative field; b) f 2 ( x, y , z )  x / x 2  y 2 , y / x 2  y 2 , 0 which is a 
conservative field.

2.6.1 In-plane polar coordinates


The in-plane polar coordinates r,  are defined by the transformation relations,
x  r cos  , y  r sin  , (2.6.1.1)
where r is the length of position vector of the point P and  is the anticlockwise angle
starting from x axis to the position vector, see Fig. 8. We can invert these relations to get
9

y
r  x 2  y 2 ,   arctan . (2.6.1.2)
x

y

e2=j er
r
P
ϴ
O e1=i x

Fig. 8 In-plane polar coordinates.

In Cartesian coordinates, r  xi  yj . From eq. (2.6.6) the Lamé's coefficients are hr  1 and
h  r , and we have
r r
 cos  i  sin  j ,   r sin  i  r cos j . (2.6.1.3)
r 
Then, from eq. (2.6.5), the corresponding unit vectors are
1 r 1 r
er   cos i  sin  j , e    sin  i  cos j , (2.6.1.4)
hr r h u
which are represented in Fig. 8. Eqs. (2.6.1.4) can also be easily obtained by geometrical
considerations. The relation with the Cartesian unit vectors is
 er   i   cos sin   i 
   [Q]T       (2.6.1.5)
 e   j   sin  cos  j
or
i   e   cos  sin   e r 
   [Q]  r      . (2.6.1.6)
 j  e   sin  cos  e 

Exercise 2.6.1.1
Find the matrix [Q] by using definition (1.5.6) of the matrix elements.

Then,
r  r cos cose r  sin e   r sin  sin e r  cose   re r (2.6.1.7)
     
i j

which is in conformity with the geometrical picture of in-plane polar coordinate definition
introduced at the beginning of this sub-section. In the in-plane polar coordinate the vector
field f(r)=(fx, fy) is transformed according to eq. (1.5.12) by,
 f r   cos sin   f x 
      .
f
    sin  cos   f y 

 With eq. (2.6.9) and Lamé's coefficients, Del operator is


 1 
  e r  e . (2.6.1.8)
r r 
10

Then, the gradient of a scalar field f is expressed as follows:


f 1 f
f  e r  e . (2.6.1.9)
r r 
The divergence of a vector field is calculated directly with definition (1.3.2.1) as follows,
  1  
  f  e i i  e j f j    e r  e   e r f r  e f 
 r r  
 1 
 e r  e r f r  e f   e  e r f r  e f  (2.6.1.10)
r r 
e f e 1 e 1 e 1 f
 e r  r f r  r  e r   f   e  r f r  e   f   .
r r r r  r  r 
From eqs. (2.6.1.4), we obtain
e r e e r e
  0,  e ,  e r , (2.6.1.11)
r r  
and the divergence is
f 1 f f r
f  r   . (2.6.1.12)
r r  r
Exercise 2.6.1.2
Prove that for the in-plane polar coordinates, we have:
 
1
  f  r  e r  e ;
r f rf
r

1 f  2 f 1  2 f
f    .
r r r 2 r 2  2

Exercise 2.6.1.3
Find the line fields of the vector field f (r )   y / x 2  y 2 , x / x 2  y 2  . Show that:
i) f (r ) transforms in the in-plane polar coordinates to f (r )  0, 1 / r  ;
ii) circulation on the unit circle in the (x, y)-plane of f (r ) is equal to 2π.

2.6.2 Spherical coordinates


The spherical coordinates r ,  ,  are defined by the transformation relations
x  r sin  cos  , y  r sin  sin  , z  r cos  , (2.6.2.1)
where r is the length of position vector, and  the polar angle and  the azimuthal angle are
measured as in Fig. 9. The curvilinear coordinates are obtained as directions of displacement
of a point by keeping two of its coordinates constant and varying the other. We can invert
eqs. (2.6.2.1) to get
z y
r  x 2  y 2  z 2 ,   arccos ,   arctan (2.6.2.2)
x y z
2 2 2 x
11

z er

θ
r eθ y

x φ

Fig. 9 Spherical coordinates (r, θ, φ).

The space is covered by r ∈ [0, ∞), θ ∈ [0, π], φ ∈ [0, 2π). In Cartesian coordinates,
r  xi  yj  zk . From eq. (2.6.6) the Lamé's coefficients are hr  1 and h  r , h  r sin 
and
r r
 sin  cos i  sin  sin  j  cos  k ,  r (cos cos i  cos sin  j  sin  k ) ,
r 
r
 r sin  (  sin  i  cos j) . (2.6.2.3)

Then, from eq. (2.6.5), the corresponding unit vectors are
1 r
er   sin  cos i  sin  sin  j  cos k ,
hr r
1 r
e   cos cos i  cos sin  j  sin  k ,
h u
1 r
e    sin  i  cos j . (2.6.2.4)
h u
Eqs. (2.6.2.4) can also be easily obtained from geometrical considerations by projecting the
spherical unit vectors in the Cartesian coordinates. The transformation matrix [Q]T (see eq.
(1.5.1)) is obtained from eq. (2.6.2.4):
 e r   sin  cos sin  sin  cos  i  i
      
 e    cos cos cos sin   sin   j   Q  j  .
T

 e    sin  cos 0  k  k


    

Exercise 2.6.2.1
Find the matrix [Q] by using definition (1.5.6) of the matrix elements.

 Transformation from Cartesian to spherical coordinates of a vector or a tensor is


obtained by using eqs. (1.5.12) and (1.5.16), respectively. With eq. (2.6.9) and Lamé's
coefficients, Del operator is
 1  1 
  e r  e  e . (2.6.2.5)
r r  r sin  
Then, the gradient of a scalar field f is expressed as follows
12

f 1 f 1 f
f  e r  e  e . (2.6.2.6)
r r  r sin  
The divergence of a vector field f is calculated with eq. (2.6.15)
f 1 f 1 f 2 f r f
f  r     cot (2.6.2.7)
r r  r sin   2 r
The curl of a vector field is calculated with eq. (2.6.22)
e r re r sin e
1   
f  2 . (2.6.2.8)
r sin  r  
f r rf r sin f
The Laplacian of a scalar field f is calculated with eq. (2.6.23)

1   2 f  1   f  1 2 f
f   r    sin    (2.6.2.9)
r 2 r  r  r 2 sin      r 2 sin 2   2

Eqs. (2.6.2.7, 8, 9) can also be obtained directly starting from definition (1.3.2.1). The partial
derivatives of the unit vectors can be calculated with eqs. (2.6.11, 12) or from eqs. (2.6.2.4)
by considering the Cartesian unit vectors constant.

2.6.3 Cylindrical coordinates


The cylindrical coordinates r ,  , z are defined by the transformation relations
x  r cos  , y  r sin  , z  z , (2.6.3.1)
where r is the length of position vector,  the azimuthal angle are measured as in Fig. 10. We
can invert eqs. (2.6.3.1) to get
y
r  x 2  z 2 ,   arctan , z  z . (2.6.3.2)
x

ez

er

y
r
x θ

Fig. 10 Cylindrical coordinate system. (r, θ, z).


13

The space is covered by r ∈ [0, ∞), θ ∈ [0, π], z ∈ [-∞, ∞), In Cartesian coordinates,
r  xi  yj  zk . From eq. (2.6.6) Lamé's coefficients are hr  1 and h  r , hz  1 and
r r r
 cos i  sin  j ,  r (  sin  i  cos j) ,  k  ez . (2.6.3.3)
r  z
Then, from eq. (2.6.5), the corresponding unit vectors are
1 r 1 r
er   cos i  sin  j , e   r (  sin  i  cos j) ,
hr r h u
1 r
ez  k. (2.6.3.4)
hz uz
Eqs. (2.6.3.4) can also be easily obtained from geometrical considerations by projecting the
cylindrical unit vectors in Cartesian coordinates. With eq. (2.6.9) and Lamé's coefficients, Del
operator is
 1  
  e r  e  ez . (2.6.3.5)
r r  z
Then, the gradient of a scalar field f is expressed as follows:
f 1 f f
f  e r  e  ez . (2.6.3.6)
r r  z
The divergence of a vector field f is calculated with eq. (2.6.15)
f 1 f f z f r
f  r    (2.6.3.7)
r r  z r
The curl of a vector field is calculated with eq. (2.6.22)
e r re e z
1   
f  . (2.6.3.8)
r r  z
f r rf f z
The Laplacian of a scalar field f is calculated with eq. (2.6.23)
 2 f 1 f 1  2 f  2 f
f  2    (2.6.3.9)
r r r r 2  2 z 2
Eqs. (2.6.3.7, 8, 9) can also be obtained directly starting from definition (1.3.2.1).

References
[1] H. Cohen, Mathematics for Scientists and engineers, Prentince-Hall, 1992.
[2] L.E. Malvern, Introduction to the Mechanics of a Continuous Medium, Prentice-Hall
1969.

Further reading
1. E. Soos, C. Teodosiu, Calcul tensorial cu aplicatii in mecanica solidelor, Ed. Stiintifica si
Enciclopedica, 1983.
2. K-.T. Tang, Mathematical Methods for Engineers and Scientists 2: Vector Analysis,
Ordinary Differential Equations and Laplace Transforms, Springer, 2007.
3. P.P. Teodorescu, Mechanical Systems, Classical Models Vol. I, Particle Mechanics,
Springer, 2007.
4. G. Strang, Linear Algebra and Its Applications, International Thomson Publishing, 4th
edition.
5. https:// www.math.ucdavis.edu/~saito/courses/21C.w11/polar-lap.pdf
6.https://web.williams.edu/Mathematics/sjmiller/public_html/BrownClasses/52/683L/LinAlg
ReviewAndSpectral.pdf

You might also like