allenlu2007

A great WordPress.com site

Month: March, 2017

微分幾何 IV – Tensor

by allenlu2007

Reference: Introduction to Tensor Calculus for General Relativity

 

MIT department of physics 的 note 非常好。

區分 vector and one-form.  

Vector 基本上 refer tangent space 的 vector space.  以及 manifold 上的 vector field.  非常直覺。

One-form 則是一個新東西。 基本上是一個 dual vector space, 或稱為 cotangent space. 

MathIsBeautiful 則是直接定義為 contra-variant vector space.  兩者是 isomorphic.  使用 one-form 可以更清楚分別。

 

Tensor 

NewImage 

* Tensor 是 coordinate-free.  但 Tensor component (當然) 和是 coordinate-dependent.

* 2 個 tensors 如果在一個座標系相等。在所有座標系都相等。也就是相等。

 

以下是 tensor:

– Scaler: rank (0, 0)

– Vector :  need 1 one-form input to produce scaler:   rank (1,0)

– One-form: need 1 vector input to produce scaler: rank (0, 1)

– Metric tensor: need 2 vectors : rank (0, 2)

– Inverse metric tensor: need 2 one-forms: rank (2, 0)

– 2 vector inner product A∙B 也可視為 rank (0, 2)

– 同理, 2 one-form inner product 也可為 rank (2, 0)

– metric tensor 可以用來 lower or raise indices

– One-form is isomorphism to contra variant basis!   表現方式和 one-form 一模一樣。

 

改變 tensor rank 方式有三

1. Tensor product of (m1, n1) and (m2, n2) 變為 (m1+m2, n1+n2).

2. Tensor contraction (m, n) 變為 (m-1, n-1)

3. 可以用 metric tensor 把 (m, n) 變成任意 (m-k, n+k) 的 tensor 

4. Derivative (or gradient, 可視為 one-form) (m, n) 變為 (m, n+1)

 

NewImage

如果用 contravariant vector:

NewImage

我們特引入 covariant derivative symbol.  在 scaler input 沒差。但在 vector input 則不同。

gradient (1, 0) , scaler (0, 0) input = one-form output (1, 0)

NewImage

NewImage

NewImage

gradient 可視為 one-form (0, 1).  和 scaler product (0, 0) combine 變成 (0, 1) 也是 one form.

如果 input vector (1, 0), output 則是 (1, 1) tensor. 

只時 partial derivative 和 gradient 不同!!

 

Covariant Derivative:  就是 Gradient of a vector

Gradient of one-forms and tensors (p, q) –> (p, q+1)

NewImage

NewImage

注意 gradient of metric, inverse metric and identity = 0.

NewImage

可以解出: 

NewImage

 

Divergence of a Vector Field and Tensor  (p, q) –> (p, q-1)

Divergence 是把一個 input one-form or contra variant vector (0, 1) 變成 scaler (0, 0).  因此 divergence 可視為 (0, -1)?  In general, rank (p, q) tensor 可以藉 divergence 變成 (p, q-1) tensor.

NewImage

(78) 可以改為全微分。

NewImage

NewImage 

 

Curl of a Vector Field and Tensor  (p, q) –> (??)

NewImage

Stoke Theorem 之後再加上。

 

Laplace-Beltrami Operator

NewImage

 

 

 

微分幾何 II – 座標系和微分

by allenlu2007

接續上文。除了移除 parameter dependency 之外。另一個更重要的觀念是 coordinate-free.  也就是不要用特定的 coordinate system (e.g. Cartesian or Polar coordinates).  而是所有的座標系 (not need orthogonal) 都有正確的結果。

 

先用微分為例說明 coordinate-free:

顧名思義,微分幾何最重要的 operation (除了一般的四則運算),就是微分,也就是研究 local 的 geometric 特性。更重要的是這些 geometric 特性是和座標系無關。特定的座標系只是方便計算而已。

 

微分幾何的微分分為三類:

 

1. 純量(場)微分:  

Ex1: gradient (梯度) or ∇

∇ f(r) where f is a scaler function of r (position vector, 座標系無關).  

假設 f 是溫度函數。∇f 是 vecotr, 方向是 steepest descent 的方向,大小則是變化率。不管任何座標系都應有同樣的 gradient vector.  (rank1 tensor).  當然最後用不同座標系的座標表示會不同 (x,y) or (r, θ), 但加上 local basis 組合的 vector 是一樣:  a ex + b ey = c er + d eθ.   (a, b) 和 (c, d) 之間差了一個 Jacobian. 

結論:  Scaler field (座標系無關 invariant) 微分 —> vector.  就是微分 rank0 tensor (1×1) —> rank1 tensor (nx1)

Ex2: Directional derivative (scaler):  就是 scaler function f(r) 在各方向上的導數。已知 steepest descent 的方向和大小就是 ∇f.

但在其他無限多方向的大小 (scaler) 是什麼?  Surprisingly, 就是 ∇f * n.  也就是 |∇f |*cos(α) where α 是和 gradient vector 的夾角。例如夾角 90度就是等高線,因此 directional derivative 是 0.  其實這就是 Taylor expansion, 1st order 近似值。

另一個重點是以上的定義不只在 Euclidean space (flat space) 適用。在 curved space 也適用!!   

Directional derivative 就是 f 在 tangent space 各方向 n 走 ds (arc length, 在 curved space 也有定義) 的 δf ratio.

變化最大的方向和大小就是梯度!!  在 curved space 如何定義?

NewImage

3D curved space 一共有 9 項。如果是 flat Euclidean space with Cartesian coordinate, gik = δik 可以簡化為 3 項。就是一般的 gradient 定義 (wrong? 要改為 contracovariant basis?).  

 

2. 向量 (with parameter) 微分 (on parameter):  

Ex1:  smooth curve, r(t), function of parameter t.   前文提到把 t 換為 s (arc length) 則變為 geometric 特性。

微分得到 tangent vector, 再微分得到 normal vector. 都和座標無關。Tangent vector, normal vector, and torsion vector 都是 rank1 tensor (nx1).

Ex2: basis such as ex, ey or er, eθs 都可視為 Ex1 的應用。格線可視為 smooth curve, r(x, y), etc.  因為此時是定為座標軸,當然和座標相關。

以上的定義不只在 Euclidean space (flat space) 適用。在 curved space 也適用!!    

 

 

3. 向量場微分:  開始有趣了。

Space (or field) 中每一點都有一個 vector, 稱為 vector space or vector field.  

在 flat Euclidean space 中向量的 “+” and “-“ 都很直觀。如下圖:

NewImage

只處暗含了一個向量 “平移” (parallel transport) 的觀念!!

因此我們在 Euclidean space 可以定義各種向量 “+”, “-“, 微分 (向量減法加上 scaling), etc.

 

但在 curved space or curved manifold 就不一樣!

如果是在 manifold 任一點 P, 因為可以用 tangent plane (or space) 來近似。Tangent plane/space 仍是 Euclidean space.  因此所有的 tangent space 的 vector operation 仍可正常進行 (如 “+”, “-“).

但如果是 P 點附近(或更遠)的 Q 點,因為兩者的 tangent space 不同。當要做 P 到 Q 的 vector “+”, “-“, 微分時,就會遇到一個 fundamental problem!! 就是如何把 Q 點的 vector “平移” 到 P 點的 vector.  這就是 parallel transport 的觀念延伸。

 

 

但在 curved space, 

 

 

 

實務上我們用 Cartesian coordinate 定義

∇f = ∂f/∂x ei + ∂f/∂y ej    ==>  這是錯誤的定義。因為如果把 Cartesian coordinate 的格線放大 2 倍。ei and ej 也會放大 2 倍。 ∂f/∂x and ∂f/∂y 也會放大 2 倍。因此 ∇f 在 Cartesian coordinate 的定義即使在 stretched Cartesian coordinate 也是錯的! 更不用提 polar or 其他的 coordinate system.   

注意即使加上 ei/|ei|^2 and ej/|ej|^2 normalised basis 也沒用。因為  ∂f/∂x and ∂f/∂y 還是變大 2 倍!!

解救方案:

Gradient of scaler field 

定義 covariant basis and contravariant basis.   

NewImageusing Einstein notation.

注意此時用 contra variant basis.  如果格線放大 2 倍。 Covariant basis 放大 2 偣。但 contra variant basis 縮小 2 倍。剛好和 derivative 放大 2 倍抵消!  

但如果換到 polar coordinate 則如何?  加上 Jacobian for Tensor 轉換方向。

 

Gradient of vector field or tensor??

 

Directional derivative!!

Gradient 只是一個 vector (at point p in Euclidean space).  但各方向的 derivative 有無限多個 (depending on direction vector n).

結果 amazing!    n direction 的 derivative = n *  ∇f

 

 

 

 

 

 

微分幾何 I – Curve

by allenlu2007

微分幾何的幾個 concepts.

 

Step 1:  從 curve 開始!

雖然常聽到 tangent plane (space), manifold, … 等 2D, 3D higher dimension objects.

不過基本功仍是 curve!   Euler 也是用不同方向 curves 找 2D surface/manifold 的 principal curvatures.

在 spacetime 中也可以用光線 picture spacetime curvature.  

 

Step 2:  curve 一般是用 Cartesian coordinate + time (as parameter),

例如 (x, y) = (t, t^2) 拋物線。

或是 (x, y) = (cos(t), sin(t)) 圓周運動。

 

有兩個幾何上的問題:  

(1) 用 t 作 parameter 雖然有物理意義,但是幾何上並不唯一。例如拋物線 y=x^2 可以是

(x, y) = (t, t^2) 或是 (2t, 4t^2) 曲線都一樣。只是速度不同。同樣圓周運動速度增加或減少,甚至非等速圓周運動。就幾何角度沒有差別。我們必須移除 parameter dependency!!!

 

(2) 從幾何上而言,座標系是後天人為加上的東西。微分幾何的大忌就是選用特定的座標系,特別是 Cartesian coordinate.  因為 Cartesian coordinate 的所有 local bases 都一樣!!  需要考慮所有的座標系都有一致的結果 (例如如何定義 gradient, Laplacian, etc.)

 

先說 Solutions:

(1) 移除 parameter dependency!!  統一使用 arc length s as parameter, 就不會有不同 parameter 問題。可視為normalised to 速率為 1 的等速率運動 alone the curve.  Moreover, arc length 是實際幾何可以測量的值。

 

(2) 移除特定 coordinate system dependency!!!  使用 tensor.

 

本文說明 (1)

Reference: YouTube MathTheBeautiful : Tensor Calculus lecture 2.

 

NewImage

以下是用拋物線為例:

NewImage

 

以下是用圓周運動為例 demo parameter independency

先用等速率圓周運動 (速率 1) 為例。

NewImage

再來是加速率圓周運動 (速率 2t) 和任意速率 f’(t) 為例。

只要換成 arc length parameter, 幾何結果都和等速圓周運動相同。

NewImage

 

Frenet Framework Using Local (Intrinsic) Bases/Coordinate

其實以 smooth curve 來說,可以完全不用 exterior bases/coordinate (e.g. Cartesian or Polar coordinate).  curve 本身就可以找出 local bases 如下。

NewImage

自然導入 Frenet framework!!!

NewImage

 

 

Geometry of Hamiltonian and Lagrangian Mechanics

by allenlu2007

Reference

Chapter 2: Geometry of Hamiltonian Mechanics (in Dropbox differential geometry)

Wiki : Hamiltonian mechanics

 

Tips: 可以推廣到 4D space-time coordinate!

 

Analytical Mechanics vs. Newton Mechanics 

我在學 analytical mechanics (i.e. Lagrangian mechanics or Hamiltonian mechanics) 一直有一個問題。

就是 generalized coordinates in Lagrangian or generalized postion, q, or generalized momentum, p, in Hamiltonian.  

引入 generalized coordinate 很自然。因為某一些 constraints (如單擺), 使用 polar coordinate 絕對比 Cartesian coordinate 更簡潔。

問題是為什麼 Lagrangian differential equation or Hamiltonian equation 可以只對 generalized coordinate (r, r_dot, θ, θ_dot) 做偏微分? 而非對 (x=rcosθ, y=rsinθ, x_dot, y_dot) 或是對 (r, r_dot, rθ, (rθ)_dot) 做偏微分。  

任何阿狗阿貓都可以當 generalized coordinate 嗎? 非正交 coordinate 也可以嗎 (雙擺的 θ1, θ2 顯然非正交)?  等等問題。

另外 Lagrangian/Hamiltonian mechanics 比起 Newtonian mechanics 的好處 (1) scaler vs. vector equations, 不用找力更簡潔;  (2) generalized coordinates 在 constraint system (如單擺) 更簡潔; (3) 除了使用在 particle physics 之外,Lagrangian/Hamiltonian 也可以用在 field (EM field) 上。 還有其他的好處嗎?

Yes. 很多書或 wiki 都提到 (4) Lagrangian/Hamiltonian mechanics 可以直接 transform 到 relativistic mechanics (curved space-time mechanics) 和 quantum mechanics (operator mechanics or Poisson bracket).

 

Lagrangian 和 Hamiltonian 的差別?

另外一個問題是 Lagrangian 和 Hamiltonian 的差別到底在那裡?  一般說法是 Lagrangian equations 是 N 個 2nd order differential equations.  Hamiltonian equations 是 2N 個 1st order differential equation.   Hamiltonian 更好的展示 intrinsic symmetry. 但有更直觀的解釋這兩者的差別嗎?  Lagrange 是偉大的數學物理學家,他沒有看到什麼更深的東西?

Lagrangian 和 Hamiltonian 是 Legendre transform pair.  但這只是代數的結果 (algebra).  是否有更直覺的解釋 ( Geometry?)   –> covariant vs. contravariant –> Wrong,   Tangent space vs. Cotangent space.

 

YES!!!!!!  就是 Geometry of Hamiltonian mechanics.  

 

Differential Geometry View for Mechanics

前文提到學 differential geometry 的 path:

* Tensor calculus (in Euclidean space first, then manifold embedded in Euclidean space, then curved space)

* Differential geometry on manifold

* Advanced topic (Riemannian geometry with connection, geodesic, flow; information geometry)

 

Step 1: 

Euclidean space:

首先 tensor calculus or differential geometry 最重要的特性就是 coordinate free!!!  利用 coordinate , 但不要 pick any specific coordinate.  特別是 Cartesian coordinate!!!  結果必須 apply to all coordinate systems.

這和 generalized coordinate 的想法不謀而合。Spell everything in local basis.  everything needs to work in different local basis (Cartesian coordinate 所有 local basis is the same).

Lagrangian 和 Hamiltonian 的差別就是 covariant basis and contra variant basis!!  –> Yes

另一個說法:  差別是 tangent space and cotangent space (?)

 

Step 2:

Manifold in Euclidean space:

Constrained mechanics 可視為 manifold in higher dimension Euclidean space!  Generalized coordinate 就是 local bases (defined by partial derivative of position vector).

Lagrangian 就是 manifold 上的 geodesic.

Hamiltonian 就是 manifold 上的 Hamiltonian flow.

 

Step 3:

Curved space-time:

Apply Lagrangian and Hamiltonian in curved spacetime.

 

Cartesian Coordinates without Constraints

考慮 N particles system in a 3D Cartesian coordinate system, described by N vectors.

整個運動方程式可視為 N particles in 3D space, 或是等價於 1 particle in 3N-dimension space.

如果沒有任何 constraints, total DOF (degree of freedom) 是 3N. 可視為 3N-dimension (Euclidean) manifold (M), 不需要 embedded 在更高維的 Euclidean space.

我們可以用 Cartesian coordinate describe 如下:

NewImage

NewImage

NewImage

當然 differential geometry 的精神就是 coordinate free.  不一定要用 Cartesian.  r, v, 都是 tensor.  

K 是 invariant (?), 也是 0-th order tensor.  

F 也是 tensor?   Tensor 可以用 Jocobain 做座標轉換。

不過 pick different coordinate 在 constraints 時更有用如下。

 

Curvilinear Coordinates (with Constraints)

NewImage

舉例而言,如果單擺則 r = length (a constant); but θ is a free parameter.

此時的 DOF 變成 3N – k = n (dimension).  就是新的 manifold Q of dimension n (=3N-k).  注意新的 manifold 不一定是 Euclidean; 事實上大多不是 Euclidean manifold.

 NewImage

此時我們導入 n 個 DOF as generalized coordinates, (q1, q2, …, qn).

NewImage

再導入 generalized velocities (or momentum) (q’1, q’2, …, q’n)

NewImage

重點是 gik(q,m) 對應的是 differential geometry 的 metric tensor.  

如果沒有 potential energy,  Principle of least action 要 optimize 的 action 只有 kinetic energy.  因此 least action principle 對應的就是 differential geometry 的 geodesic curve on the configuration manifold!!

如果有 Potential energy, V, 就會有兩個量: Lagrangian and total energy (也就是 Hamiltonian).

NewImage 

此時的 principle of least action 對應的 action 是 Lagrangian, 為何不是 Hamiltonian? 

以下說明:

 

Topological Map of Lagrangian and Hamiltonian Mechanics

Topological theory 乍看之下是定性的結論,和 mechanics 有距離,因為 mechanics 需要 metric, time, 等 rigid 觀念。不過 differential geometry 是把 topological space/map 和 metric 等結合。只是不 pick 特定的 coordinate systems.  Lagrangian and Hamiltonian mechanics 對應兩種不同的 topological map, 主要是不同的 local coordinate systems. 

重點就是 potential function V is a map of configuration manifold to real number R.  V: Q -> R.  在 tangent bundle we can define state function 就是 Lagrangian.   

 

NewImage

NewImage

 

 

 

 NewImage

NewImage 

NewImage

NewImage

NewImage

p 看起來像是 q_dot 的 contravariant bases. 

NewImage

p and q_dot 是 covariant and contra variant bases.  由 metric tensor gs link 在一起 (?, yes)

NewImage 

 (q, p) 是 manifold Q 加上 cotangent space T* => cotangent bundle => phase space

 

結論:  q 是定義 n-dimension manifold.  q_dot (不含 V)  和 p (不含 V, 因為是對 q_dot 導數) 是定義 tangent space and cotangent space.

在 V=0 的情況下,  L = H = K(q, q_dot).   Principle of least action (PLA) 的 Lagrangian 等價於 geodesic.   Hamiltonian 相當於 flow.  

但 V ≠ 0.   Hamiltonian 相當於 flow 仍適用。但 Lagrangian 等價於 geodesic 嗎?  NO!

q 仍然一樣。q_dot 仍然一樣。但 p 是從 Lagrangian 對 q_dot derivative definition 而來,不包含 V.

所以 V 到底扮演什麼角色???????  唯一的角色是 (2.21) generalized force.  如何融入 differential geometry interpretation?   在 manifold (No), tangent space(No), cotangent space (No), metric tensor(No).

 

Principle of Least Action (PLA)

Lagrangian and Hamiltonian 基本上都是 based on PLA.  可以說 PLA 是比 Newton 力學定律更 fundamental 的自然規律。

Action 就是 differential Lagrangian.  從變分理論可以導出 Euler-Lagrangian equation.  等價於 Newton 第二定律, done. 

但是 Hamiltonian 又如何?  Hamiltonian (energy) 是一個常數 (能量守恆), 如何用來做 least action?  

重點在於 Hamiltonian flow.   Hamiltonian 是常數對應在 phasor plane 是封閉的 contour.  可以証明對應的 flow 是 uncompressed, 不會相交, 面積 (2D) or 體積  (3D) 永遠一致。

對應在 differential geometry 上: Lagrangian (without potential, V=0) 是找 q(A) 到 q(B) 點的 geodesic curve on the manifold (what if V is not 0? 也是 geodesic 嗎?). 非常直觀。  Hamiltonian 似乎是連結 constant energy function on the manifold from q(A) 到 q(B) on the manifold.   

上述的 differential geometry geodesic (Lagrangian) or flow 成立的前提是 L and H not explicitly depending on t!!!  

 

Lagrangian and Hamiltonian 是在同樣的 manifold 嗎?  Yes, –> but different tangent and cotangent space.

 

Lagrangian without potential 是 Geodesic 的說明:

以下 x 就是上文的 q (generalized coordinate).

NewImage

 

再多說明。V=0,  PLA 對應 manifold 的 geodesic curve.  如果加上 V(q) (potential field) 會扭曲 geodesic curve.  舉例而言,在有重力場的情況下,會改變 q(t).  當然在 Einstein general relativity 中, 重力直接改變 spacetime 的 curvature.