# Express in terms of the spectral decomposition of $A$ the set of $x, y$ for which an inequality is satisfied

I'm confused by this problem:

Let $A \in \mathbb{C}^{n \times n}$ be diagonalizable with eigenvalues $0 \leq \lambda_1 \leq \cdots \leq \lambda_n$. Express in terms of the spectral decomposition of $A$ the set of vectors $x$ and $y$ such that $$\lambda_1 \leq \frac{x^t \cdot A \cdot y}{x^t \cdot y} \leq \lambda_n$$

I don't really get what the problem is asking. I am guessing that $A$ is hermitian (although this wasn't mentioned!). The spectral theorem says that there is a basis $v_1, ... , v_n$ of eigenvectors of $A$ which is also an orthonormal basis.

I'm guessing what we have to do is write $x$ and $y$ in terms of this basis, say $x = c_1v_1 + \cdots + c_nv_n$ and $y = a_1v_1 + \cdots + a_nv_n$ (and I'm guessing $x$ and $y$ have to have real entries? I don't know!). Let $d_i = a_ic_i$, so $$\delta := x^t \cdot y = d_1 + \cdots + d_n$$

I first considered the case where $\delta > 0$. Then the problem is asking when $$0 \leq (\lambda_2 - \lambda_1)d_2 + \cdots + (\lambda_n - \lambda_1)d_n \leq (\lambda_n - \lambda_1)d_1 + \cdots + (\lambda_n - \lambda_1)d_n$$

I am kind of stuck here. Any suggestions on what I should do next/what the problem is actually asking for?

Preliminary remark: IMHO, this question looks rather non standard (as you say, one can assume $A$ hermitian ; frankly, I dont know very well what kind of answer is desired ; nevertheless, here is an attempt).

A first reaction of mine has been to think to the classical theorem on "Rayleigh quotient" : the set of of values taken by $\dfrac{X^TAX}{X^TX}$ is the whole interval $[\lambda_1,\lambda_n]$ using convexity arguments.

This result amounts to say that taking $X=Y$ gives a whole set of solutions.

But, assuming $A$ symmetrical, this can be generalized under the form of the following necessary and sufficient condition:

All coefficients $\dfrac{x_i y_i}{S}$ have to be positive, where $x_i$ (resp. $y_i$) are the coeff. of $Px$ (resp. $Py$) (with $P$ defined below), where $S:=\sum_{i=1}^n x_iy_i$, where $P,D$ are such that $A=P^TDP$, where $D=diag(\lambda_1, \cdots \lambda_n)$ with $P^T=P^{-1}$.

Here is a proof:

$$\frac{x^T \cdot A \cdot y}{x^T \cdot y}=\frac{x^T \cdot P^TDP \cdot y}{x^T \cdot P^TP\cdot y}=\frac{(Px)^T D (Py)}{(Px)^T (Py)}$$

You end up with the following combination:

$$\sum_{i=1}^n \dfrac{x_i \lambda_i y_i}{S}=\sum_{i=1}^n \lambda_i \dfrac{x_iy_i}{S} \ \ \ (1)$$

Remark: in fact, $P$ being invertible, the $x_i$s and $y_i$ can be any numbers.

Result (*): As (1) is a barycentric combination of the $\lambda_i$s (the sum of coefficients of the $\lambda_i$ is 1), the quotient in (1) can take all real values (see proof below).

But, if one desires that the quotient is confined into interval $[\lambda_1,\lambda_n]$, one has to impose that all coefficients $\dfrac{x_i y_i}{S}$ are positive.

Proof of (*): Take the case $n=2$.

Consider $(x_1,x_2)=(a,1-a)$, $(y_1,y_2)=(1,1)$; thus $S=1$ and the quotient is

$$a\lambda_1+(1-a)\lambda_2=\lambda_2+a(\lambda_1-\lambda_2) \ \ \ (2)$$

If we assume that $\lambda_1<\lambda_2$, the set of values taken by (2) is the whole real line $\mathbb{R}$.

(an immediate extension to the general case can be made along the same lines).