  We describe a randomized Krylov-subspace method for estimating the spectral
condition number of a real matrix A or indicating that it is numerically rank
deficient. The main difficulty in estimating the condition number is the
estimation of the smallest singular value \sigma_{\min} of A. Our method
estimates this value by solving a consistent linear least-squares problem with
a known solution using a specific Krylov-subspace method called LSQR. In this
method, the forward error tends to concentrate in the direction of a right
singular vector corresponding to \sigma_{\min}. Extensive experiments show that
the method is able to estimate well the condition number of a wide array of
matrices. It can sometimes estimate the condition number when running a dense
SVD would be impractical due to the computational cost or the memory
requirements. The method uses very little memory (it inherits this property
from LSQR) and it works equally well on square and rectangular matrices.
