This paper is a greatly expanded account of the preliminary material that appeared in Atiyah & Bott (1980). Part ofthe reason for the long delay between that paper and this present version was that new view-points emerged that added further interest to the topic and enabled us to provide proofs for what had earlier been conjectures. The length of this paper is due to our desire to present the several different aspects of the problem. We feel that this is justified because the main interest lies not so much in the actual applications as in the methods employed and the interaction between different approaches. Because ofits long gestation period and its consequent size, we feel that we owe the reader a substantial and leisurely introduction that puts the paper into historical perspective. In fact, on a personal level, one of the attractions of this subject to us is that it brings together algebraic vector bundles and Morse theory, topics to which we separately made contributions a quarter of a century ago (Atiyah 1955, 1957; Bott 1958, Bott &Samelson 1958). Even better, the catalyst that produced this interaction came from a quite unexpected quarter, namely that of theoretical physics in the form of the Yang-Mills equations.