We propose to solve nonlinear systems of equations by function optimization and we give an optimal algorithm which relies on a special canonical form of gradient descent. The algorithm can be applied under certain assumptions on the function to be optimized, that is an upper{bound must exist for the norm of the Hessian, whereas the norm of the gradient must be lower{bounded. Due to its intrinsic structure, the algorithm looks particularly appealing for a parallel implementation. As a particular case, more speci c results are given for linear systems. We prove that reaching a solution with degree of precision " takes n 2 k 2 log k " , being k the condition number of A and n the problem dimension. Related results hold for systems of quadratic equations, for which an estimation for the requested bounds can be devised. Finally, we report numerical results in order to establish the actual