A Mathematician's Apology is a 1940 essay by British mathematician G. H. Hardy, which offers a defence of the pursuit of mathematics. Central to Hardy's "apology" – in the sense of a formal justification or defence (as in Plato's Apology of Socrates) – is an argument that mathematics has value independent of possible applications. Hardy located this value in the beauty of mathematics, and gave some examples of and criteria for mathematical beauty. The book also includes a brief autobiography, and gives the layman an insight into the mind of a working mathematician.
Background
Hardy felt the need to justify his life's work in mathematics at this time mainly for two reasons. Firstly, at age 62, Hardy felt the approach of old age (he had survived a heart attack in 1939) and the decline of his mathematical creativity and skills.
By devoting time to writing the Apology, Hardy was admitting that his own time as a creative mathematician was finished. In his foreword to the 1967 edition of the book, C. P. Snow describes the Apology as
"a passionate lament for creative powers...