An Essay on the Foundations of Geometry was first published in 1897, and is based on Russell’s Cambridge dissertation as well as lectures given during a journey through the USA.
Bertrand Russell’s Preface from the book:
The present work is based on a dissertation submitted at the Fellowship Examination of Trinity College, Cambridge, in the year 1895. Section B of the third chapter is in the main a reprint, with some serious alterations, of an article in Mind (New Series, No. 17). The substance of the book has been given in the form of lectures at the Johns Hopkins University, Baltimore, and at Bryn Mawr College, Pennsylvania.
My chief obligation is to Professor Klein. Throughout the first chapter, I have found his "Lectures on non-Euclidean Geometry" an invaluable guide; I have accepted from him the division of Metageometry into three periods, and have found my historical work much lightened by his references to previous writers. In Logic, I have learnt most from Mr Bradley, and next to him, from Sigwart and Dr Bosanquet. On several important points, I have derived useful suggestions from Professor James’s "Principles of Psychology."