An algorithm is proposed that extracts 3D shape from shading information in a digital image. The algorithm assumes that there is only a single source of light producing the image, that the surface of the shape giving rise to the image is Lambertian (matte) and that its shape can be locally approximated by a quadratic function. Previous work shows that under these assumptions, robust shape from shading is possible, though slow for large images because a non-linear optimization method is applied in order to estimate local quadratic surface patches from image intensities. The work presented here shows that local quadratic surface patch estimates can be computed, without prior knowledge of the light source direction, via a linear least squares optimization, thus greatly improving the algebraic complexity and run-time of the existing algorithms.