2

How to find the projection(the closest point) of point $a$ to half-space $(p,x)\le\alpha$, where $p,x\in\mathbb R^n$,$\alpha \in \mathbb R$? $(p,x)$ is dot product.

Royi
  • 10,050
Ashot
  • 4,893

2 Answers2

4

The problem is given by:

$$\begin{aligned} \arg \min_{x} \quad & \frac{1}{2} {\left\| x - y \right\|}_{2}^{2} \\ \text{subject to} \quad & {a}^{T} x \leq b \end{aligned}$$

Solving the KKT conditionn will yield:

$$ x = \begin{cases} y & \text{ if } \; {a}^{T} y \leq b \\ y - \frac{{a}^{T} y - b}{ {\left\| a \right\|}_{2}^{2} } a & \text{ if } \; {a}^{T} y > b \end{cases} $$

A MATLAB Code is given in my answer to Orthogonal Projection onto the Intersection of Convex Sets.

Royi
  • 10,050
2

1) Find a normal vector $\vec \nu$ to the hyperplane $\mathrm H = \{x|p.x = \alpha\}$ ;

2) Calculate the distance $d$ between $a$ and $\rm H$ ;

3) Then, then point you want is $a - d \vec \nu$.

Damien L
  • 6,833