0
$\begingroup$

Suppose that $a_i \in \mathbb R$, and $\sqrt{ \sum_{i=1}^n x_i^2} = 1$, what is the maximum value and minimum value of $ \sum_{i=1}^n a_ix_i$

$\endgroup$
2
$\begingroup$

By the Cauchy-Schwarz inequality, one has $$|\sum_{i=1}^na_ix_i|\le \sqrt{\sum_{i=1}^na_i^2}\sqrt{\sum_{i=1}^nx_i^2}=\sqrt{\sum_{i=1}^na_i^2}$$ and "=" holds iff $$ x_i=\pm\frac{a_i}{\sqrt{\sum_{i=1}^na_i^2}}. $$ Hence $\sum_{i=1}^na_ix_i$ reaches the max $\sqrt{\sum_{i=1}^na_i^2}$ when $x_i=\frac{a_i}{\sqrt{\sum_{i=1}^na_i^2}}$, $i=1,2,\cdots,n$ and the min $-\sqrt{\sum_{i=1}^na_i^2}$ when $x_i=-\frac{a_i}{\sqrt{\sum_{i=1}^na_i^2}}$, $i=1,2,\cdots,n$.

$\endgroup$
  • $\begingroup$ I am also curious that when will $\sum_{i=1}^n a_ix_i = 0$? $\endgroup$ – koch Oct 6 '16 at 3:39
0
$\begingroup$

Think of this as a constrained optimization problem; you can use Lagrange Multipliers!

Note that all of what follows only works when $\vec{a}$ is not the zero vector; but, when all the $a_i$ are $0$, this problem is pretty boring.

We want to find minimum and maximum of $$ f(\vec{x})=\sum_{i=1}^{n}a_ix_i $$ subject to $$ g(\vec{x}):=\sum_{i=1}^{n}x_i^2=1. $$ Gradients are easy to compute here: $$ \nabla f=\vec{a},\qquad \nabla g=2\vec{x} $$ So, the Lagrange condition is $$ \vec{a}=2\lambda\vec{x}. $$ Note that $\lambda\neq0$, as $\vec{a}\neq \vec{0}$. So, we have $$ \vec{x}=\frac{\vec{a}}{2\lambda}. $$

Now, we know that $\lvert\vec{x}\rvert=1$, so that $\lvert\lambda\rvert=\frac{\lvert\vec{a}\rvert}{2}$; this leaves us with only two options for $\lambda$.

When $\lambda=\frac{1}{2}\lvert\vec{a}\rvert$, we get $$ \vec{x}=\frac{\vec{a}}{\lvert\vec{a}\rvert}, $$ and therefore $$ f(\vec{x})=\vec{a}\cdot\vec{x}=\frac{\vec{a}\cdot\vec{a}}{\lvert\vec{a}\rvert}=\lvert\vec{a}\rvert. $$ On the other hand, if we take $\lambda=-\frac{1}{2}\lvert\vec{a}\rvert$, we end up with $$ f(\vec{x})=\vec{a}\cdot\vec{x}=-\lvert\vec{a}\rvert. $$

These will be your max and min!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.