You are on page 1of 9

12/30/13

Tensor Notation (Basics)

Tensor Notation (Basics)
home > basic math > tensor notation (basic)

Search Continuum Mechanics Website
Search

Introduction
Tensor (or index, or indicial, or Einstein) notation has been introduced in the previous pages during the discussions of vectors and matrices. This page reviews the fundamentals introduced on those pages, while the next page goes into more depth on the usefulness and power of tensor notation.

!

This page repeats the tensor notation segments of earlier pages nearly verbatim. If you have already read them, then there is nothing new here. You can continue to the next page, which addresses more advanced tensor notation topics.

Summation Convention
Tensor notation introduces one simple operational rule. It is to automatically sum any index appearing twice from 1 to 3. As such, ai bj is simply the product of two vector components, the ith component of the a vector with the jth component of the b vector. However, ai bi is a completely different animal because the subscript i appears twice in the term. Therefore, ai bi automatically expands to, and is shorthand for...

ai bi ≡ a1 b 1 + a2 b2 + a3 b3

which is just the dot product of vectors a and b. Note that any letter could be used as the index (as i was in this case), in order to invoke the automatic summation, however, it is critical that the same letter be used in both subscripts in order to do so.

Kronecker Delta
Tensor notation introduces two new symbols into the mix, the Kronecker Delta, δ ij , and the alternating or permutation tensor, ϵijk . The Kronecker Delta, δ ij , serves as the identity matrix, I, because it equals 1 when i = j and 0 otherwise. So in a matrix indexed by i and j , the diagonal components equal 1 and the off-diagonal components equal 0.

Is It a Matrix or Not?
A note from the purests... The identity matrix is a matrix, but the Kronecker delta technically is not. δ ij is a single scalar value that is either 1 or 0 depending on the values of i and j . Or think of it as an individual component of the identity matrix, I. This is also why tensor notation is not in bold, because it always refers to individual components of tensors, but never to a vector, matrix, or tensor as a whole. Follow this link for an entertaining discussion between someone who gets it, and someone else who doesn't.

!

Kronecker Delta verses Dirac Delta
Don't confuse the Kronecker delta, δ ij , with the Dirac delta, δ (t) . The Dirac delta is something totally different. It is often used in signal processing and equals 0 for all t except t = 0. At t = 0 , it approaches ∞ such that

www.continuummechanics.org/cm/tensornotationbasic.html

f (x)

(t)

dx = f (0)

1/9

html i bi 2/9 . This leaves c3 = ϵ 3 jk aj bk = a1 b2 − a2 b1 which is consistent with the determinant result (as it had better be). while ϵ321 = ϵ213 = ϵ132 = −1 . Summation of the j and k indices from 1 to 3 is implied because they are repeated as subscripts. c3 = ϵ 3 jk aj bk = ϵ 311 a1 b1 ϵ 321 a2 b1 ϵ 331 a3 b1 + + + ϵ 312 a1 b2 ϵ 322 a2 b2 ϵ 332 a3 b2 + + + ϵ 313 a1 b3 ϵ 323 a2 b3 ϵ 333 a3 b3 + + All subscripts are now specified. and this permits evaluation of all alternating tensors. In other words. Vector and Tensor Addition Vector and tensor addition is written in tensor notation simply as ci = ai + bi and cij = aij + bij Vector Dot Products b www. Results for the xth and yth components are obtained by setting i equal to 1 and 2. corresponds to ci = ϵ ijk aj bk c = a × b where ϵ123 = ϵ231 = ϵ312 = 1 . ϵijk .12/30/13 ∫ Tensor Notation (Basics) f (x)δ (t) dx = f (0) Alternating Tensor The alternating tensor. respectively.org/cm/tensornotationbasic. Cross Products Using Tensor Notation Set i = 3 to obtain the zth component of a cross product. it is shorthand for ci = ϵ ijk aj bk = ϵ i11 a1 b1 ϵ i21 a2 b1 ϵ i31 a3 b1 + + + ϵ i12 a1 b2 ϵ i22 a2 b2 ϵ i32 a3 b2 + + + ϵ i13 a1 b3 ϵ i23 a2 b3 ϵ i33 a3 b3 + + The equation is still general until a particular component is chosen for i to be evaluated.continuummechanics. All of them will equal zero except two. and all other combinations equal zero. is used in cross products as follows.

respectively. Vector Cross Products The alternating tensor. In other words: ai bi ≡ a1 b 1 + a2 b2 + a3 b3 Note that any letter could be used as the index (as i was in this case). and this permits evaluation of all alternating tensors.html 3/9 .) ci = ϵ ijk aj bk where ϵ123 = ϵ231 = ϵ312 = 1 . is used in cross products as follows. In other words. Summation of the j and k indices from 1 to 3 is implied because they are repeated as subscripts in the above equation. it is shorthand for ci = ϵ ijk aj bk = ϵ i11 a1 b1 ϵ i21 a2 b1 ϵ i31 a3 b1 + + + ϵ i12 a1 b2 ϵ i22 a2 b2 ϵ i32 a3 b2 + + + ϵ i13 a1 b3 ϵ i23 a2 b3 ϵ i33 a3 b3 + + The equation is still general until a particular component is chosen for i to be evaluated. c3 = ϵ 3 jk aj bk = ϵ 311 a1 b1 ϵ 321 a2 b1 ϵ 331 a3 b1 + + + ϵ 312 a1 b2 ϵ 322 a2 b2 ϵ 332 a3 b2 + + + ϵ 313 a1 b3 ϵ 323 a2 b3 ϵ 333 a3 b3 + + All subscripts are now specified. The following example of area calculation of a triangle illustrates an important property of tensor notation.12/30/13 Tensor Notation (Basics) A dot product of vectors a and b is written in tensor notation simply as ai bi . this is written in two steps as www.org/cm/tensornotationbasic. (Yes. while ϵ321 = ϵ213 = ϵ132 = −1 .continuummechanics. it is critical that the same letter be used on both subscripts in order to invoke the automatic summation. The area of a triangle bounded on two sides by vectors a and b is 1 Area = 2 | a × b| In tensor notation. not the order in which the terms are written. Cross Products Using Tensor Notation Set i = 3 to obtain the zth component of a cross product. ϵijk . The summation from 1 to 3 is implied because the subscript ( i in this case ) appears twice ( on a and b ). namely that the indices dictate the summation and order of multiplication. this does repeat the alternating tensor section above. and all other combinations equal zero. All of them will equal zero except two. Results for the xth and yth components are obtained by setting i equal to 1 and 2. This leaves c3 = ϵ 3 jk aj bk = a1 b2 − a2 b1 which is consistent with the determinant result (as it had better be). however.

2.continuummechanics. although they are closely related. and b = (1. ϵijk aj bk ϵimn am bn could also be written as ϵijk ϵimn aj bk am bn . it is not permitted to appear more than 2 times. 2). then the diadic product of the two is ⎡ a ⊗ b = ⎣ 3 ∗ 1 7 ∗ 1 2 ∗ 1 3 ∗ 2 7 ∗ 2 2 ∗ 2 3 ∗ 3 7 ∗ 3 2 ∗ 3 ⎤ ⎦ ⎡ = ⎣ 3 7 2 6 14 4 9 21 6 ⎤ ⎦ Tensor notation dictates that the value of any cij component is simply ai bj . 7. by convention. It is simply a matter of personal preference.12/30/13 Tensor Notation (Basics) 1 ci = ϵ ijk aj bk and Area = 2 − − − √ci ci or in a single equation as − − − − − − − − − − − − − √ϵ ijk aj bk ϵ imn am bn 1 Area = 2 Note that each index appears twice in the above equation because. In contrast ϵijk aj bk equals ϵijk bk aj equals aj bk ϵ ijk because the order of operation is dictated by the indices rather than the order the factors are written in. 3).html 4/9 . www. Order of Factors in Tensor Notation Tensor notation allows for increased flexibility of the order in which factors are written than is permitted in vector notation. cij = ai bj Diadic Product Example If a = (3. For example. So in the above discussion. selecting i = 2 and j = 3 gives c23 = a2 b3 = 7 ∗ 3 = 21 Matrix Transpose The transpose of Aij is Aj i . For example. a × b is not equal to b × a.org/cm/tensornotationbasic. Vector Diadic Products Tensor notation of a diadic product could not be simpler.

b .c ( n . Note that this is probably not rigorously correct since. Products are often written with a dot in matrix notation as A ⋅ B. as discussed earlier. n ) d oi=1 . n www. you want to compute C 23 . not just this matrix dot product. and C 23 = A 21 B13 + A22 B23 + A23 B33 Matrix Multiplication Example If ⎡ A = ⎣ 1 4 2 2 2 3 3 2 4 ⎦ ⎤ and ⎡ B = ⎣ 1 2 3 4 5 6 7 8 9 ⎤ ⎦ then Aik Bkj implies ⎡ ⎣ 1 4 2 2 2 3 3 2 4 ⎤⎡ ⎦⎣ 1 2 3 4 5 6 7 8 9 ⎤ = ⎦ ⎡ ⎣ 14 14 20 32 38 47 50 62 74 ⎤ ⎦ Tensor Notation and Computer Programming Another advantage of tensor notation is that it spells for you how to write the computer code to do it.. If. but sometimes written without the dot as AB.) The k in both factors automatically implies C ij = A i1 B1 j + Ai2 B2 j + Ai3 B3 j which is the ith row of the first matrix multiplied by the jth column of the second matrix.html 5/9 . Oh well. for example. n ) . n ) . s u b r o u t i n ea a _ d o t _ b b ( n . a . c ) d i m e n s i o na ( n .org/cm/tensornotationbasic. Multiplication rules are in fact best explained through tensor notation. They are only components of a matrix. This is true for all tensor notation operations.b ( n . Note how the subscripts in the FORTRAN example below exactly match the tensor notation for C ij = Aik Bkj .continuummechanics.12/30/13 Tensor Notation (Basics) Determinant The calculation of a determinant can be written in tensor notation as det(A) = ϵ ijk A i1 Aj2 Ak3 Matrix Inverse The inverse of Aij is written as Aij .. neither Aij nor Aij are technically matrices themselves. C ij = Aik Bkj (Note that no dot is used in tensor notation. −1 −1 Matrix Multiplication The dot product of two matrices multiplies each row of the first by each column of the second. then i = 2 and j = 3 .

dv3 dt ) = v ˙ = ˙i v = vi. they are both summed to give A : B = Aij Bij = A11 ∗ B11 A21 ∗ B21 A31 ∗ B31 + + + A12 ∗ B12 A22 ∗ B22 A32 ∗ B32 + + + A13 ∗ B13 A23 ∗ B23 A33 ∗ B33 + + Double Dot Product Example If ⎡ A = ⎣ 1 4 2 2 2 3 3 2 4 ⎦ ⎤ and ⎡ B = ⎣ 1 2 3 4 5 6 7 8 9 ⎤ ⎦ then Aij Bij = 1 ∗ 1 4 ∗ 2 2 ∗ 3 + + + 2 ∗ 4 2 ∗ 5 3 ∗ 6 + + + 3 ∗ 7 2 ∗ 8 4 ∗ 9 + + = 124 Differentiation With Respect To Time Differentiation with respect to time can be written in several forms. dv2 dt . Once again. dx3 dt ) = x ˙ = x ˙i = xi. It is written in matrix notation as A best explained with tensor notation.t Use of the dot to indicate time differentiation is popular even in the midst of conventional tensor notation. dx velocity = dt = ( d x1 dt .continuummechanics. its calculation is A : B = Aij Bij Since the i and j subscripts appear in both factors. n c ( i . : B. the comma notation www.12/30/13 Tensor Notation (Basics) d oj=1 . j )=0 d ok=1 .org/cm/tensornotationbasic.html 6/9 . n c ( i . j )+a ( i . dx2 dt . j )=c ( i . k )*b ( k . Otherwise. j ) e n dd o e n dd o e n dd o r e t u r n e n d Double Dot Products The double dot product of two matrices produces a scalar result.t dv acceleration = dt = ( dv1 dt .

the divergence is written in tensor notation as vi.continuummechanics. Differentiation With Respect To Spatial Coordinates Differentiation of a scalar function f (x) with respect to xj is ∂f or ∂x j f.html 7/9 . so long as they are both the same letter. is ∂v or ∂x j ( ∂ vx ∂x j ∂ vy . ∂ vz ∂x j ) or vi. Divergence The divergence of a vector is a scalar result. then the dot product is ∂ vi. is ∂σ or ∂x k σ ij. It is written as vi. j Differentiation of a tensor. Divergence Example If v = (3 x 2 − 2 y. ∂x j . z 2 + x.i . It is very important that both subscripts are the same because this dictates that they are automatically summed from 1 to 3.i = ∂x (3 x 2 ∂ − 2 y) + ∂y (z 2 ∂ + x) + ∂z (y 3 − z) = 6x − 1 Curl www.org/cm/tensornotationbasic. every component of a tensor is differentiated. σ.k As with vectors. y 3 − z) .i = ∂ v1 ∂ x1 ∂ vx ∂x + ∂ v2 ∂ x2 ∂ vy + ∂ v3 ∂ x3 ∂ vz ∂z = + ∂y + As stated above. especially when the derivatives are with respect to a spatial coordinate. j Differentiation of a vector. They can in fact be any letter one desires.12/30/13 Tensor Notation (Basics) is also popular.i and computed as vi. v.

leaving ϵ 2 jk vk. 3 Start by calculating the gradient of f (x) . set i equal to 2 in the above equation.3 + + + ϵ 212 v2.org/cm/tensornotationbasic.j = ϵ 211 v1.3 + + + ϵ 213 v3.ii . 2 x 2 3 − z cos(y). f .3 + + + ϵ i13 v3. not v × ∇.2 ϵ i31 v1.1 ϵ 221 v1. Laplacian The Laplacian is the divergence of the gradient of a function. Results for the xth and zth components are obtained by setting i equal to 1 and 3.1 ϵ i23 v3. not vj.ii = ∇ ⋅ ∇f (x) = 12 xy + z sin(y) www.continuummechanics.2 ϵ i33 v3.1 = ∂ vx ∂z − ∂ vz ∂x which is again consistent with the determinant result (as it must be). All of them will equal zero except two.1 ϵ i21 v1. the fact that j and k both occur twice in ϵijk vk. Its definition is 2 2 2 ∂ f . − sin(y)) And the divergence of the gradient (which is the Laplacian after all) is f .ii ≡ f (x) 2 ∂ + f (x) 2 ∂ + f (x) 2 ∂x ∂y ∂z Laplacian Example Determine the Laplacian of f (x) = 2 x y − z sin(y) . ϵ 2 jk vk.i = ( 6 x y.j here.3 + + Curls Using Tensor Notation To obtain the yth component of a curl.2 ϵ i32 v2. The term expands to ϵ ijk vk. respectively.3 + + All subscripts are now specified. It often arises in 2nd order partial differential equations and is written in 2 matrix notation as ∇ f (x) and in tensor notation as f .j = ϵ i11 v1.1 ϵ 222 v2.1 ϵ 223 v3.12/30/13 Tensor Notation (Basics) The curl of a vector is written in tensor notation as ϵijk vk. As with cross products.2 ϵ 233 v3.1 ϵ i22 v2.j .j dictates that both are automatically summed from 1 to 3.k . This is because the curl is ∇ × v. It is critical to recognize that the vector is written as vk. and this permits evaluation of all alternating tensors.2 ϵ 231 v1.3 − v3.3 + + + ϵ i12 v2.2 ϵ 232 v2.j = v1.html 8/9 .

k Table of Contents Vector Calculus Tensor Notation (Advanced) www.m and the derivative of a diadic product.j = ai.m = ϵ ijk aj.html 9/9 .k bj + ai bj. Examples include the gradient of a dot product (ai bi ).j bi + ai bi.12/30/13 Tensor Notation (Basics) Derivatives of Products The product rule applies to the derivatives of vector (and tensor) products just as it does for scalar products. ( ai bj ) .org/cm/tensornotationbasic.m bk + ϵ ijk aj bk .j the derivative of a cross product (ϵ ijk aj bk ).k = ai.continuummechanics.