# Projection Onto Convex Sets

$$
x\_{LS}=\underset{x\in\R^n}{\min}\frac{1}{2}\lVert Ax-b\rVert^2
$$

where $$A$$ is $$m\times n$$.

<figure><img src="https://596692103-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuVC1Ieh2j1XfxqLWFoSa%2Fuploads%2Fnka2hVv715If9xDXeDfl%2Fimage.png?alt=media&#x26;token=21991d43-ef2d-405f-92f8-a1744d9626b5" alt=""><figcaption><p><span class="math">Ax_{LS}</span> projection of <span class="math">b</span> onto <span class="math">range(A)</span></p></figcaption></figure>

$$
\min \frac{1}{2} \lVert Ax-b\rVert^2 \Leftrightarrow \min \frac{1}{2} \lVert z-b\rVert^2 \text{ subject to } z\in range(A)
$$

Then (“orthogonal” or “Euclidean”) projection of a vector $$b\in \R^n$$ onto $$C\subseteq \R^n$$ convex is the solution of the convex optimization problem

$$
proj\_C(b)=\underset{z\in\R^n}{\min}\frac{1}{2}\lVert z-b\rVert^2 \text{ subject to } z\in C
$$

* Convex optimization problem
* Objective is strictly convex ⇒ solution is unique

### Properties of $$\text{proj}\_C(b)$$

* if $$b\in C$$ ⇒ $$proj\_C(b)=b$$
* $$proj\_C(b)$$ is unique
* $$z=proj\_C(b)$$ ↔ $$(b-z)^T(y-z)\le 0, \forall y\in C$$

<figure><img src="https://596692103-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuVC1Ieh2j1XfxqLWFoSa%2Fuploads%2FkNwhJPmN4k7T0FJv9HIS%2Fimage.png?alt=media&#x26;token=b462c907-9682-4e97-95fa-6e3238a5f673" alt=""><figcaption></figcaption></figure>

$$-\nabla f(z)\in N\_C(z)$$

$$b-z \in N\_C(z)$$ $$\overset{\text{use definition of Normal Cone}}{\Leftrightarrow}(b-z)^T(y-z)\le 0, \forall y\in C$$
