Math for Programming cover

Math for Programming

Learn the Math, Write Better Code
by Ronald T. Kneusel
March 2025, 504 pp.
ISBN-13: 
9781718503588
Use coupon code PREORDER to get 25% off!

Download Chapter 9: Graphs

Look Inside!

Math for Programming back cover
Math for Programming pages 24-25Math for Programming pages 144-145Math for Programming pages 416-417

Every great programming challenge has mathematical principles at its heart. Whether you’re optimizing search algorithms, building physics engines for games, or training neural networks, success depends on your grasp of core mathematical concepts. 

In Math for Programming, you’ll master the essential mathematics that will take you from basic coding to serious software development. You’ll discover how vectors and matrices give you the power to handle complex data, how calculus drives optimization and machine learning, and how graph theory leads to advanced search algorithms.
Through clear explanations and practical examples, you’ll learn to:

  • Harness linear algebra to manipulate data with unprecedented efficiency
  • Apply calculus concepts to optimize algorithms and drive simulations
  • Use probability and statistics to model uncertainty and analyze data
  • Master the discrete mathematics that powers modern data structures
  • Solve dynamic problems through differential equations

Whether you’re seeking to fill gaps in your mathematical foundation or looking to refresh your understanding of core concepts, Math for Programming will turn complex math into a practical tool you’ll use every day.

Author Bio 

Ronald T. Kneusel has been working with machine learning in industry since 2003 and has a PhD in machine learning from the University of Colorado, Boulder. Kneusel is the author of Practical Deep Learning, Math for Deep Learning, The Art of Randomness, How AI Works, and Strange Code (all from No Starch Press), as well as Numbers and Computers and Random Numbers and Computers (Springer).

Table of contents 

Foreword
Acknowledgments
Introduction
Chapter 1. Computers and Numbers
Chapter 2. Sets and Abstract Algebra
Chapter 3. Boolean Algebra
Chapter 4. Functions and Relations
Chapter 5. Induction
Chapter 6. Recurrence and Recursion
Chapter 7. Number Theory
Chapter 8. Counting and Combinatorics
Chapter 9. Graphs
Chapter 10. Trees
Chapter 11. Probability
Chapter 12. Statistics
Chapter 13. Linear Algebra
Chapter 14. Differential Calculus
Chapter 15. Integral Calculus
Chapter 16. Differential Equations

Index

The chapters in red are included in this Early Access PDF.

View the detailed Table of Contents
View the Index