This short textbook provides a succinct introduction to mathematical logic and set theory, which together form the foundations for the rigorous development of mathematics. It will be suitable for all mathematics undergraduates coming to the subject for the first time. The book is based on lectures given at the University of Cambridge and covers the basic concepts of logic: first order logic, consistency, and the completeness theorem, before introducing the reader to the fundamentals of axiomatic set theory. There are also chapters on recursive functions, the axiom of choice, ordinal and cardinal arithmetic and the incompleteness theorems. Dr Johnstone has included numerous exercises designed to illustrate the key elements of the theory and to provide applications of basic logical concepts to other areas of mathematics. Consequently the book, while making an attractive first textbook for those who plan to specialise in logic, will be particularly valuable for mathematics and computer scientists whose primary interests lie elsewhere.