about the maximum of a dot product

Let $\vec{a}=(a_1,a_2,\dots,a_n)$ be a given vector that satisfies $a_1+a_2+...+a_n=0$. Let $\vec{x}=(x_1,x_2,\dots,x_n)$ be an arbitrary vector that satisfies $x_1+x_2+...+x_n=0$, but we know $\|\vec{x}\|_2$.

Is there a tight upper bound for $(\vec{a}^T \cdot \vec{x})$ in terms of $a_1, a_2, \cdots, a_n$, and $\|\vec{x}\|_2$ ?

I know Cauchy-Schwarz inequality can produce an upper bound:

$$|\vec{a}^T \cdot \vec{x} | \le \|\vec{a}\|_2 \|\vec{x}\|_2 .$$

However, this bound seems not very tight and does not consider my constraints that $x_1+x_2+\dots+x_n=0$ and $a_1+a_2+\dots+a_n=0$. Any suggestion is appreciated.

• What do you mean that the Cauchy-Schwarz bound is not tight? It is saturated when x is a multiple of a, which seems to be allowed by your setup. Mar 13 '18 at 20:24

The bound may not seem tight, but take $$\vec{y} = \frac{\vec{a}}{\|\vec{a}\|_2} \|\vec{x}\|_2$$ Observe $\vec{y}$ satisfies both your conditions, and $|\vec{a}^T \cdot \vec{y}| = \|\vec{a}\|_2\|\vec{x}\|_2$, so the bound is tight.