I asked this on [math.StackExchange](https://math.stackexchange.com/questions/746724/powers-of-traces-integrals-over-spheres-and-class-functions) a while back but got no answers. I hope I'll be forgiven for the double post.


Let $V$ be a complex vector space of dimension $\operatorname{dim}\_{\mathbb C} V = n$, equipped with a Hermitian inner product $\langle \,\cdot\,,\,\cdot\, \rangle$, and $A$ be an endomorphism of $V$. I am interested in calculating the functional
$$
\alpha\_k(A) := \int\_{S^{2n-1}} \langle Av, v \rangle^k \, d\mu,
$$
where $d\mu$ is the Lebesgue measure induced by the inner product and $S^{2n-1}$ is the unit sphere with respect to that product. For $k = 1$, this functional is a nonzero multiple of the trace, as shown in [some](https://math.stackexchange.com/questions/62358/integral-around-unit-sphere-of-inner-product) [older](https://math.stackexchange.com/questions/592416/reference-request-trace-integral-formula) [questions](https://math.stackexchange.com/questions/738314/the-trace-as-an-integral-over-a-sphere) on math.SE. These kind of integrals pop up, for example, when we try to calculate the differential form that represents the $k$-th Segre class of a Hermitian holomorphic vector bundle.


Now, I don't really know any representation theory, but by extrapolating from one of the answers to the older questions the following should make a little sense: By polarizing we see that this functional is induced by the multilinear form
$$
\alpha\_k(A\_1, \ldots, A\_k)
= \int\_{S^{2n-1}} \langle A\_1v, v \rangle \cdots \langle Av\_k, v \rangle \, d\mu.
$$
This form is invariant under the action of $U(n) \times \cdots \times U(n)$ ($k$ times) on $\operatorname{Aut}(V^{\oplus k})$ (by conjugation on each factor), so $\alpha\_k$ should be a class function on that representation. As such, it should be a linear combination of the characters of the representation. This should mean that $\alpha\_k$ is a linear combination of the multilinear forms
$$
\def\tr{\operatorname{tr}}
\prod\_{|J|=k} \tr(A\_J),
$$
where we define $A\_J = A\_{j\_1} \cdots A\_{j\_k}$ for a multiindex $J = (j\_1,\ldots,j\_k)$. For $k = 2$, for example, these are
$$
\tr(A\_1^2), \quad \tr(A\_1) \tr(A\_2), \quad \tr(A\_2)^2.
$$
Of course, $\alpha\_k$ is a symmetric form, so there is some redundancy here ($\tr(A\_1^2)$ and $\tr(A\_2^2)$ must have the same coefficient in our hypothetical linear combination). 


We can calculate by brute force what happens in a special case here: Suppose $k = 2$ and $A$ is diagonalizable with eigenvalues $\lambda\_1, \ldots, \lambda\_n$. If $(e\_1,\ldots,e\_n)$ is an orthonormal basis of $V$ and $v = \sum z\_j e\_j$ a vector, we then have
$$
\langle Av,v \rangle = \sum\_{j=1}^n \lambda\_j |z\_j|^2, \quad
\langle Av,v \rangle^2 = \sum\_{j,k=1}^n \lambda\_j \lambda\_k |z\_j|^2 |z\_k|^2.
$$
Omitting some tedious calculations over the sphere, we then find that
$$
\eqalign{
\alpha\_2(A) 
= \int\_{S^{2n-1}} \langle Av,v \rangle^2 \,d\mu
&= \sum\_{j,k=1}^n \lambda\_j \lambda\_k \int\_{S^{2n-1}} |z\_j|^2 |z\_k|^2 \, d\mu
\cr
&= \frac{1}{n(n+1)}\sum\_{j,k=1}^n \lambda\_j \lambda\_k 
+ \frac{1}{n(n+1)} \sum\_{j=1}^n \lambda\_j^2
\cr
&= \frac{1}{n(n+1)}( \tr(A)^2 + \tr(A^2) ),
}
$$
as we suspected. Unfortunately, this direct approach is completely hopeless for higher $k$, so we must look for other ways to calculate the integral.


**Question** Can we make my representation-theoretic hand-waiving precise to (1) show the existence of the hypothetical linear combination and (2) actually determine the coefficients in that combination?



Powers of traces, integrals over spheres and class functions
Begin by rewriting $\alpha\_k(A\_1,\ldots,A\_k)$ as follows (just move integrals and traces around):
$$
\alpha\_k(A\_1,\ldots,A\_k) = \mathrm{tr}\Big( (A\_1 \otimes \cdots \otimes A\_k) \int\_{S^{2n-1}}(vv^\* \otimes \cdots \otimes vv^\*) d\mu \Big).
$$


Well, the integral on the right is well-known to be $P\_{sym}/\binom{n+k-1}{n-1}$, where $P\_{sym}$ is the projection onto the symmetric subspace (i.e., the subspace of $V \otimes \cdots \otimes V$ spanned by vectors of the form $v \otimes \cdots \otimes v$). We thus have
$$
\alpha\_k(A\_1,\ldots,A\_k) = \frac{1}{\binom{n+k-1}{n-1}}\mathrm{tr}\big( (A\_1 \otimes \cdots \otimes A\_k) P\_{sym} \big).
$$


One way to write $P\_{sym}$ is as
$$
P\_{sym} = \frac{1}{k!}\sum\_{\pi\in S\_k}W\_{\pi},
$$
where $W\_{\pi}$ is the unitary operator that permutes the $k$ tensor factors according to the permutation $\pi$ (and $S\_k$ is the symmetric group on $k$ symbols).


Thus
$$
\alpha\_k(A\_1,\ldots,A\_k) = \frac{1}{k!\binom{n+k-1}{n-1}}\sum\_{\pi\in S\_k}\mathrm{tr}\big( (A\_1 \otimes \cdots \otimes A\_k) W\_{\pi} \big).
$$


Finally, the trace on the right can be computed in terms of traces of the $A\_i$'s by breaking each $\pi$ into disjoint cycles and grouping the $A\_i$'s that are within a common cycle within one trace. For example, if $\pi = (1 2)(3 4 5)$ (in cycle notation) then
$$
\mathrm{tr}\big( (A\_1 \otimes \cdots \otimes A\_5) W\_{\pi} \big) = \mathrm{tr}(A\_1 A\_2)\mathrm{tr}(A\_3 A\_4 A\_5),
$$
and hopefully it is clear how this generalizes.




---


When $k = 2$, this gives
$$
\alpha\_2(A\_1,A\_2) = \frac{1}{n(n+1)}\big(\mathrm{tr}(A\_1)\mathrm{tr}(A\_2) + \mathrm{tr}(A\_1A\_2)\big),
$$
(the first term comes from the identity permutation, the second term comes from the transposition permutation) which agrees with the formula you found for the $k = 2$ case in your original post.




---


When $k = 3$, we get
$$
\alpha\_3(A\_1,A\_2,A\_3) = \frac{1}{n(n+1)(n+2)}\big(\mathrm{tr}(A\_1)\mathrm{tr}(A\_2)\mathrm{tr}(A\_3) + \mathrm{tr}(A\_1)\mathrm{tr}(A\_2A\_3) + \mathrm{tr}(A\_2)\mathrm{tr}(A\_1A\_3) + \mathrm{tr}(A\_3)\mathrm{tr}(A\_1A\_2) + \mathrm{tr}(A\_1A\_2A\_3) + \mathrm{tr}(A\_3A\_2A\_1)\big).
$$
Again, we get one term in the sum for each of the $k! = 6$ permutations, and hopefully it is clear how they arise from the cycle decompositions of those permutations, and it generalizes to higher $k$ straightforwardly.


