1. A method for analyzing a measured spectral image of a sample by factoring a matrix of spectral image data D according to D≅CS T , where C is a concentration matrix describing the distribution of pure components at each spatial location of the sample and S is a spectral shapes matrix representation of the pure-component spectra, comprising: a) measuring a spectral image of the sample with a spectroscopic imaging system, whereby the spectral image is represented by the matrix of spectral image data D; b) obtaining an initial estimate for the spectral shapes matrix S; c) selecting elements of zero abundance in the concentration matrix C; d) obtaining a least squares estimate for C, subject to the zero-equality constraints at the zero abundance matrix elements, according to C ← min C ⁢  S ⁢  D - CS T  F ; and e) obtaining a least squares estimate for S, subject to constraints, according to S ← min S ⁢  C ⁢  D - CS T  F .