In this survey paper, we consider variational problems involving the HardySchrödinger operator L γ := − − γ |x| 2 on a smooth domain of R n with 0 ∈ , and illustrate how the location of the singularity 0, be it in the interior of or on its boundary, affects its analytical properties. We compare the two settings by considering the optimal Hardy, Sobolev, and the Caffarelli-Kohn-Nirenberg inequalities. The latter can be stated as:where γ < n 2 4 , s ∈ [0, 2) and 2 (s) := 2(n−s) n−2 . We address questions regarding the explicit values of the optimal constant C := μ γ,s ( ), as well as the existence of non-trivial extremals attached to these inequalities. Scale invariance properties often lead to situations where the best constants μ γ,s ( ) do not depend on the domain, and hence they are not attainable. We consider two different approaches for "breaking the homogeneity" of the problem, and restoring compactness. One approach was initiated by Brezis-Nirenberg, when γ = 0 and s = 0, and by Janelli, when γ > 0 and s = 0. It is suitable for the case where the singularity 0 is in the interior of , and consists of considering lower order perturbations of the critical nonlinearity. The other approach was initiated by Ghoussoub-Kang for γ = 0, s > 0, and by C.S. Lin et al. and Ghoussoub-Robert, when γ = 0, s ≥ 0. It consists of considering domains, where the singularity 0 is on the boundary. Both of these approaches are rich in structure and in challenging problems. If 0 ∈ , then a negative linear perturbation suffices for higher dimensions, while a positive "Hardy-singular interior mass" theorem for the operator L γ is required in lower dimensions. If the singularity 0 belongs to the boundary ∂ , then the local geometry around 0 (convexity and mean curvature) plays a crucial role in high dimensions, while a positive "Hardy-singular boundary mass" theorem is needed for the lower dimensions. Each case leads to a distinct notion of critical dimension for the operator L γ .