The book is designed for students of computer science. It contains main mathematical topics needed in their undergraduate study. The main core of mathematics contained in the book belongs to standard material needed for any student of mathematics. The choice of topics was inspired by a first-year mathematics course for undergraduate students of computer science at the University of Nottingham. The reader can find here sections on logic, mathematical proofs, sets, relations, relational databases, functions and functional dependence, matrix algebra and systems of linear equations, basic algebraic structures, Boolean algebra and graph theory and its applications. The book also contains applications (relational databases, normal form of databases). In the second edition, the authors added a lot of new exercises and examples, illustrating discussed concepts. The book contains a lot of well-ordered and nicely illustrated material.