### Help me understand Einstein notation? (Homework help, but I'm not directly asking how to solve the problems. ) [xpost r/AskPhysics]

The [;d;]-dimensional generalisation of Pythagoras's theorem gives the squared distance between two points as [;\sum{i=1}n dx_i2 ;] , where [; d\mathbf{x} ;] is the vector between two points. We can rewrite this squared distance as [;\sum{ij} g{ij}dxi dx_j ;], with [; g{ij};=1] if [; i=j ;] and [; g_{ij};=0] if [; i \neq j ;]. In other words, [; g;] is the identity matrix. We can generalise this to arbitrary invertible square matrices [; g;] , if the geometry is non-Euclidean. The crucial insight is that, if [;\Lambda;] is a square matrix with [;\LambdaT g\Lambda = g;], then the map replacing [;d\mathbf{x};] with [;\Lambda d\mathbf{x};] preserves [; d\mathbf{x}T gd\mathbf{x} ;]. In fact, we can be a bit more general than that; the map [; \mathbf{u},\,\mathbf{v}\to\Lambda\mathbf{u},\,\Lambda\mathbf{v};] preserves [; \mathbf{u}T gd\mathbf{v} ;]. For [; g ;] the identity matrix, the relevant [;\Lambda;] are rotational matrices.

For a more general [; g;] , [; g\mathbf{v}\neq\mathbf{v};] so it's worth introducing a shorthand for each. In particular, we use a mixture of upper and lower indices, and summation over repeated indices (due to matrix multiplication or a generalisation thereof) occurs with one copy upper, one lower. For example, [; vi = g{ij} vj,\,v_j =g{jk}vk;] with [;g{ij};] the matrix inverse of [;g_{jk};].

Special relativity claims spacetime's geometry takes [; g_{00} = -1;] (here [; 0 ;] is the index for the time coordinate, while positive integers cover space coordinates). The [; \Lambda ;] are then Lorentz matrices. General relativity admits that [; g;] is a function of space and time, and the maths involved quickly becomes complicated. However, you can understand Einstein notation as long as you obey these rules:

(i) Never let the same index appear twice unless it's once upper, once lower;

(ii) When you need to move an index, use either [;g{ij};] or [;g_{ij};] .