Vectors and Matrices Notes.: 1 Index Notation
Vectors and Matrices Notes.: 1 Index Notation
Jonathan Coulthard
[email protected]
1 Index Notation
Index notation may seem quite intimidating at first, but once you get used to it, it will allow
us to prove some very tricky vector and matrix identities with very little effort. As with most
things, it will only become clearer with practice, and so it is a good idea to work through the
examples for yourself, and try out some of the exercises.
You are probably used to multiplying matrices by visualising multiplying the elements high-
lighted in the red boxes. Written out explicitly, this is
If we were to shift the A box and the b box down one place, we would instead get
1
It should be clear then, that in general, for the ith element of b, we can write
Note that if the matrix A had only one column, then i would take only one value (i = 1).
b would then also only have one element (b1 ) making it a scalar. Our matrix-column vector
product would therefore reduce exactly to a dot product. In fact, we can interpret the elements
bi as the dot product between the row vector which is the ith row of A, and the column vector
x.
I have once again marked with a box the way that you are probably used to seeing these
multiplications done. Explicitly,
As with the previous example, you might interpret C23 as the dot product between the row
vector A3i , and the column vector Bi2 , i.e.
X
C23 = A2k Bk3 (10)
k
The rule for matrix multiplication is: “make the inner index (k, in this case) the same, and sum
over it.”
2
First, let’s take the definition of the matrix product (in index form) and plug it into the definiton
of the trace, i.e. plug X
Cij = Aik Bkj (14)
k
into X
Tr(C) = Cii . (15)
i
We obtain !
X X
Tr(AB) = Aik Bki (16)
i k
Now Aik , and Bki are just scalars (i.e. single elements of the matrices A and B respectively),
and so we can commute them.
!
X X
Tr(AB) = Bki Aik (17)
i k
Now, the thing inside the brackets is almost a matrix product, but we are summing over the
wrong index (the outer index rather than the inner one). The question is, can we swap the
order of the two summations? Because addition is commutative (a + b = b + a), we can 1 .
Exercise: By writingPout thePsums with a small number of terms, convince yourself that you
can indeed commute i and k .
P P
Finally, by swapping i and k , we obtain
!
X X
Tr(AB) = Bki Aik ,
k i
X
= (BA)kk ,
k
= Tr(BA). (18)
Exercise: Now try a slightly more complicated example for yourself. Using index notation,
prove that Tr(AB · · · YZ) is invariant under cyclic permutations of the matrices.
3
• If an indexPappears twice in a term, then it is implied that we sum over it. For example,
Aij Bjk ≡ j Aij Bjk .
This is a very powerful convention that you will use extensively when you learn special and
general relativity in your third year. However, in the immediate future, it can also make proofs
of various matrix and vector identities very easy! For instance our proof of Tr(AB) = Tr(BA).
can be written as
Tr(AB) = Aik Bki
= Bki Aik (22)
= Tr(BA). (23)
(Note that in a problem sheet, or in an exam, you should explain each line in this proof—the
notation makes it look much more trivial than it really is!)
1.1.1 Tips
As a wise man once said: “With great power comes great responsibility.” While Einstein sum-
mation convention can indeed make our lives much easier, it can also produce a great deal of
nonsense if you are not very careful when keeping track of your indices. Here are some tips for
doing so:
• Free indices appear only once in an expression and thus are not summed over. Dummy
indices appear twice, and are implicitly summed over.
• To help avoid confusion, it is a good idea to use roman letters (i, j, k) for free indices, and
greek letters (λ, µ, ν) for dummy indicies.
• Dummy indices should never appear in the “final answer”.
• The free indices should always be the same in every term in an expression.
• An index should never appear more than twice in a single term.
(since the only nonzero term in the sum is j = n). If we were to use Einstein summation
convention, then we would write the above as
aiµ δµn = ain . (26)
As another example, the scalar product between two vectors a · b can be written as:
a · b = aµ bν δµν = aµ bµ (27)
Where the δµν forces the indices of a and b to be equal.
4
1.1.3 The Levi-Civita symbol
The Levi-Civita symbol, εijk is another handy object. It is defined as
1,
if ijk is a cyclic permutation of 123
εijk = −1, if ijk is an anticyclic permutation of 123 (28)
0, if any two of i, j, or k are equal.
Why is such a thing useful? Well, let’s consider the object εiµν aµ bν . It has one free index, i, so
it is a vector. What are its components? If we set i = 1, from the definition of ε we see that
the only nonzero terms in the sum will be µ, ν 6= 0. This leaves us with µ, ν = 2 or 3. Writing
out these components explicitly, we find
Which you probably recognise as the first component of the vector a × b. Indeed, if we go
through the components, we will indeed find that
The proof of this identity is just the evaluation of all of the cases (thankfully most of them are
zero!).
Exercise: Prove the identity (32).
a · (b × c) = ελµν aλ bµ cν (33)
= ενλµ aλ bµ cν (34)
= ενλµ cν aλ bµ (35)
= c · (a × b) (36)
We immediately see that (since everything on the right commutes), cyclicly permuting the
vectors corresponds to cyclicly permuting the indices λµν in the ε. Since λµν is unchanged
under cyclic permutations, a · (b × c) is unchanged under cyclic permutations of the vectors!
Exercise: Which of the following expressions are valid? If possible, write them in matrix-
column vector notation. If they are not valid, why not?
1. ∇µ xµ
2. Aiσ xσ
3. ελµν xλµ
5
4. ai bj + ck dj
5. εiµν ενσρ aµ bσ cρ
You now might want to go back and have a look at the problem sheet from week 2 “Vectors
and matrices I” (specifically, Q. 24 of the class problems) for some more practice. Try proving
them all with index notation and Einstein summation convention!