 # Consider the problem for some vectors v , m &#x2208;<!-- ∈ --> <mrow class="MJ sweetymoeyz 2022-07-08 Answered
Consider the problem for some vectors $v,m\in {\mathbb{R}}^{n}:$

$f\left(v\right)=\left({v}^{T}m{\right)}^{2}$

w.r.t $‖v{‖}^{2}=1$

I want to maximize f

If I consider the lagrangian, I get:

$L\left(v\right)=\left({v}^{T}m{\right)}^{2}+\lambda \left(1-‖v{‖}^{2}\right)$

Taking derivative, I get: $2m{m}^{T}v-\lambda 2v=0$ Therefore $m{m}^{T}v=\lambda v\left(\ast \right)$

Multiplying by ${v}^{T}$ from left, I end up with

$\left({v}^{T}m{\right)}^{2}=\lambda$

If I put that in(*), I do cannot simplfy that.

Is there a trick I can apply?
You can still ask an expert for help

• Live experts 24/7
• Questions are typically answered in as fast as 30 minutes
• Personalized clear answers

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it Freddy Doyle
You do not need much optimization here. Just note that $\left({v}^{T}m{\right)}^{2}={v}^{T}m{m}^{T}v$ and that $m{m}^{T}$ is symmetric positive semidefinite with rank 1. The only nonnezero eigenvalue is given by ${m}^{T}m$. Therefore, we have that
$0\le {v}^{T}m{m}^{T}v\le {m}^{T}m$
for all $v\in {\mathbb{R}}^{n}$. The maximum is attained for $v=m/||m||$ which is normalized eigenvector associated with the unique positive eigenvalue. Note that it is also attained for $v=-m/||m||$.

The difficulty here with using Lagrange multipliers is that $m{m}^{T}$ is not invertible and one has to restrict $v$ to the subspace where $m{m}^{T}v\ne 0$. That is you can solve for the problem where $v=\alpha m$ and pick $\alpha$ such that the norm of $v$ is one.