Mathematical preliminaries — a toolbox for manifold mechanics
Mathematical preliminaries — a toolbox for manifold mechanics
To carry Newton’s laws past the flat plane we need a new vocabulary — bases, the matrix exponential, and the shortest path to tangent vectors.
Opening
This book is a study note that rewrites Lagrangian and Hamiltonian mechanics in the language of manifolds. That work starts in chapter 1, but a few tools should already be in the reader’s hand. By the end of this prologue the reader should be able to write “change of basis” in a single line of indices and explain in one sentence why the matrix exponential is our first example of a flow. The tangent space of chapter 4 and the vector fields of chapter 5 will then not feel like new abstractions but as formalizations of the pictures sketched here.
Main 1 — Why we are setting up a toolbox
Newton’s rests on the silent assumption that the position vector lives in . For the textbook pendulum, planetary motion, and collision problems this is enough. But consider the double pendulum. Its coordinates are the two rod angles , and the coordinate space is not a plane but the torus . The values and name the same point — something ordinary planar calculus refuses to acknowledge.
In the same way, the orientation of a rigid body lives on the rotation group , a curved surface, and a particle constrained to a sphere lives on . The common name for such spaces is manifold — a space that looks locally like but globally does not. The formal definition is deferred to chapter 4, but the premise of this book is simple: if the configuration space is not flat, the vocabulary of calculus must be rewritten in a coordinate-independent way. The price we pay is one more pass over the basics of linear algebra.
Main 2 — Linear algebra refresher
A basis of a vector space is a set of vectors that is linearly independent and spans . Once a basis is fixed, every vector has unique components . Throughout this book we use the Einstein summation convention — when the same index appears once up and once down, sum over it. So
is all we need to write. Upper indices mark components (contravariant), lower indices mark basis vectors (covariant). If a new basis is given by , then the new components of the same vector are obtained by multiplying with the inverse matrix — this is change of basis, and the starting point of the tensor concept.
The next tool is eigenvalues and eigenvectors. For an matrix , if a nonzero satisfies , then is an eigenvalue of . Eigenvalues tell us the coordinates in which the matrix decomposes into pure stretching and rotation.
Now the protagonist of this chapter — the matrix exponential. It is just the scalar series ported to matrices. For an matrix ,
The series converges absolutely for every . The linear ODE has solution — accept this as fact for now — . The point to underline: applying to as varies, i.e. letting the system run for time , is the first concrete example of what we will later call a flow. is a one-parameter family of linear maps indexed by , and the cleanest specimen of the picture that chapter 5 will generalize.
Main 3 — Tangent vectors, intuitively
On a plane, a vector is the same vector no matter where you place it. Parallel transport is free. On the sphere the story changes. If you take an arrow at the equator pointing east and try to drag it to the north pole, it is not obvious in which direction the arrow should end up pointing.
The fix is to give each point its own vector space. A tangent vector at the point is, intuitively, “a velocity the surface allows at .” All tangent vectors at together form a vector space called the tangent space . The tangent space at the north pole of , written , is just the horizontal plane tangent to the sphere there — exactly the picture you would draw.
A touch more formally: take a curve through with . Its velocity at time zero, , is one tangent vector. In coordinates we can write , and the set plays the role of a basis for . Notice that this is formally identical to from Main 2.
For this chapter, the picture and the vocabulary are enough. The formal definition, the equivalence of different definitions, and basis changes are deferred to chapter 4. But one thing should be nailed in now: a vector field is a smooth assignment of one tangent vector to each point in space, and letting points slide along it is what produces a flow. is just the flat-space special case of that picture.
In Python
# Check that the matrix exponential really produces a rotation.
# A = [[0,-1],[1,0]] is the generator of planar rotation;
# applying e^{tA} to x0 = (1,0) should trace the unit circle.
import numpy as np
import matplotlib.pyplot as plt
A = np.array([[0.0, -1.0], [1.0, 0.0]])
x0 = np.array([1.0, 0.0])
def expm_series(M, terms=20):
# Truncated Taylor series: accurate for moderate ||M||.
n = M.shape[0]
result = np.eye(n)
term = np.eye(n)
for k in range(1, terms):
term = term @ M / k
result = result + term
return result
ts = np.linspace(0.0, 2 * np.pi, 200)
xs = np.array([expm_series(t * A) @ x0 for t in ts])
# Compare with the closed form (cos t, sin t).
closed = np.array([[np.cos(t), np.sin(t)] for t in ts])
err = np.max(np.abs(xs - closed))
print(f"max error between series and closed form = {err:.2e}")
plt.plot(xs[:, 0], xs[:, 1])
plt.gca().set_aspect("equal")
plt.title(r"flow traced by $e^{tA} x_0$")
plt.show()
If the error falls to the order of and the plot is a unit circle, the definition ” is the flow that acts on an initial vector for a time ” should now feel concrete.
To the next chapter
Chapter 1: Equations of motion rewrites Newton’s in generalized coordinates and watches the Lagrangian emerge naturally. The index notation and the flow picture assembled in this chapter will serve as the working vocabulary for that derivation.