This paper is devoted to the numerical solution of the steady Stokes problem, in stream function-vorticity variables. In two dimensions, this is reduced to a Dirichlet problem for the biharmonic operator. A new formulation for the decomposition of the biharmonic operator using the potential theory is presented. The problem comes down to the calculation of a function defined on the boundary, which is the solution of a variational problem. This kind of decomposition is used in electric potential theory to solve the Laplacian problem outside a bounded domain. For these problems, the function defined on the boundary is called the electric charge of the conductor. The first part of the paper is devoted to the analysis of the continuous problem, and the variational formulation on the boundary is studied. The method may be extended to the Navier-Stokes problem. By using a suitable finite element approximation, similar properties for the discrete problem are found. These properties imply that the discrete function is the solution of a linear system, whose matrix is full, but symmetric and positive-definite. Among the iterative methods, we use the conjugate gradient method, which seems suitable in the context. Numerical results concerning the problem of steady flow in a square cavity are presented.