07. Index notation
I can write the entries of an -by- matrix as Here denotes the entry sitting in the th row and the th column.
One advantage of writing matrices like this is that it gives a compact formula for operations like matrix multiplication: rather than writing out the full matrix , we can just write a formula for the th entry . Suppose that is -by- and is -by- .
To get , we need to multiply the th row of into the th column of , in other words: In this last step, we just introduced a "dummy index" to keep track of the terms in the sum. We now have a nice compact formula for the th entry of : it's .
Associativity of matrix multiplication
To demonstrate how useful index notation is, let's prove that matrix multiplication is associative, that is: We can just write out the formula for the th entry on each side and check they give the same answer. For the left-hand side: where we've used the formula for matrix multiplication twice (using all sorts of different letters). Note that the second time I use the formula, I can't use the letter for my dummy index because already means something in the expression; that's why I introduced .
For the right-hand side: We can take the factor inside the sum (just by multiplying out the whole expression), which gives:
This looks very similar to the formula for the left-hand side, but the indices and have been swapped. That doesn't matter: and are dummy indices, so we can just rename them. We'll relabel as and as : Finally, we can switch the order of the sums without worrying because they're finite sums. This gives exactly the same formula that we had on the left-hand side.
Index notation is very heavily used in subjects like general relativity. For example, the Riemann curvature tensor is an object with four indices, some up and some down!