You are on page 1of 4

Vectors & Matrices : suffix notation

A common early vectors question is prove that a (b c) = (a c)b (a b)c, and a typical
first attempt will go something like:

Since x y = (x2 y3 x3 y2 , x3 y1 x1 y3 , x1 y2 x2 y1 ), the first components of each side are

LHS : a2 (b c)3 a3 (b c)2 = a2 (b1 c2 b2 c1 ) a3 (b3 c1 b1 c3 ) = a2 b1 c2 a2 b2 c1 a3 b3 c1 + a3 b1 c3

RHS : (a1 c1 + a2 c2 + a3 c3 )b1 (a1 b1 + a2 b2 + a3 b3 )c1 = a2 b1 c2 + a3 b1 c3 a2 b2 c1 a3 b3 c1

These agree. The other components are similar.

This is true, but wouldnt it be nicer if we could prove it more concisely, or for every component at
the same time? Then we wouldnt have to rely on the other components being similar. The idea
is to try to prove a general result for the ith component, where we can then substitute in i = 1, 2, 3
at the end, as we wish.

Note. Im going to work in three dimensions throughout, to keep the explanations simpler.

Suffixes

Lets use suffixes to refer to the entries in a vector or a matrix. Thus, for example:

Given a vector v, let vi be its ith component.

Given a matrix M, let mij be its (i, j)th entry - that is, in the ith row and j th column.

Note. We dont have to (and wont always) use i or ij here. We could write vk for the k th component
of v, or m for the entry in the th row and th column of M. (Just dont try pronouncing th .)

Examples

So far, thats just notation, and it should be familiar. For example

P3
1. Scalar (dot) product: a b = a1 b1 + a2 b2 + a3 b3 = i=1 ai bi .
2. Multiplying a matrix by a vector. Given a matrix M and a vector v, when we work out the
first component of Mv, we dot the first row of M with v. Similarly, when we work out the
ith component of Mv, we dot the ith row of M with v :

... ... ... v1 ...
Mv = mi1 mi2 mi3 v2 = mi1 v1 + mi2 v2 + mi3 v3
... ... ... v3 ...
P3
So the ith component of Mv is (Mv)i = mi1 v1 + mi2 v2 + mi3 v3 = j=1 mij vj .
Note. This is an important example, and it appears Poften. For example, if we have the vector
equation v = Mv, then in suffixes it becomes vi = mij vj .
3. Multiplying a matrix by a matrix. Given matrices M and N, when we work out the (i, j)th
entry of MN, we dot the ith row of M with the j th column of N.
P
Do this, and write it as of something concise involving suffixes.
P
Common mistake. The answer is not Mij Nij , and if you followed the dotting a row
with a column reasoning, you shouldnt have got this. However, when dealing with suffix
expressions later on, many people forget where (M N )ij comes from, and just write down this
wrong expression. Dont do that!

1
Summation convention

In
P3each of the P3examples above, the summation is performed over a suffix that appears twice:
a b
i=1 i i or j=1 mij vj . This happens so often that we turn it into a rule, and a very useful
piece of shorthand: if we appear to be multiplying two terms containing the same suffix, then
actually we sum those terms over that suffix.
P3
So, rather than writing i=1 ai bi , we can just write ai bi , and think to ourselves we are summing
P3 P3 P3
over i here. However, we see that i=1 ai bi = j=1 aj bj = =1 a b = . . . = a1 b1 + a2 b2 + a3 b3 .
The summation letter is just a name internal to the sum, and we get the same result no matter
which we use. Therefore, in summation convention, ai bi = aj bj = a b = . . ..

A suffix that appears twice like this is called a dummy suffix, as its name doesnt really matter
providing it doesnt cause confusion with other suffixed terms. (Confusion could arise if we had
ai bi cj and wanted to rename i. We could pick any letter we liked except j, that is.)

A suffix that appears on its own in a term is called a free suffix, because we are free to choose
its value if we want to work out a specific component. For example: a = (b c)d. Here, each
component of d is scaled by the same factor to get a, so a1 = (b c)d1 , etc. In suffix notation,
we write ai = bj cj di . The suffix i is free, and we are free to set i = 1, 2, 3 to work out specific
components. But bj cj is always the same value, and we have no choice to make.

Notes

Remember that the summation convention applies when we appear to be multiplying two terms
containing the same suffix. If were summing two terms containing the same suffix, then there is
th
no summation. For example, the iP component of a + b is ai + bi , just the sum of the individual
th
i components. It certainly isnt (ai + bi ).

So, if ai bi means we sum, how do we refer to the single product of two ith components, such as ai
times bi ? We could say the ith product ai bi or ai bi (no summation).

Common mistake. It is perfectly fine for a final answer to be, say, an ith component. However,
some people tend to panic and think that a final answer should be a definite number or vector,
and end an answer with something like . . . = ai = a1 + a2 + a3 = a. Both final equalities here
are incorrect: ai is simply the ith component, not the sum of all three, and neither of those is the
vector itself! If the answer is ai , then so be it, and leave it as that.

Examples

1. The earlier examples: a b = ai bi (or aj bj , etc), and (Mv)i = mij vj (or mi v , etc).
P P
2. ai bj cj = j ai bj cj = ai ( j bj cj ) = (b c)ai
3. In terms of vectors and matrices, what are a b c d and mjk vj vk ?

Beware the three i-ed monster


P3
What about three suffixes? What might ai bi ci mean? It could be defined to mean i=1 ai bi ci .

However, this turns out to cause more trouble than its worth, as it very rarely happens that we
multiply three things together simultaneously. For example, if were multiplying three matrices
A, B, C, we actually just do (AB)C or A(BC).

It would also conflict with our current two-suffix summation convention, which would like to pair two
of those i suffixes up into a sum. But then, does ai bi ci mean (ai bi )ci = (ab)ci or ai (bi ci ) = (bc)ai ?
It doesnt work.

2
So the simple rule here is: if you are using this summation convention and have three (or more)
subscripts the same, then you have gone wrong. Its no use claiming that you know which ones
are being summed: youPhave gone wrong. If we really do need to sum over a three-suffixed thing,
then we have to write i ai bi ci . Thats perfectly valid we just cant use our handy summation
convention.

What if were given x = ai bi and y = ci di and are asked to work out xy? Remember that these are
dummy labels, and that ci di = cj dj = c d = . . .. So lets write y as cj dj , which is the same thing,
and we get xy = ai bi cj dj .
P P P
If in doubt, we canPrevert to
Pwriting in P the inPthe expressions. So x = i ai bi and y = i ci di ,
and we get xy = ( i ai bi )( i ci di ) = ( i ai bi )( j cj dj ). So because its just being used to count
through a sum, we can always relabel a dummy suffix. If we think that theres even a chance of a
collision, rename the dummy i to p, or k to . (But dont cause new collisions, of course!)

A useful check. If were trying to work out, say, the (i, j)th entry of some matrix using suffix
notation. Then at every stage in our calculations, the subscripts i and j must appear in each term
being summed exactly once, while any other subscript that appears must do so exactly twice. If
your answer is going wrong, stop and count the number of times each appears.

Exercise. Show that for matrices A, B, C (of suitable sizes), we do have (AB)C = A(BC).

Kronecker Delta

Next, ij . This has probably been defined as: ij = 1 if i = j, and 0 if i 6= j.

Consider the expression ij vj . This is a sum over the j suffix, so is: i1 v1 + i2 v2 + i3 v3 . We dont
actually know what i is. If i = 1, then only the i1 term is non-zero, and the sum is v1 . Similarly
if i = 2 or 3. In other words, whatever i is, the sum ij vj equals vi .

Consider the sillier expression ij bpqjr . This thing b is some nonsense Ive made up its probably
some weird four-dimensional thing. But we can do the sum: i is fixed at some value, and so for
most of the time j wont equal it, giving us 0. But, for the one occasion when j = i, the part
equals 1, and the b part is bpqir , whatever that means. Thus ij bpqjr = bpqir .

We get the useful mnemonic: ij turns a j into an i.

What if we apply it to something with an i instead? What is ij vi ? For exactly the same reasons,
we get vj . So in fact, our useful mnemonic is ij turns a j into an i, or an i into a j, whichever it
meets.

But hang on, what if it meets both of them? What is ij ai bj ? Then were summing over both i
and j. We could do the i sum first, then the j sum. Or we could do the j sum first, then the i sum.
Do both and make sure you get the same answer!

You should find that the ij is used up in turning an i into a j (or vice versa), and we cant use
it again. (Indeed, ij ai bj is not equal to aj bi .)

Delta as a matrix?

You might be thinking (hopefully) that the expression ij vj looks an awful lot like the matrixvector
expression from early on: mij vj , which is the ith component of Mv.

So what is happening with ij vj ? Well, ij has two suffixes, so looks like it might be the component
of a matrix. And if its 0 when i 6= j and 1 when i = j, it sounds a lot like the identity matrix I.
So lets say that it is.

3
In which case, ij vj must surely be the ith component of Iv, which is just vi . That agrees with our
suffix calculation above, but have we really spent all this effort just to find a fiddly way of writing
Iv = v?

It turns out to be more useful than that. For example, suppose we are trying to use suffixes to
simplify some matrixvector equation involving something like v + Mv. Then we could write it as
(I + M)v, by replacing the v by Iv, which is the effect of the . We will often be taking vectors
and doing things to them, and this will be very helpful.

Epsilon

Now, this one looks a bit weird at first. It has three suffixes, so if we want to think of it as a sort
of matrix then well have to write down a cube of numbers. Its definition is:

ijk equals 1 if ijk = 123, 231, 312, equals 1 if ijk = 321, 132, 213, and equals 0 otherwise (i.e., if
two suffixes are the same).

One very useful feature of ijk is that it allows us to introduce anti-symmetry into our expressions.
For example, when we work out a determinant or vector product, half of the terms are subtracted.
And indeed, we can now write both of those in a concise summation form.

Example. We can write (a b)i = ijk aj bk .

The best way to convince yourself would be to try it. Lets set i = 1. The right hand side is a sum
of nine terms, as were summing over all j, k = 1, 2, 3. However, if two suffixes are ever equal, the
term is 0. So, since i = 1, we lose the terms with j or k equal to 1. And we also lose the terms
with j = k = 2 or j = k = 3. This leaves just 123 a2 b3 + 132 a3 b2 , which (checking the definition of
) is a2 b3 a3 b2 , which is correct.

Exercise. Let M be a matrix whose rows are the vectors a, b, c. Then det M = ijk ai bj ck . Verify
this. (The sum contains 27 terms, but many of them are 0.)

A useful formula

and join up in the following very useful formula: ijk ilm = jl km jm kl .

Ive included this section entirely to try to help people remember the formula, since many often get
the thing mixed up. It would be dangerous to remember it exactly as written there, since we might
not get those exact subscripts: we might get or even imk ijl .

Below is the mnemonic I use, which you might find helpful.

By the definition of , we can cycle the labels around: so abc = bca = cab . So, if we have a
double- expression with a shared suffix then we can cycle the subscripts around until the shared
suffix is the first of each. That is, if we see kij lmi , write it as ijk ilm .

Then think to yourself same minus different. That is, once the first subscripts of each are the
same, the first two terms are formed from the two second-place suffixes paired up, then the two
third-place suffixes. The second two terms (the ones we subtract) are from the differents, i.e.
the two pairings of a second-place suffix with a third-place suffix.

I hope that makes sense!

Exercise. We began with a (b c) = (a c)b (a b)c. Verify this with suffixes.

Please send any corrections or comments to me at glt1000@cam.ac.uk

You might also like