If my tensor $a^{\mu\nu}=$ matrix of 4*4 size (let's say, in 1+3 dimensions with mostly negative convention for the metric), what is $a^{\mu}_{\mu}$ ? Is it the trace or the vector of diagonal elements or the matrix containing only diagonal elements as the non-zero elements ?
[Physics] components of mixed tensor with same indices
differential-geometryelectromagnetismtensor-calculus
Best Answer
The general convention is that all repeated ("dummy") indices (and they had better only be repeated in pairs, one up, one down) are summed over. All remaining indices -- the "free" indices -- vary over all possible values.
So $a^{\mu\nu}$ is representable as a matrix not simply because it has two indices, but because it has two free indices. On the other hand, $a^\mu_\mu$ has no free indices and so must be a scalar. In particular, it is the trace of the rank-2 tensor $a$.
By the way, only symmetric tensors can unambiguously use overstacked indices in general. That is, unless $a^{\mu\nu} = a^{\nu\mu}$, you don't know whether $a^\mu_\nu$ refers to ${a^\mu}_\nu \equiv g_{\nu\lambda} a^{\mu\lambda}$ or ${a_\nu}^\mu \equiv g_{\nu\lambda} a^{\lambda\mu}$. In the special case of taking the trace it turns out not to matter, since $$ {a^\mu}_\mu \equiv g_{\mu\lambda} a^{\mu\lambda} \stackrel{\text{symmetry of $g$}}{\equiv} g_{\lambda\mu} a^{\mu\lambda} \equiv {a_\lambda}^\lambda \equiv {a_\mu}^\mu $$ always, but it's nonetheless rare to see $a^\mu_\mu$ written.
To summarize, $a^{\mu\nu}$, $a_{\mu\nu}$, ${a^\mu}_\nu$, and ${a_\mu}^\nu$ are all representable by (generally different) $4\times4$ matrices, while ${a^\mu}_\mu \equiv {a_\mu}^\mu \equiv a^\mu_\mu$ is simply a scalar, equal to the the trace of the matrices that represent ${a^\mu}_\nu$ or ${a_\mu}^\nu$ (these two matrices would be transposes of one another in any consistent way of assigning indices to rows/columns, and so have the same trace).