This book is an introduction to the quantum theory of materials and first-principles computational materials modelling. It explains how to use density functional theory as a practical tool for calculating the properties of materials without using any empirical parameters. The structural, mechanical, optical, electrical, and magnetic properties of materials are described within a single unified conceptual framework, rooted in the Schrödinger equation of quantummechanics, and powered by density functional theory. This book is intended for senior undergraduate and first-year graduate students in materials science, physics, chemistry, and engineering who are approaching for the first time the study of materials at the atomic scale. The inspiring principle of the book is borrowed from one of the slogans of the Perl programming language, Easy things should be easy and hard things should be possible. Following this philosophy, emphasis is placed on the unifying concepts, and on the frequent use of simpleheuristic arguments to build on ones own intuition. The presentation style is somewhat cross disciplinary; an attempt is made to seamlessly combine materials science, quantum mechanics, electrodynamics, and numerical analysis, without using a compartmentalized approach. Each chapter is accompanied byan extensive set of references to the original scientific literature and by exercises where all key steps and final results are indicated in order to facilitate learning. This book can be used either as a complement to the quantum theory of materials, or as a primer in modern techniques of computational materials modelling using density functional theory.