In a textbook i'm reading, a maximization statement is given to maximize $a^Tx$ where the 2-norm of $x$ is smaller or equal than $c$, where $a$ and $x$ are vectors and $c$ is a scalar. The answer is included:
$$\max_{x:\|x\|_2 \leq c} a^T x = c \|a\|_2$$
There is no explanation given though. Why is this true?
The objective function $a^T x$ is the inner product of two vectors, and by definition, it equals $\Vert a \Vert \Vert x \Vert \cos(\theta)$, where $\theta$ is the angle between $a$ and $x$. Notice that $\theta$ can be any value since $x$ can move in a ball. So the max value of $a^T x$ is achieved when $x$ is in the same direction as $a$ and $x$ has the max length it can have, i.e., on the sphere.