<s>[INST] Bound on $x^TAx$ for spd matrix $A$ in terms of diagonal Let $A\in\mathbb{R}^{n\times n}$ be a symmetric positive definite matrix and $x\in\mathbb{R}^n$ some vector. I want to find a bound of the form
$$x^T Ax \leq c \sum_{i=1}^n a_{ii} x_i^2$$
with a constant $c>0$.
If $\lambda_\text{min}$ and $\lambda_\text{max}$ denote the smallest and largest eigenvalue of $A$ (both are positive due to spd assumption), then one bound that holds is
$$x^T Ax \leq \frac{\lambda_\text{max}}{\lambda_\text{min}} \sum_{i=1}^n a_{ii} x_i^2.$$
Proof: $x^TAx \leq \lambda_\text{max} \Vert x\Vert^2 = \frac{\lambda_\text{max}}{\lambda_\text{min}} \sum_{i=1}^n \lambda_\text{min} x_i^2 \leq \frac{\lambda_\text{max}}{\lambda_\text{min}} \sum_{i=1}^n a_{ii} x_i^2$, where we used that $a_{ii} \geq \lambda_\text{min}$ for all $i$.
However, I think there should be a tighter bound. For example, the inequality holds with $c=1$ if $A$ is diagonal. Any ideas?
 [/INST] You can substitute $y_i = \sqrt{a_{ii}}\;x_i$. Then you are looking for the smallest $c$ with
$$
y^T
\begin{pmatrix} \frac{1}{\sqrt{a_{11}}} & & & 0 \\
& \frac{1}{\sqrt{a_{22}}} & & \\
& & \ddots & \\
0 & & & \frac{1}{\sqrt{a_{nn}}}
\end{pmatrix}
A
\begin{pmatrix} \frac{1}{\sqrt{a_{11}}} & & & 0 \\
& \frac{1}{\sqrt{a_{22}}} & & \\
& & \ddots & \\
0 & & & \frac{1}{\sqrt{a_{nn}}}
\end{pmatrix}
y
\leq c \| y \|_2^2 \;\;\forall y\in\mathbb{R}^n
$$
which is the largest eigenvalue of 
$$
\begin{pmatrix} \frac{1}{\sqrt{a_{11}}} & & & 0 \\
& \frac{1}{\sqrt{a_{22}}} & & \\
& & \ddots & \\
0 & & & \frac{1}{\sqrt{a_{nn}}}
\end{pmatrix}
A
\begin{pmatrix} \frac{1}{\sqrt{a_{11}}} & & & 0 \\
& \frac{1}{\sqrt{a_{22}}} & & \\
& & \ddots & \\
0 & & & \frac{1}{\sqrt{a_{nn}}}
\end{pmatrix}
$$
</s>