Optimization problem: Find shortest distance between two vectors

382 Views Asked by At

$$\min (u-v)^T(u-v)$$ $$s.t. \space Ru=p, \space Sv=q$$

where $u$ and $v$ are in $R^4$ and $R$ and $S$ are $3x4$ matrices.

When I expanded the expression I got this:

$$u^Tu - 2u^Tv +v^Tv$$

Is this a linear or a non-linear QP problem? I am asking becase this term "$ 2u^Tv$" confuses me, since its not linear.

What is the Hessian to this problem? (want to use if for the Lagrange)

I know this problem can be solved with the nullspace method but I just want to understand how to apply the Lagrange Method for this problem.

*UPDATE

The problem does not need to be linear in order to use the Lagrange Method. The Hessian is found as usual by taking the second derivatives of the objective function.

$$\begin{bmatrix}I_4 & -I_4 \\-I_4 & I_4 \end{bmatrix}$$

1

There are 1 best solutions below

0
On

Introducing the joint variable $w := [u\hspace{1em}v]^T$, your problem can be written as a QP in the form

$$\min_{w \in \mathbb R^8} w^TQw\text{ subject to }Pw = r,$$

where $Q := \begin{bmatrix}I_4 & -I_4\\-I_4 & I_4\end{bmatrix}$, $P:=\begin{bmatrix}R & 0_4\\0_4 & S\end{bmatrix}$, $r := [p\hspace{1em}q]^T$.

This is an equality contrained QP (quadratic program), on which there is an entire literature.