Common wave-front sensors such as the Hartmann or curvature sensor provide measurements of the local gradient or Laplacian of the wave front. The expression of wave fronts in terms of a set of orthogonal basis functions thus generally leads to a linear wave-front-estimation problem in which modal cross coupling occurs. Auxiliary vector functions may be derived that effectively restore the orthogonality of the problem and enable the modes of a wave front to be independently and directly projected from slope measurements. By using variational methods, we derive the necessary and sufficient condition for these auxiliary vector functions to have minimum-error norm. For the specific case of a slope-based sensor and a basis set comprising the Zernike circular polynomials, these functions are precisely the Gavrielides functions.