Short description: Shorthand notation for tensor operations In mathematics, especially in applications of linear algebra to physics, Einstein notation (also known as the Einstein summation convention or Einstein summation notation) is a notational convention that implies summation over a set of indexed terms in a formula, thus achieving brevity. As part of mathematics it is a notational subset of Ricci calculus; however, it is often used in physics applications that do not distinguish between tangent and cotangent spaces. It was introduced to physics by Albert Einstein in 1916.[1] ## Contents * 1 Introduction * 1.1 Statement of convention * 1.2 Application * 2 Vector representations * 2.1 Superscripts and subscripts versus only subscripts * 2.2 Mnemonics * 2.3 Abstract description * 3 Common operations in this notation * 3.1 Inner product (hence also vector dot product) * 3.2 Vector cross product * 3.3 Matrix-vector multiplication * 3.4 Matrix multiplication * 3.5 Trace * 3.6 Outer product * 3.7 Raising and lowering indices * 4 See also * 5 Notes * 6 References * 7 Bibliography * 8 External links ## Introduction ### Statement of convention According to this convention, when an index variable appears twice in a single term and is not otherwise defined (see Free and bound variables), it implies summation of that term over all the values of the index. So where the indices can range over the set {1, 2, 3}, [math]\displaystyle{ y = \sum_{i = 1}^3 c_i x^i = c_1 x^1 + c_2 x^2 + c_3 x^3 }[/math] is simplified by the convention to: [math]\displaystyle{ y = c_i x^i }[/math] The upper indices are not exponents but are indices of coordinates, coefficients or basis vectors. That is, in this context x2 should be understood as the second component of x rather than the square of x (this can occasionally lead to ambiguity). The upper index position in xi is because, typically, an index occurs once in an upper (superscript) and once in a lower (subscript) position in a term (see § Application below). Typically, (x1 x2 x3) would be equivalent to the traditional (x y z). In general relativity, a common convention is that * the Greek alphabet is used for space and time components, where indices take on values 0, 1, 2, or 3 (frequently used letters are μ, ν, …), * the Latin alphabet is used for spatial components only, where indices take on values 1, 2, or 3 (frequently used letters are i, j, …), In general, indices can range over any indexing set, including an infinite set. This should not be confused with a typographically similar convention used to distinguish between tensor index notation and the closely related but distinct basis-independent abstract index notation. An index that is summed over is a summation index, in this case "i ". It is also called a dummy index since any symbol can replace "i " without changing the meaning of the expression (provided that it does not collide with other index symbols in the same term). An index that is not summed over is a free index and should appear only once per term. If such an index does appear, it usually also appears in every other term in an equation. An example of a free index is the "i " in the equation [math]\displaystyle{ v_i = a_i b_j x^j }[/math], which is equivalent to the equation [math]\displaystyle{ v_i = \sum_j(a_{i} b_{j} x^{j}) }[/math]. ### Application Einstein notation can be applied in slightly different ways. Typically, each index occurs once in an upper (superscript) and once in a lower (subscript) position in a term; however, the convention can be applied more generally to any repeated indices within a term.[2] When dealing with covariant and contravariant vectors, where the position of an index also indicates the type of vector, the first case usually applies; a covariant vector can only be contracted with a contravariant vector, corresponding to summation of the products of coefficients. On the other hand, when there is a fixed coordinate basis (or when not considering coordinate vectors), one may choose to use only subscripts; see § Superscripts and subscripts versus only subscripts below. ## Vector representations ### Superscripts and subscripts versus only subscripts In terms of covariance and contravariance of vectors, * upper indices represent components of contravariant vectors (vectors), * lower indices represent components of covariant vectors (covectors). They transform contravariantly or covariantly, respectively, with respect to change of basis. In recognition of this fact, the following notation uses the same symbol both for a vector or covector and its components, as in: [math]\displaystyle{ \begin{align} v = v^i e_i = \begin{bmatrix}e_1 & e_2 & \cdots & e_n\end{bmatrix} \begin{bmatrix}v^1 \\\ v^2 \\\ \vdots \\\ v^n\end{bmatrix} \\\ w = w_i e^i = \begin{bmatrix}w_1 & w_2 & \cdots & w_n\end{bmatrix} \begin{bmatrix}e^1 \\\ e^2 \\\ \vdots \\\ e^n\end{bmatrix} \end{align} }[/math] where v is the vector and v i are its components (not the ith covector v), w is the covector and wi are its components. The basis vector elements [math]\displaystyle{ e_i }[/math] are each column vectors, and the covector basis elements [math]\displaystyle{ e^i }[/math] are each row covectors. (See also #Abstract description; duality, below and the examples) In the presence of a non-degenerate form (an isomorphism V → V∗, for instance a Riemannian metric or Minkowski metric), one can raise and lower indices. A basis gives such a form (via the dual basis), hence when working on Rn with a Euclidean metric and a fixed orthonormal basis, one has the option to work with only subscripts. However, if one changes coordinates, the way that coefficients change depends on the variance of the object, and one cannot ignore the distinction; see Covariance and contravariance of vectors. ### Mnemonics In the above example, vectors are represented as n × 1 matrices (column vectors), while covectors are represented as 1 × n matrices (row covectors). When using the column vector convention: * "Upper indices go up to down; lower indices go left to right." * "Covariant tensors are row vectors that have indices that are below (co-row-below)." * Covectors are row vectors: [math]\displaystyle{ \begin{bmatrix}w_1 & \cdots & w_k\end{bmatrix}. }[/math] Hence the lower index indicates which column you are in. * Contravariant vectors are column vectors: [math]\displaystyle{ \begin{bmatrix}v^1 \\\ \vdots \\\ v^k\end{bmatrix} }[/math] Hence the upper index indicates which row you are in. ### Abstract description The virtue of Einstein notation is that it represents the invariant quantities with a simple notation. In physics, a scalar is invariant under transformations of basis. In particular, a Lorentz scalar is invariant under a Lorentz transformation. The individual terms in the sum are not. When the basis is changed, the components of a vector change by a linear transformation described by a matrix. This led Einstein to propose the convention that repeated indices imply the summation is to be done. As for covectors, they change by the inverse matrix. This is designed to guarantee that the linear function associated with the covector, the sum above, is the same no matter what the basis is. The value of the Einstein convention is that it applies to other vector spaces built from V using the tensor product and duality. For example, V ⊗ V, the tensor product of V with itself, has a basis consisting of tensors of the form eij = ei ⊗ ej. Any tensor T in V ⊗ V can be written as: [math]\displaystyle{ \mathbf{T} = T^{ij}\mathbf{e}_{ij}. }[/math] V *, the dual of V, has a basis e1, e2, …, en which obeys the rule [math]\displaystyle{ \mathbf{e}^i (\mathbf{e}_j) = \delta^i_j. }[/math] where δ is the Kronecker delta. As [math]\displaystyle{ \operatorname{Hom}(V,W) = V^* \otimes W }[/math] the row/column coordinates on a matrix correspond to the upper/lower indices on the tensor product. ## Common operations in this notation In Einstein notation, the usual element reference [math]\displaystyle{ A_{mn} }[/math] for the [math]\displaystyle{ m }[/math]th row and [math]\displaystyle{ n }[/math]th column of matrix [math]\displaystyle{ A }[/math] becomes [math]\displaystyle{ {A^m}_{n} }[/math]. We can then write the following operations in Einstein notation as follows. ### Inner product (hence also vector dot product) Using an orthogonal basis, the inner product is the sum of corresponding components multiplied together: [math]\displaystyle{ \mathbf{u} \cdot \mathbf{v} = u_j v^j }[/math] This can also be calculated by multiplying the covector on the vector. ### Vector cross product Again using an orthogonal basis (in 3 dimensions) the cross product intrinsically involves summations over permutations of components: [math]\displaystyle{ \mathbf{u} \times \mathbf{v}= {\varepsilon^i}_{jk}u^j v^k \mathbf{e}_i }[/math] where [math]\displaystyle{ {\varepsilon^i}_{jk}=\delta^{il}\varepsilon_{ljk} }[/math] εijk is the Levi-Civita symbol, and δil is the generalized Kronecker delta. Based on this definition of ε, there is no difference between εijk and εijk but the position of indices. ### Matrix-vector multiplication The product of a matrix Aij with a column vector vj is : [math]\displaystyle{ \mathbf{u}_{i} = (\mathbf{A} \mathbf{v})_{i} =\sum_{j=1}^N A_{ij} v_{j} }[/math] equivalent to [math]\displaystyle{ u^i = {A^i}_j v^j }[/math] This is a special case of matrix multiplication. ### Matrix multiplication The matrix product of two matrices Aij and Bjk is: [math]\displaystyle{ \mathbf{C}_{ik} = (\mathbf{A} \mathbf{B})_{ik} =\sum_{j=1}^N A_{ij} B_{jk} }[/math] equivalent to [math]\displaystyle{ {C^i}_k = {A^i}_j {B^j}_k }[/math] ### Trace For a square matrix Aij, the trace is the sum of the diagonal elements, hence the sum over a common index Aii. ### Outer product The outer product of the column vector ui by the row vector vj yields an m × n matrix A: [math]\displaystyle{ {A^i}_j = u^i v_j = {(u v)^i}_j }[/math] Since i and j represent two different indices, there is no summation and the indices are not eliminated by the multiplication. ### Raising and lowering indices Given a tensor, one can raise an index or lower an index by contracting the tensor with the metric tensor, gμν. For example, take the tensor Tαβ, one can raise an index: [math]\displaystyle{ T^{\mu\alpha} = g^{\mu\sigma} {T_\sigma}^\alpha }[/math] Or one can lower an index: [math]\displaystyle{ T_{\mu\beta} = g_{\mu\sigma} {T^\sigma}_\beta }[/math] ## See also * Tensor * Abstract index notation * Bra–ket notation * Penrose graphical notation * Levi-Civita symbol * DeWitt notation ## Notes 1. This applies only for numerical indices. The situation is the opposite for abstract indices. Then, vectors themselves carry upper abstract indices and covectors carry lower abstract indices, as per the example in the introduction of this article. Elements of a basis of vectors may carry a lower numerical index and an upper abstract index. ## References 1. ↑ Einstein, Albert (1916). "The Foundation of the General Theory of Relativity" (PDF). Annalen der Physik. doi:10.1002/andp.19163540702. Bibcode: 1916AnP...354..769E. http://www.alberteinstein.info/gallery/gtext3.html. Retrieved 2006-09-03. 2. ↑ "Einstein Summation". Wolfram Mathworld. http://mathworld.wolfram.com/EinsteinSummation.html. ## Bibliography * Hazewinkel, Michiel, ed. (2001), "Einstein rule", Encyclopedia of Mathematics, Springer Science+Business Media B.V. / Kluwer Academic Publishers, ISBN 978-1-55608-010-4, https://www.encyclopediaofmath.org/index.php?title=E/e035220 . ## External links * Rawlings, Steve (2007-02-01). "Lecture 10 – Einstein Summation Convention and Vector Identities". Oxford University. http://www-astro.physics.ox.ac.uk/~sr/lectures/vectors/lecture10final.pdfc. * "Understanding NumPy's einsum". https://stackoverflow.com/a/33641428. * v * t * e Tensors Glossary of tensor theory Scope| | Mathematics| * coordinate system * multilinear algebra * Euclidean geometry * tensor algebra * dyadic algebra * differential geometry * exterior calculus * tensor calculus | * Physics * Engineering * continuum mechanics * electromagnetism * transport phenomena * general relativity * computer vision Notation| * index notation * multi-index notation * Einstein notation * Ricci calculus * Penrose graphical notation * Voigt notation * abstract index notation * tetrad (index notation) * Van der Waerden notation Tensor definitions| * tensor (intrinsic definition) * tensor field * tensor density * tensors in curvilinear coordinates * mixed tensor * antisymmetric tensor * symmetric tensor * tensor operator * tensor bundle * two-point tensor Operations| * tensor product * exterior product * tensor contraction * transpose (2nd-order tensors) * raising and lowering indices * Hodge star operator * covariant derivative * exterior derivative * exterior covariant derivative * Lie derivative Related abstractions| * dimension * basis * vector, vector space * multivector * covariance and contravariance of vectors * linear transformation * matrix * spinor * Cartan formalism * differential form * exterior form * connection form * geodesic * manifold * fiber bundle * Levi-Civita connection * affine connection Notable tensors| | Mathematics| * Kronecker delta * Levi-Civita symbol * metric tensor * nonmetricity tensor * Christoffel symbols * Ricci curvature * Riemann curvature tensor * Weyl tensor * torsion tensor | Physics| * moment of inertia * angular momentum tensor * spin tensor * Cauchy stress tensor * stress–energy tensor * EM tensor * gluon field strength tensor * Einstein tensor * metric tensor (GR) Mathematicians| * Leonhard Euler * Carl Friedrich Gauss * Augustin-Louis Cauchy * Hermann Grassmann * Gregorio Ricci-Curbastro * Tullio Levi-Civita * Jan Arnoldus Schouten * Bernhard Riemann * Elwin Bruno Christoffel * Woldemar Voigt * Élie Cartan * Hermann Weyl * Albert Einstein *[v]: View this template *[t]: Discuss this template *[e]: Edit this template