Constraints that are not really constraints
Standard optimisation assumes your unknowns form a vector in flat space: any direction is a valid step, and a step of any size lands somewhere legal.
A surprising number of problems violate this, and always in the same way.
Fit a rotation aligning two point clouds, and the unknown is a matrix that must be orthogonal with determinant one. Find the best k-dimensional subspace for your data, and the unknown is a subspace, not a matrix. Complete a low-rank matrix from partial observations, and the unknown must have rank exactly r. Estimate a covariance, and it must be symmetric positive definite.
In every case the parameters satisfy equations, so they do not fill their ambient space. The rotation matrices form a curved surface inside the space of all matrices, and stepping off it produces something that is not a rotation.
The usual treatment is to call these constraints and reach for constrained optimisation machinery. There is a better framing, and it is the subject of this path: the feasible set is not a restriction carved out of a flat space, it is a curved space in its own right.

