ABSTRACT The MK classification system as first proposed in 1943 by Morgan, Keenan & Kellman (1943) has been an important tool in stellar and galactic astrophysics. Currently, MK classification is a useful approach to obtaining general information on stellar spectra and selecting stars for further study. However, the existing manual methods of obtaining classifications are slow, making it infeasible for them to be applied to the vast numbers of spectra which will be obtained in future spectral surveys. In this project I investigate the application of artificial neural networks to the automation of MK spectral classification. For the purposes of this project, I digitized and reduced 100 objective prism plates taken from the Michigan Spectral Survey (Houk 1994). Using software I developed, I extracted a set of over 5000 spectra at a resolution of ~3 AA covering the wavelength range 3800-5200 AA (Bailer-Jones, Irwin & von Hippel 1997a). These spectra were used in conjunction with their two-dimensional classifications listed in Michigan Henry Draper Catalogue (Houk & Smith-Moore 1988 and references therein) to develop supervised neural network classifiers. I show that neural networks can give accurate spectral type classifications (1 sigma = 0.82 subtypes, sigmaRMS = 1.09 subtypes) across the full range of spectral types present in the database (B2-M7); I show also that the networks yield correct luminosity classes for over 95% of both dwarfs and giants with a high degree of confidence (Bailer-Jones, Irwin & von Hippel 1997b). The high level of reproducibility of neural network classifications is demonstrated and an analysis of the effect of the complexity of the neural network on its classifications is given. For the purposes of many analyses, stellar spectra contain a large amount of redundant (correlated) information. I investigate the application of Principal Components Analysis (PCA) to the optimal compression of spectra. I show that PCA can compress the spectra by a factor of over 30 whilst retaining more than 95% of the variance in the data set. Furthermore, this compression leads to no decrease in classifier performance, indicating that the PCA compression from 820 to 25 components results in no significant loss of relevant information. I also demonstrate how PCA acts as a filter of noise and bogus features in a spectrum and can be used to identify unusual spectra. The ultimate goal of stellar classification should be a physical parameterization of the stars. I examine the application of neural networks to the problem of obtaining physical parameters (Teff, log g etc.) directly from an observed spectrum, by training a neural network on synthetic spectra and then applying it to observed spectra (Bailer-Jones et al. 1997). By determining physical parameters in this way, any assumptions and limitations of an intermediate classification scheme are avoided. However, I have used the effective temperature (Teff) inferred by the networks to produce an accurate calibration of the MK system for dwarf, giant and sub-giant stars, based on the set of 5000 observed spectra. This calibration agrees well with a number of calibrations published in the literature. It is demonstrated through the metallicity dependence of the derived temperature calibration that the neural networks are sensitive to the metallicity features in the observed spectra. With further work it is likely that neural networks will be able to determine metallicity reliably using only the optical stellar spectrum.