This book bridges the gap between playing with robots in school and studying robotics at the upper undergraduate and graduate levels to prepare for careers in industry and research. Robotic algorithms are presented formally, but using only mathematics known by high-school and first-year college students, such as calculus, matrices and probability. Concepts and algorithms are explained through detailed diagrams and calculations. Elements of Robotics presents an overview of different types of robots and the components used to build robots, but focuses on robotic algorithms: simple algorithms like odometry and feedback control, as well as algorithms for advanced topics like localization, mapping, image processing, machine learning and swarm robotics. These algorithms are demonstrated in simplified contexts that enable detailed computations to be performed and feasible activities to be posed. Students who study these simplified demonstrations will be well prepared for advanced study of robotics. The algorithms are presented at a relatively abstract level, not tied to any specific robot. Instead a generic robot is defined that uses elements common to most educational robots: differential drive with two motors, proximity sensors and some method of displaying output to the use. The theory is supplemented with over 100 activities, most of which can be successfully implemented using inexpensive educational robots. Activities that require more computation can be programmed on a computer. Archives are available with suggested implementations for the Thymio robot and standalone programs in Python.