Abstract: A method of comparison of spectra from the spectrum of a sample and at least one spectrum of a reference library is provided. The method involves: obtaining at least one relevant spectral peak from the sample spectrum and comparing each of the relevant spectral peaks obtained with the spectra in the reference library. Methods are also described for: comparison of spectra from the second derivative of the sample spectrum and the second derivative of the reference library spectra; and comparison of spectra with the previous identification of the major component of a sample, which involves correlating triangularly the spectra of the sample, the reference and the major component.