Convexity of a function.

25 Views Asked by At

I am interested in this function: $$ y(\boldsymbol{v})= \left\| ~~~\begin{array}{l} (\boldsymbol{v} - \boldsymbol{a}_{1} )^{T} \boldsymbol{v} \\ (\boldsymbol{v} - \boldsymbol{a}_{2} )^{T} \boldsymbol{v} \end{array}~~ \right \|^{2}, $$ where $\boldsymbol{v} \in \mathbb{R}^{n}$ is the variable and $\boldsymbol{a}_{1},\boldsymbol{a}_{2} \in \mathbb{R}^{n}$ are known vectors. I wonder if this function is convex or not respect to $\boldsymbol{v}$. And if not convex, is it $\mu$-weakly convex ? For convenience, I list the definition of $\mu$-weakly convex below:

A differentiable function $f(x)$ is $\mu$-weakly convex if function $g(x) = f(x) + \mu||x||^{2}$ is convex.

I consider the case where $\boldsymbol{v}$ is a scalar, and in this case, the function is a quartic function. And I calculate the second derivative and think it is $\mu$-weakly convex according to the definition. But when $\boldsymbol{v}$ is a vector, I fail to analysis the convexity of this function.

I'm a newbie of convex optimization so if my question has any ambiguity please let me know, thank you very much!