In section 4.8 of Optimization Algorithms on Matrix Manifolds (3rd version), Absil, Mahony & Sepulchre define the cost function $$ f : \mbox{St} (p,n) \to \mathbb{R}, \qquad X \mapsto \mbox{tr} \left( X^{T} A X N \right)$$ with $N = \mbox{diag} \left(\mu_1, \ldots, \mu_p\right)$ with $0 \leq \mu_1 \leq \ldots \leq \mu_p$.
I would like to play around with this cost function term with explicit matrices. However, I am a bit unsure about this $N$ matrix. How does it look like and what are the $\mu_i$'s?
Before introducing this matrix cost function expression they say that "we now consider a cost function defined as a weighted sum" $$\sum_{i} \mu_i x^{T}_{(i)} A x_{(i)} $$ of Rayleight quotients on the sphere under and orthogonality constraint, $x^{T}_{i} x_{j}= \delta_{ij}$.