A variational principle is formulated to determine the single-particle states, their pairing, and the occupation number distribution for a trial state vector of the Bardeen, Cooper, Schrieffer type. The equations which are derived generalize those of the Hartree-Fock method obtained with a Slater determinant trial wave function. It is pointed out that in a suitable representation the vacuum state of a general quasi-particle transformation has such a trial form which exhibits directly the pairing of single-particle states. Another variational principle determines the excitation energies. Two coupling cases are distinguished: the commutative case in which the self-consistent densities and energies are related to quantities which all commute, and the more general noncommutative case. The latter is of importance in critical-field phenomena. The equations for the commutative case can be written in a matrix form which retains its validity in the more general noncommutative case. The simple matrix commutator equations appear as direct generalizations of the density matrix form of the Hartree-Fock equations. The equations for small oscillations have an equally simple form. Their connection with a diagonal representation of the quasi-particle energies is exhibited in a way which remains valid in the general coupling case. The "unphysical" solutions are excluded by the supplementary condition. The contact with the Green's function approach is established. The generalized matrix form of the Green's function equations shows especially clearly the symmetry properties of the method.