# Is This Contraction of a Tensor Allowed?

1. Jul 17, 2015

### Physicist97

Say you have a scalar $S=A^{\alpha}_{\beta}B^{\beta}_{\alpha}$ . Since this just means to sum over ${\alpha}$ and ${\beta}$ , is it allowable to rewrite it as $S=A^{\alpha}_{\alpha}B^{\beta}_{\beta}$ . I don't see anything wrong with this, I simply rewrote the dummy indices, but since I am not by far an expert I would like some confirmation.

2. Jul 17, 2015

### ShayanJ

They're both correct contractions but not equal to each other.
More precisely, $A^a_a B^b_b$ is the product of two scalars.
But $A^a_bB^b_a$ is different. Consider the tensor $S^{ad}_{bc}=A^a_b B^d_c$. Now if I contract a with c and b with d, I get$A^a_bB^b_a$. So here you're contracting a fourth order tensor twice, instead of multiplying two scalars where each is a contracted 2nd rank tensor.

3. Jul 17, 2015

### Fredrik

Staff Emeritus
Suppose e.g. that the indices run from 0 to 1. Then the former means $A^0_0 B^0_0+ A^0_1B^1_0 +A^1_0B^0_1+A^1_1B^1_1$ and the latter means $(A^0_0+A^1_1)(B^0_0+B^1_1)$, which is equal to $A^0_0B^0_0+A^0_0B^1_1+A^1_1B^0_0+A^1_1B^1_1$. The difference is $A^0_1B^1_0+A^1_0B^0_1-A^0_0B^1_1-A^1_1B^0_0$. This isn't always zero.

4. Jul 17, 2015

### Physicist97

Thanks for the quick replies. I understand now the mistake I made when I assumed the indices could be exchanged just because they were dummy indices.

5. Jul 17, 2015

### robphy

In matrix language,
the first is Trace(AB), and the second is Trace(A)Trace(B), which are generally not equal.