  In this research, we solve polynomial, Sobolev polynomial, rational, and
Sobolev rational least squares problems. Although the increase in the
approximation degree allows us to fit the data better in attacking least
squares problems, the ill-conditioning of the coefficient matrix fuels the
dramatic decrease in the accuracy of the approximation at higher degrees. To
overcome this drawback, we first show that the column space of the coefficient
matrix is equivalent to a Krylov subspace. Then the connection between
orthogonal polynomials or rational functions and orthogonal bases for Krylov
subspaces in order to exploit Krylov subspace methods like Arnoldi
orthogonalization is established. Furthermore, some examples are provided to
illustrate the theory and the performance of the proposed approach.
