tensor calculus

The 10 Commandments of Index Expressions and Tensor Calculus

Estimated Read Time: 11 minute(s)
Common Topics: index, expression, indices, shall, summation

Having more than 10 years of experience in teaching vector and tensor calculus and special and general relativity, I have noted that many people have the same problems when trying to manipulate index expressions. The problem often lies in being familiar with the very basic ideas, such as repeated indices implying a sum (the summation convention), but not understanding the implications for the manipulations. If you are having trouble getting those pesky indices right, this Insight is intended for you. It will take the form of listing a number of commandments that I have seen students break time and time again, resulting in errors, headaches, and general loss of sanity. If you follow these commandments, you should find your index manipulation skills improve to be at least workable without risking glaring mistakes. I hope you find them useful. After the list, I will try to expand a bit on how they appear and how you can deal with them once you found that you broke them.

I have tried to order the commandments from being more basic to being more advanced.

The Commandments

  1. You shall not despair.
  2. You shall use clean and readable handwriting so that you do not confuse indices.
  3. You shall not have different free indices on opposite sides of equality or in different terms of the same expression.
  4. You shall not equate a vector expression to a scalar expression.
  5. You shall not have more than two of any one index in an index expression.
  6. You shall not sum over two covariant indices. Nor shall you sum over two contravariant indices.
  7. When there are two occurrences of an index in your expression, you shall not rename them to something that already exists in your expression.
  8. You shall not differentiate with respect to an already existing index unless that index is a free contravariant index and you are taking the divergence.
  9. You shall be free to compute scalar expressions in any coordinate system.
  10. You shall not confuse tensorial and non-tensorial quantities.

I have put the fifth commandment in bold because it is very common, easy to avoid, and some of the others are essentially corollaries of it.

Explanations and Countermeasures

1. You shall not despair

Easy to say, but harder to follow. I have encountered many students who seemingly have a direct aversion to manipulating index expressions and panic whenever they are asked to do so to the point of getting lost simply because they expect themselves to get lost. Sometimes this even leads to students not even making the attempt based on the assumption that they will fail. Take a deep breath and follow the remaining commandments and you will be fine.

2. You shall use clean and readable handwriting so that you do not confuse indices

This one also seems trivial, but it can be a real problem for some students with less than clear handwriting. Even if you normally have clean handwriting, you might be in risk of breaking this commandment during exams when your time becomes limited and your writing hurried. All of a sudden that ##i## might look like a ##j## and your expression no longer makes sense as it breaks one or more of the remaining commandments. If you feel that your handwriting when stressed is in risk of having two particular indices confused, do not use both of them in the same expression.

3. You shall not have different free indices on opposite sides of equality or in different terms of the same expression

Equality of index expressions means that it should hold regardless of what value the free indices take. As such, the free indices on each side of the expression need to match, when you put the free index ##i = 1## on the left-hand side, you should put it to one also on the right-hand side and you can only do that if the index appears on both sides. We have already mentioned one way of ending up with different free indices, misidentifying indices in your handwriting you could end up with something like ##v^i = T^{jk} w_k##, which, in accordance to this commandment, is nonsense. If you do find yourself with an expression like this, backtrack to the last point where it was not the case to identify your error.

4. You shall not equate a vector expression to a scalar expression

A typical example of this error is to write
$$
\vec v \times \vec w = \epsilon_{ijk} v^j w^k.
$$
While the left-hand side is a vector, the right-hand side is the component of the same vector (also note how the index ##i## appears on one side but not the other, also violating the previous commandment). While you can often recover from an error like this when you go back to a vector expression, it is an error that can be confusing and that is easily avoidable, either by taking the ##i##th component of the left-hand side or multiplying the right-hand side by the basis vector, i.e.,
$$
(\vec v \times \vec w)^i = \epsilon_{ijk} v^j w^k \quad \mbox{or} \quad \vec v \times \vec w = \vec e_i \epsilon_{ijk} v^j w^k.
$$
(Note that this expression breaks the 6th commandment if taken literally! It is intended to hold only in Cartesian coordinates. See the caveat.)

5.  You shall not have more than two of any one index in an index expression

If I had to give one commandment only, this would be it. It is by far the most common source of avoidable errors. If you end up with more than two of the same index in your expression, then the meaning of the expression is not clear. As an example of how this typically happens, let us look at the expression ##k^2 V^2##, where ##k## and ##V## are vectors. Here you know that for any vector ##U##, it holds that ##U^2 = U_\mu U^\mu## so you happily go about using this relation for both ##k## and ##V##, leading you to
$$
k^2 V^2 = k_\mu k^\mu V_\mu V^\mu
$$
and all of a sudden you do not know from looking at your expression which indices are contracted with each other. Note that you might get the same expression from applying similar logic to ##(k\cdot V)^2##, which is clearly not the same as ##k^2 V^2##. So what went wrong? With the summation convention, repeated indices imply a sum and in the above expression you have two of them, one for ##k^2## and another for ##V^2##. However, you used the same summation variable and without parentheses or summation signs, there is no longer any way to tell the different sums apart. If you are having problems with this, the way to avoid this is to insert one of the sums at a time, noting that you cannot insert an expression with a summation index that is the same as one of the indices already in your expression. In our particular example, we can start with inserting ##V^2 = V_\mu V^\mu## and obtaining
$$
k^2 V^2 = k^2 V_\mu V^\mu.
$$
So far so good, but since our expression already contains ##\mu##, we cannot insert ##k^2 = k_\mu k^\mu## without first changing the name of the summation index. Luckily, it does not matter what the summation index is called as
$$
k_\mu k^\mu = \sum_\mu k_\mu k^\mu = k_1 k^1 + \ldots + k_N k^N = \sum_\nu k_\nu k^\nu = k_\nu k^\nu,
$$
where we have written out the sums explicitly in the middle steps and assumed we are working in ##N## dimensions. Since there is no ##\nu## index in our expression above, we can happily go about replacing ##k^2## by ##k_\nu k^\nu## and obtain
$$
k^2 V^2 = k_\nu k^\nu V_\mu V^\mu,
$$
which cannot be mistaken for ##k_\mu k^\nu V^\mu V_\nu = (k\cdot V)^2##. If you end up with an expression where an index appears more than twice, trace your steps back to the last point where this did not happen and examine how this error appeared. Once found, make sure that you are not using the same summation index for different sums or using the same letter for a summation index as for one of your free indices.

6. You shall not sum over two covariant indices. Nor shall you sum over two contravariant indices.

Yes, index placement matters! At least if you care about your expressions is independent of the coordinate system you are using. When you change coordinate systems, the contraction between a covariant and a contravariant index leads to a simple contraction between a covariant and a contravariant index in the new coordinate system as well, just based on the chain rule for derivatives. For example,
$$
V_\mu U^\mu = V_{\mu’} \frac{\partial x’^{\mu’}}{\partial x^\mu} U^{\nu’} \frac{\partial x^\mu}{\partial x’^{\nu’}}
$$
(note how we needed to introduce two different primed indices to avoid four ##\mu’##), where the chain rule gives us
$$
\frac{\partial x’^{\mu’}}{\partial x^\mu}\frac{\partial x^\mu}{\partial x’^{\nu’}} = \delta^{\mu’}_{\nu’}
$$
and therefore
$$
V_\mu U^\mu = V_{\mu’} U^{\nu’} \delta^{\mu’}_{\nu’} = V_{\mu’} U^{\mu’}.
$$
If you had two covariant indices, you would instead end up with
$$
V_\mu U_\mu = V_{\mu’} \frac{\partial x’^{\mu’}}{\partial x^\mu} U_{\nu’} \frac{\partial x’^{\nu’}}{\partial x^\mu}
$$
with no possibility to apply the chain rule to get rid of the partial derivatives. The same holds for cases where you have two contravariant indices.

There are a few caveats and exceptions to this commandment. In particular, if you are working exclusively in Cartesian coordinates then covariant and contravariant components transform in exactly the same way and you can happily go about forgetting this rule. In fact, it is common to not care about index placement at all in that situation, but it can be good practice to do so anyway. Furthermore, some authors of advanced texts (such as Matthew Schwartz’s quantum field theory book) assume that you are familiar with this and that it goes without saying that one index should be covariant and the other contravariant in a contraction (and that it does not matter which of the pair is up or down) and go on to write all indices down. I do not recommend doing this until you are comfortable enough with index expressions to do so safely.

7. When there are two occurrences of an index in your expression, you shall not rename them to something that already exists in your expression

This is really a corollary to the idea of not having more than two of any index in your expressions but deserves some attention on its own. It is fine to rename summation indices to your heart’s content, as long as you do not rename them to something that already exists in your expression. Consider the expression ##V_\mu U^\nu W_\nu##. You might think that, since ##\nu## is a summation index, you could rename it to ##\mu## and obtain ##V_\mu U^\mu W_\mu##, but clearly, you then run into the problem of having more than two ##\mu## and not knowing which of the covariant indices should be contracted with the contravariant one.

There is an important caveat to this commandment: You are free to switch the names of two sets of summation indices. For example, in the expression ##F_{\mu\nu} F^{\mu\nu}##, it is perfectly fine to do the exchange ##\mu \leftrightarrow \nu## to obtain
$$
F_{\mu\nu} F^{\mu\nu} = F_{\nu\mu} F^{\nu\mu}
$$
as the sums remain the same and you do not end up with more than two of the same index. If you feel uncomfortable with this, you can do it in three steps using a temporary index name ##\sigma## according to
$$
F_{\mu\nu} F^{\mu\nu} = F_{\sigma\nu} F^{\sigma\nu} = F_{\sigma\mu} F^{\sigma\mu} = F_{\nu\mu} F^{\nu\mu}.
$$
The first step replaces ##\mu## by ##\sigma## (allowed since there is no other ##\sigma## in the previous expression), the second replaces ##\nu## by ##\mu## (allowed since there no longer is a ##\mu##), and the third replaces ##\sigma## by ##\nu## (allowed since there was no longer a ##\nu##). I suggest that you do it this way until you feel comfortable with just switching the indices around.

8. You shall not differentiate with respect to an already existing index unless that index is a free contravariant index and you are taking the divergence

This is also something of a corollary of the no-more-than-two-of-the-same-index commandment but also deserves its own mention as it is a common occurrence. If you are taking a derivative with respect to ##x^\mu##, then you cannot have other ##\mu##s in your expression, with the only exception being when you are computing a divergence. In particular, it is common to see errors in the form
$$
\partial_\mu(U\cdot V) = \partial_\mu (U_\mu V^\mu),
$$
which again is nonsensical. The solution is the same as before, use a different summation index when writing down ##U\cdot V## on component form, for example
$$
\partial_\mu (U\cdot V) = \partial_\mu (U_\nu V^\nu).
$$
As usual, go back to the last point where you had no more than two of each index and correct the mistake there.

9. You shall be free to compute scalar expressions in any coordinate system

This is one of the wonderful things about vector and tensor calculus. Scalars are invariant and will have the same value in any coordinate system. This is true even when you are adding different scalar expressions. Unfortunately, this point is often not appreciated enough by students who insist on computing all their scalars in the same coordinate system, which can make computations significantly more difficult. A typical example would be the computation of the center-of-mass energy of a two-particle system where the particles have 4-momenta ##p## and ##k##, respectively. We would find that
$$
E_{\rm CoM}^2 = (p+k)^2 = p_\mu p^\mu + 2p_\mu k^\mu + k_\mu k^\mu.
$$
Each of the terms in this expression can be computed individually and each is independent of the coordinate system used. Do not hesitate, compute each term in the frame where it is most convenient to do so.

10. You shall not confuse tensorial and non-tensorial quantities

The components of tensors follow very particular transformation rules that lead to tensor equations being covariant, i.e., taking the same form in all coordinate systems. However, remember that everything with indices is not a tensor. This includes both coordinates and their partial derivatives with respect to other coordinates. In particular, while tensor components inherently belong to one basis, the partial derivatives that appear in the transformation rules give you the relation between two different bases. Unfortunately, you sometimes see students mixing these things up and writing down transformation rules for the coordinates as if they were the components of a tensor and so on, i.e., I have seen things like
$$
x’^{\alpha’} = \frac{\partial x’^{\alpha’}}{\partial x^\beta} x^\beta.
$$
This is only true if the coordinate transformation is linear, i.e., if
$$
x’^{\alpha’} = \Lambda^{\alpha’}_{\beta} x^\beta
$$
for some fixed non-degenerate ##\Lambda^{\alpha’}_\beta##. As a counter example, consider polar coordinates ##r## and ##\phi## in the plane for which
$$
x = r \cos(\phi) \quad \mbox{and} \quad y = r \sin(\phi)
$$
but the relation above would give
$$
x = \frac{\partial x}{\partial r} r + \frac{\partial x}{\partial \phi} \phi = r \cos(\phi) – r \phi \sin(\phi)
$$
and similarly for ##y##.

Parting Words

Manipulating index expressions is a headache for many students, even if you are struggling you should know that you are not alone. I have seen each and every one of the above mistakes and misconceptions countless times with different students. However, if you are aware of and follow these commandments (especially the fifth!), your ability to confront difficulties should get at least a small boost. If you work systematically and patiently, thinking about the meaning of each step if you need to, you will get it right in the end.

 

 

16 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply