# How to maximize the generalized Rayleigh Quotient when both numerator and denominator have summation

The objective function is defined as $$R(\mathbf{x}_i) = \frac{\sum_{i=1}^{M}\mathbf{x}_i^H\mathbf{A}_i\mathbf{x}_i}{\sum_{i=1}^{M}\mathbf{x}_i^H\mathbf{B}_i\mathbf{x}_i}$$ where $$\mathbf{x}_i\in\mathbb{C}^{N\times 1},\forall i=1\ ...\ M$$, $$\mathbf{A}_i \in\mathbb{C}^{N\times N},\forall i=1\ ...\ M$$ is a positive semidefinite matrix, and $$\mathbf{B}_i \in\mathbb{C}^{N\times N},\forall i=1\ ...\ M$$ is a positive definite matrix. I have studied how-to-maximize-generalized-rayleigh-ratio, and follow its procedure: $$\alpha = \sum_{i=1}^{M}\mathbf{x}_i^H\mathbf{A}_i\mathbf{x}_i \\ \beta = \sum_{i=1}^{M}\mathbf{x}_i^H\mathbf{B}_i\mathbf{x}_i \\ R = \lambda = \frac{\alpha}{\beta}$$ Take the gradient of $$\lambda$$ (with respect to $$\mathbf{x}_i$$) and set it to zero \begin{aligned} \nabla \lambda &=\frac{\beta \nabla \alpha-\alpha \nabla \beta}{\beta^{2}}=0 \\ \beta \nabla \alpha &=\alpha \nabla \beta \Rightarrow (\sum_{i=1}^{M}\mathbf{x}_j^H\mathbf{B}_j\mathbf{x}_j) \mathbf{x}_i^H\mathbf{A}_i = (\sum_{j=1}^{M}\mathbf{x}_j^H\mathbf{A}_j\mathbf{x}_j) \mathbf{x}_i^H\mathbf{B}_i\\ \nabla \alpha &=\lambda \nabla \beta \\ \mathbf{x}_i^H \mathbf{A}_i &= \lambda \mathbf{x}_i^H \mathbf{B}_i \\ \mathbf{x}_i^H \mathbf{A}_i \mathbf{B}_i^{-1} &=\lambda \mathbf{x}_i^H \\ \mathbf{B}_i^{-1}\mathbf{A}_i\mathbf{x}_i &= \bar{\lambda}\mathbf{x}_i \end{aligned} Then, to maximize $$R$$, $$\mathbf{x}_i$$ is the eigenvector of $$\mathbf{B}_i^{-1}\mathbf{A}_i$$ corresponding to its maximum eigenvalue.

Specifically, $$\mathbf{A}_i$$ can be expressed as $$\mathbf{A}_i=\mathbf{a}_i\mathbf{a}_i^H$$, where $$\mathbf{a}_i\in\mathbb{C}^{N\times 1}$$, and $$\mathbf{x}_i = \gamma\mathbf{B}_i^{-1}\mathbf{a}_i$$, where $$\gamma$$ is an arbitrarily nonzero number. Subsitituting $$\mathbf{A}_i=\mathbf{a}_i\mathbf{a}_i^H$$ and $$\mathbf{x}_i = \gamma\mathbf{B}_i^{-1}\mathbf{a}_i$$ into $$\beta \nabla \alpha =\alpha \nabla \beta$$ results $$(\sum_{i=1}^{M}\mathbf{a}_j^H\mathbf{B}_j^{-1}\mathbf{a}_j) \mathbf{a}_i^H\mathbf{B}_i^{-1}\mathbf{a}_i\mathbf{a}_i^H = (\sum_{j=1}^{M}\mathbf{a}_j^H\mathbf{B}_j^{-1}\mathbf{a}_j\mathbf{a}_j^H\mathbf{B}_j^{-1}\mathbf{a}_j) \mathbf{a}_i^H$$ However, this equation does not hold.

When there is no summation (the case in how-to-maximize-generalized-rayleigh-ratio), i.e., $$\mathbf{a}_i = \mathbf{a}, \mathbf{B}_i = \mathbf{B}, \mathbf{x}_i = \mathbf{x}, \forall i = 1\ ...\ M$$, the above equation holds. I don't know which step is wrong, can someone help me with that? Thanks.

$$\def\A{{\cal A}} \def\B{{\cal B}} \def\x{{\tt x}} \def\LR#1{\left(#1\right)} \def\size#1{\operatorname{size}\LR{#1}} \def\m#1{\left[\begin{array}{c}#1\end{array}\right]}$$This is a bit too big for a comment, but...
you can get rid of the indexes by defining partitioned matrix and vector variables \eqalign{ \A = \m{ A_{1}&0&\ldots&0 \\ 0&A_{2}&\ldots&0 \\ \vdots&\vdots&\ddots&\vdots \\ 0&0&\ldots&A_{m} \\ } \qquad \B = \m{ B_{1}&0&\ldots&0 \\ 0&B_{2}&\ldots&0 \\ \vdots&\vdots&\ddots&\vdots \\ 0&0&\ldots&B_{m} \\ } \qquad \x &= \m{x_1\\x_2\\ \vdots\\x_m } \\ } Then \eqalign{ R \;=\; \frac{\x^T\A\x}{\x^T\B\x} \\ } and you can apply the methodology of the linked post.
• Thanks for your reply. I have thought it carefully. If I combine the matrices and vectors, I can find the optimal $\mathbf{x}$ that maximize R, then the corresponding $\mathbf{x}_i$ can be got. But it is equivalent to finding the optimal $\mathbf{x}_i, \forall i =1\ ...\ M$ directly from the original R?
• @ZYX The above method is different from calculating the $x_i$ individually from $B_i^{-1}A_ix_i=\lambda_ix_i$ because the component-wise approach neglects the summations which occur in the numerator and denominator. Whereas the block partitioned approach incorporates those summations.