| # Minimum Euclidean distance to a subspace: strong duality Consider the problem of finding the minimum Euclidean distance to an affine subspace. The problem can be written as the convex problem for appropriate matrix and vector . This problem does not have any inequality constraints. We assume that is full row rank (hence, ), which guarantees that the problem is feasible for any choice of the vector . The dual function is Weak duality tells us that for any given , is a lower bound on the optimal value of the primal problem: For a given , the corresponding value of the dual function, , can be computed explicitly, since it involves the unconstrained minimization of a convex (quadratic) function. In fact, there is a unique solution to the above problem: . Hence The dual problem can also be solved explicitly, since it involves the unconstrained minimization of a convex (quadratic) function again. In fact, when is full row rank (), the optimal is unique, and given by Hence, the optimal value of the dual is We can check that strong duality holds for this problem. Indeed, Slater’s condition holds (the problem is convex, has only affine equality constraints, and these are feasible). We can check this directly, and come up with an optimal point for the primal problem. To see this, we set . We then observe that is feasible, since , thus: Since the corresponding value of the objective equals the lower bound , that is: we conclude that , that is, is indeed optimal for the primal problem.