Source localization is the process of estimating the location of signal sources based on the signals received at different antennas of an antenna array. It has diverse applications, ranging from radar systems and underwater acoustics to wireless communication networks. Subspace-based approaches are among the most effective techniques for source localization due to their high accuracy, with Multiple SIgnal Classification (MUSIC) and Estimation of Signal Parameters by Rotational Invariance Techniques (ESPRIT) being two prominent methods in this category. These techniques leverage the fact that the space spanned by the eigenvectors of the covariance matrix of the received signals can be divided into signal and noise subspaces, which are mutually orthogonal. Originally designed for far-field source localization, these methods have undergone several modifications to accommodate near-field scenarios as well. This chapter aims to present the foundations of MUSIC and ESPRIT algorithms and introduce some of their variations for both far-field and near-field localization by a single array of antennas. We further provide numerical examples to demonstrate the performance of the presented methods.