Why this optimization problem can be solved to global optimality using eigenvalue decomposition? The optimization problem is the following:
\begin{align} &\operatorname*{max}_{q_1 , \space q_2} & & \frac{q_1^{T}X^{T} Y q_2}{\sqrt{(q_1^{T} X^{T}Xq_1)(q_2^{T}Y^{T}Yq_2)}} & X \in \mathbb{R}^{m \times n_1} , Y \in \mathbb{R}^{m \times n_2}, q_1\in \mathbb{R}^{ n_1}, q_2\in \mathbb{R}^{ n_2} \end{align}
My thoughts
Turning the optimization to constrained as: \begin{align} &\operatorname*{max}_{q_1, \space q_2 } & & q_1^T A q_2 & where \space A=X^T Y \\ &\text{subject to} && \|\mathbf{q_1}\| = 1 \space ,\space \|\mathbf{q_2}\| = 1 \end{align}
*Taking the Lagrangian $\mathcal{L}=q_1Aq_2 -B_1 \|q_1\|-B_2 \|q_2\|$ and then taking the derivative of $\mathcal{L}$ with respect to $q_1$ and $q_2$ I got the follwoing:
\begin{align}
(A-\beta _1 I )q_1=0 \\
(A-\beta _2 I )q_2=0
\end{align}
The equation for eigen values of A. I have no idea if this is correct or how to continue.
Any help is appreciated!