This textbook provides a comprehensive foundation in the mathematics needed for data science for students and self-learners with a basic mathematical background who are interested in the principles behind computational algorithms in data science.