Shop Boppo
Limited time deal NO_OF_HOURS hours NO_OF_MINUTES minutes Limited time deal NO_OF_MINUTES minutes Limited time deal NO_OF_MINUTES minutes NO_OF_SECONDS seconds Limited time deal NO_OF_SECONDS seconds Limited time deal
To see product details, add this item to your cart. You can always remove it later.
Shipper / Seller
Amazon.com
Amazon.com
Shipper / Seller
Amazon.com
Returns
30-day refund / replacement
30-day refund / replacement
This item can be returned in its original condition for a full refund or replacement within 30 days of receipt.
Read full return policy
Payment
Secure transaction
Your transaction is secure
We work hard to protect your security and privacy. Our payment security system encrypts your information during transmission. We don’t share your credit card details with third-party sellers, and we don’t sell your information to others. Learn more
Gift options
Available at checkout
Available at checkout This item is a gift. Change
At checkout, you can add a custom message, a gift receipt for easy returns and have the item gift-wrapped
Added to

Sorry, there was a problem.

There was an error retrieving your Wish Lists. Please try again.

Sorry, there was a problem.

List unavailable.
Kindle app logo image

Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.

Read instantly on your browser with Kindle for Web.

Using your mobile phone camera - scan the code below and download the Kindle app.

QR code to download the Kindle App

  • Mathematics of Machine Learning: Master linear algebra, calculus, and probability for machine learning
  • An Overview of Mathematics of Machine Learning
  • VIDEO

Follow the author

Get new release updates & improved recommendations
Something went wrong. Please try your request again later.

Mathematics of Machine Learning: Master linear algebra, calculus, and probability for machine learning

4.4 out of 5 stars (121)

Purchase options and add-ons

Build a solid foundation in the core math behind machine learning algorithms with this comprehensive guide to linear algebra, calculus, and probability, explained through practical Python examples

Purchase of the print or Kindle book includes a free PDF eBook

Key Features

  • Master linear algebra, calculus, and probability theory for ML
  • Bridge the gap between theory and real-world applications
  • Learn Python implementations of core mathematical concepts

Book Description

Mathematics of Machine Learning provides a rigorous yet accessible introduction to the mathematical underpinnings of machine learning, designed for engineers, developers, and data scientists ready to elevate their technical expertise. With this book, you’ll explore the core disciplines of linear algebra, calculus, and probability theory essential for mastering advanced machine learning concepts.

PhD mathematician turned ML engineer Tivadar Danka—known for his intuitive teaching style that has attracted 100k+ followers—guides you through complex concepts with clarity, providing the structured guidance you need to deepen your theoretical knowledge and enhance your ability to solve complex machine learning problems. Balancing theory with application, this book offers clear explanations of mathematical constructs and their direct relevance to machine learning tasks. Through practical Python examples, you’ll learn to implement and use these ideas in real-world scenarios, such as training machine learning models with gradient descent or working with vectors, matrices, and tensors.

By the end of this book, you’ll have gained the confidence to engage with advanced machine learning literature and tailor algorithms to meet specific project requirements.

What you will learn

  • Understand core concepts of linear algebra, including matrices, eigenvalues, and decompositions
  • Grasp fundamental principles of calculus, including differentiation and integration
  • Explore advanced topics in multivariable calculus for optimization in high dimensions
  • Master essential probability concepts like distributions, Bayes' theorem, and entropy
  • Bring mathematical ideas to life through Python-based implementations

Who this book is for

This book is for aspiring machine learning engineers, data scientists, software developers, and researchers who want to gain a deeper understanding of the mathematics that drives machine learning. A foundational understanding of algebra and Python, and basic familiarity with machine learning tools are recommended.

Table of Contents

  1. Vectors and vector spaces
  2. The geometric structure of vector spaces
  3. Linear algebra in practice spaces: measuring distances
  4. Linear transformations
  5. Matrices and equations
  6. Eigenvalues and eigenvectors
  7. Matrix factorizations
  8. Matrices and graphs
  9. Functions
  10. Numbers, sequences, and series
  11. Topology, limits, and continuity
  12. Differentiation
  13. Optimization
  14. Integration
  15. Multivariable functions
  16. Derivatives and gradients
  17. Optimization in multiple variables
  18. What is probability?
  19. Random variables and distributions
  20. The expected value
  21. The maximum likelihood estimation
  22. It's just logic
  23. The structure of mathematics
  24. Basics of set theory
  25. Complex numbers

Frequently bought together

This item: Mathematics of Machine Learning: Master linear algebra, calculus, and probability for machine learning
$44.30
Get it as soon as Saturday, Sep 19
In Stock
Ships from and sold by Amazon.com.
+
$36.05
Get it as soon as Saturday, Sep 19
In Stock
Ships from and sold by Amazon.com.
+
$29.55
Get it as soon as Saturday, Sep 19
In Stock
Ships from and sold by Amazon.com.
Total price: $00
To see our price, add these items to your cart.
Details
Added to Cart
Choose items to buy together.

Customers also bought or read

Loading...

From the brand


From the Publisher

Mathematics of machine learning
Tivadar Danka

What was your motivation for writing this book?

When I started in machine learning, I saw most of my colleagues struggle with the basic mathematics behind neural network models. Even though they were great engineers, they made basic modeling mistakes, like using the mean-squared error for classification, having trouble fixing tensor shape mismatch errors, and similar things.

So, I started to educate them about fundamental mathematical topics, like how matrix multiplication works or what the mean-squared error and cross-entropy loss are. Soon, I realized that these intuitive explanations were also missing from the machine learning literature: most books either completely ignored the mathematics behind machine learning or were way too advanced to be useful.

Because of this, I started posting my explanations as Twitter threads, and they instantly became a smash hit. Soon, I had enough material for a book, and four years later, here we are with a ~770-page tome aiming to bring mathematics closer to machine learning professionals.

Tom Yeh Endorsement

Why should ML professionals learn about the underlying mathematics?

Because mathematics is the language of machine learning!

Advanced machine learning libraries like PyTorch or scikit-learn hide most of the complexities from us; training a model can be as simple as calling the .fit method.

On the one hand, this is great! Abstracting the technical details away from the user makes it possible to build cutting-edge solutions in a matter of days. Lowering the barrier of entry is one of the reasons behind the explosion of AI we see today.

On the other hand, if one has to go beyond the ready-made solutions, a user-level understanding is not enough. To beat the state-of-the-art or build something novel, you can’t get away without looking under the hood. I own an old Volvo, and even though I love that car, I’m a frequent client at the car shop. My mechanic is really great at diagnosing rare problems. He can tell precisely what’s wrong by driving the car a couple of laps around the block.

Fluency in mathematics has a similar effect in machine learning.

Etibar Aliyev Endorsement

How is this book different from other machine learning books?

Most books are either written from a purely practical or a purely theoretical perspective. In my experience, the learning curve is extremely steep for most theory-focused books. Even with a PhD in mathematics, there are textbooks where I get stuck in the first chapter, leaving the rest of the book inaccessible to me. I wanted to change that. So, I had three guiding principles in mind.

First, I wanted to “minmax” mathematics in the sense that the knowledge in the book should be maximally useful, but minimal in quantity.

Second, explanations should be intuitive and visual, leaning toward user-friendliness rather than mathematical precision. We have machine learning in mind, not mathematics.

Third, every concept and algorithm should be implemented from scratch in Python. This is essential to understanding mathematics. In the book, we learn NumPy along with the math, implementing algorithms such as the singular value decomposition or the omnipresent gradient descent.

Mathematics of Machine Learning
Machine Learning with PyTorch and Scikit-Learn
Python Machine Learning By Example
Mastering PyTorch: Create and deploy deep learning models from CNNs to multim...
Deep Learning Math Workbook
Customer Reviews
4.4 out of 5 stars 121
4.6 out of 5 stars 527
4.9 out of 5 stars 78
4.2 out of 5 stars 62
4.2 out of 5 stars 29
Topics / New Topics Linear algebra, calculus, multivariable calculus, and probability theory New content on transformers, gradient boosting, and GNNs Revised with PyTorch builds, expanded best practices, and new content on LLMs and multimodal models New content on diffusion models, recommender systems, mobile deployment, Hugging Face, and GNNs Math puzzles to build strong foundation for deep learning
Reader Knowledge Level Beginner to Intermediate Beginner to Intermediate Beginner to Intermediate Intermediate to Advanced Students and beginners
Technology Used Matplotlib, NumPy, SciPy, scikit-learn PyTorch, scikit-learn PyTorch, TensorFlow, pandas, NumPy, scikit-learn PyTorch High school level Math

Editorial Reviews

Review

“As a professor teaching AI, I’m always looking for resources that combine mathematical rigor with practical relevance—and Mathematics of Machine Learning delivers. I plan to assign several chapters as required readings in my AI course, especially those on linear algebra and multivariable calculus. Tivadar Danka does an excellent job connecting core mathematical concepts to real-world AI applications, with clear Python examples that make the material approachable. I also highly recommend this book to professionals looking to strengthen their mathematical foundation for AI through self-study—it’s both structured and accessible.”

Prof. Tom Yeh, University of Colorado Boulder, Host of AI by Hand



“Often, the biggest obstacle to real-world machine learning success is mastering the fundamental math. Tivadar Danka's Mathematics of Machine Learning removes that roadblock by means of exact explanations and practical exercises. Designed around useful case studies, ranging from vector spaces to the geometric interpretation of gradients, this book not only provides theorems but also prepares you to immediately apply them in production projects.”

Etibar Aliyev, Team Lead (AI) at Google



“Most books that claim to teach the math behind machine learning either oversimplify or drown you in abstraction. This one does neither. It’s precise where it matters, informal when it helps, and never loses sight of why the math exists in the first place.

No fluff, no cringe analogies -  just clear thinking and beautifully structured exposition. You can tell the author has done the proofs and written the code.

Highly recommend it for anyone serious about understanding, not just using, ML.”

Mike Erlihson, PhD, Head of AI at Stealth Startup



“As someone who approached machine learning with a strong commitment to understanding the underlying mathematics, I quickly discovered how fragmented and inaccessible many resources were. Mathematics for Machine Learning stands out as a comprehensive, well-structured guide that brings together all the essential topics — from linear algebra and calculus to probability and optimization — in a clear and coherent manner. The material is presented with both rigor and clarity, and the accompanying Python code bridges the gap between theory and practice. This book is an indispensable resource for anyone looking to build a solid mathematical foundation in the field.”

Prashant Kulkarni, Lead AI Security Research Engineer at Google Cloud



“This book provides a carefully constructed guide on mathematics for your machine learning projects. It gives you exactly what you need to know at just the right level! It includes principles, illustrations, and code examples to bring the concepts to life. I highly recommend it to anyone who takes their career seriously!”

T. Scott Clendaniel, AI co-instructor at the University of Pennsylvania



“Danka’s work serves as a foundational text, bridging the often-intimidating gap between abstract mathematics and its tangible application in data science. This book is an indispensable resource for aspiring machine learning engineers and data scientists who are committed to mastering the theoretical bedrock of their discipline.

 The section on Linear Algebra is particularly noteworthy for its clarity and the part dedicated to Functions and Calculus is well executed. The inclusion of multivariate calculus is a testament to the book’s comprehensive nature, preparing the reader for the high-dimensional data prevalent in real-world machine learning problems. The book’s treatment of sequences, limits, continuity, and differentiation is both thorough and contextually relevant. This section empowers the reader to grasp the mechanics of model training at a much deeper level. The author successfully demystifies the calculus that underpins so much of machine learning, making it accessible to a broad audience.

Finally, the book’s inclusion of Probability Theory completes the triad of mathematical pillars essential for machine learning. The author’s overall approach encourages a mode of critical thinking that is often absent in more perfunctory texts. Readers are actively encouraged to engage with the material, to question assumptions, and even to attempt their own proofs of the theorems presented. [...] In conclusion, "Mathematics of Machine Learning" is a must-have text that excels in its clarity, its practical relevance, and its ability to inspire a genuine appreciation for the mathematical elegance of machine learning.”

Antonio Gulli, Sr. Director, Distinguished Engineer, Google

About the Author

Tivadar Danka is a mathematician by training, a machine learning engineer by profession, and an educator by passion. After finishing his PhD in 2016 (about the arcane subject of orthogonal polynomials), he switched career paths and has been working in machine learning ever since. His work includes applying deep learning to cell microscopy images to identify and phenotype cells, creating one of the most popular open source Python packages for active learning, building a full machine learning library from scratch, and collecting about a total of 100k followers on social media, all by posting high-quality educational content.

Product details

  • Publisher ‏ : ‎ Packt Publishing
  • Publication date ‏ : ‎ May 30, 2025
  • Language ‏ : ‎ English
  • Print length ‏ : ‎ 730 pages
  • ISBN-10 ‏ : ‎ 1837027870
  • ISBN-13 ‏ : ‎ 978-1837027873
  • Item Weight ‏ : ‎ 2.72 pounds
  • Dimensions ‏ : ‎ 7.5 x 1.65 x 9.25 inches
  • Best Sellers Rank: #38,507 in Books (See Top 100 in Books)
  • Customer Reviews:
    4.4 out of 5 stars (121)

About the author

Follow authors to get new release updates, plus improved recommendations.
Tivadar Danka
Brief content visible, double tap to read full content.
Full content visible, double tap to read brief content.

Tivadar Danka is a mathematician by training, a machine learning engineer by profession, and an educator by passion. After finishing his PhD in 2016 (about the arcane subject of orthogonal polynomials), he switched career paths and has been working in machine learning ever since. His work includes applying deep learning to cell microscopy images to identify and phenotype cells, creating one of the most popular open source Python packages for active learning, building a full machine learning library from scratch, and collecting about a total of 100k followers on social media, all by posting high-quality educational content.