TITLE: What is contracting a tensor actually doing?
QUESTION [7 upvotes]: I'm learning about tensors, and have a vague idea regarding what contracting a tensor means—but I'm still not sure of exactly what it's doing. Maybe someone here can put it in more intuitive terms.
Say we have a $(k,l)$ tensor, $T^k_l$. This is some abstract mathematical structure which takes $k$ dual-vectors / covectors and $l$ vectors as "arguments" and spits out a number.
Contracting this tensor should give me a $T^{k-1}_{l-1}$ tensor, right? Where (using summation convention) we have something like:
$$T^{k_1}_{l_1} + T^{k_2}_{l_2} + ... + T^{k_3}_{l_3}$$
This is the $k_1$ covector acting on the $l_1$ vector.
I guess the more I think about it, the less I really know what contracting the indices of a tensor really means.
Could anyone give me a push in the right direction?

REPLY [2 votes]: It might be worth adding some material and corrections here, since this post comes up in searches. Firstly, the previous answer should read "the trace of $T$ is $n$ times the average value of $Q$ over the unit sphere," not $1/n$; this can be immediately seen by considering the identity matrix.
Here’s an alternative, possibly more explicit way of seeing this. If the tensor is defined on a real vector space with a positive definite inner product, then we can choose an orthonormal basis and ignore the raising and lowering of indices. The unit vectors satisfy $v^{a}v^{a}=1$. We want to calculate the average of $T_{ab}v^{a}v^{b}$. The average of $v^{a}v^{b}$ when $a\neq b$, e.g. $v^{1}v^{2}$, vanishes, since for every vector with a given value of $v^{1}v^{2}$, there is another reflected across the $x^{1}=0$ hyperplane with the negative of this value, and therefore the average of e.g. $T_{12}v^{1}v^{2}$ vanishes as well. The average of $v^{a}v^{b}$ when $a=b$, e.g. $v^{1}v^{1}$, must be $1/n$, since the sum $v^{a}v^{a}=1$ for each vector. Therefore the average of $T_{11}v^{1}v^{1}$ is $T_{11}/n$, and the sum of such elements $T_{aa}/n$ is the average of $T_{ab}v^{a}v^{b}$. The contraction can thus be viewed as "$n$ times the average of the tensor applied to the unit vectors."