A theoretical analysis is given of the equation of motion method, due to Alben et al., to compute the eigenvalue distribution (density of states) of very large matrices. The salient feature of this method is that for matrices of the kind encountered in quantum physics the memory and CPU requirements of this method scale linearly with the dimension of the matrix. We derive a rigorous estimate of the statistical error, supporting earlier observations that the computational efficiency of this approach increases with matrix size. We use this method and an imaginary-time version of it to compute the energy and the specific heat of three different, exactly solvable, spin-1/2 models and compare with the exact results to study the dependence of the statistical errors on sample and matrix size.