---
title: Mathematics for Machine Learning
description: Machine learning rests on linear algebra, calculus, probability and optimisation. You will learn exactly the mathematics needed to read ML papers and textbooks, with the resources that teach it in that order.
category: mathematics
subcategory: applied-mathematics
difficulty: beginner, intermediate, advanced
url: /subject/statistics-for-machine-learning
---

# Mathematics for Machine Learning

Machine learning rests on linear algebra, calculus, probability and optimisation. You will learn exactly the mathematics needed to read ML papers and textbooks, with the resources that teach it in that order.

## Available Resources

2 Books • 1 Courses • 2 Papers

## Courses

### 1. Matrix Calculus for Machine Learning and Beyond (MIT 18.S096)

**Author:** Alan Edelman, Steven G. Johnson

Extends calculus to matrices and general vector spaces: derivatives as linear operators, Jacobians, derivatives of matrix factorizations, adjoint methods and automatic differentiation. 17 lecture videos, lecture notes, and problem sets with solutions teach learners to derive and compute gradients for large-scale optimization.

**Difficulty:** Intermediate | **Price:** Free

**Link:** https://ocw.mit.edu/courses/18-s096-matrix-calculus-for-machine-learning-and-beyond-january-iap-2023/

**Tags:** matrix-calculus, automatic-differentiation, jacobians, adjoint-methods, gradient-based-optimization

## Papers

### 1. The Matrix Cookbook

**Author:** Kaare Brandt Petersen, Michael Syskind Pedersen

A reference compendium of matrix identities: derivatives of determinants, inverses, traces and norms, eigenvalue and SVD relations, and Gaussian and multivariate distribution results. Built for looking up the identity a paper skipped, not for reading front to back.

**Difficulty:** Advanced | **Language:** English | **Price:** Free

**Link:** https://www2.compute.dtu.dk/pubdb/pubs/3274-full.html

**Tags:** linear-algebra, matrix-calculus, matrix-identities, reference, machine-learning

### 2. The Matrix Calculus You Need For Deep Learning

**Author:** Terence Parr, Jeremy Howard

Explains the vector and matrix derivative notation used in deep learning papers: partial derivatives, Jacobians, element-wise binary operators, the vector and total-derivative chain rules, and gradients of a single neuron and of a full loss function. Assumes only single-variable calculus.

**Difficulty:** Intermediate | **Language:** English | **Price:** Free

**Link:** https://explained.ai/matrix-calculus/

**Tags:** matrix-calculus, deep-learning, jacobians, chain-rule, gradients

## Books

### 1. Introduction to Probability for Data Science

**Author:** Stanley H. Chan

Undergraduate probability text written for data science: combinatorics, discrete and continuous random variables, joint distributions, expectation, transforms, sample statistics, regression and Bayesian inference, with Python and MATLAB code throughout. Free PDF, lecture videos, slides and exercises from the author.

**Difficulty:** Intermediate | **Language:** English | **Price:** Free

**Link:** https://probability4datascience.com/

**Tags:** probability, random-variables, statistical-inference, data-science, python

### 2. Practical Statistics for Data Scientists

**Author:** Peter Bruce, Andrew Bruce

A concise statistics book written for programmers that covers sampling, experimental design, A/B testing, regression, classification, and resampling, with R code throughout. Readers learn which statistical ideas matter for data science and how sampling and study design shape the conclusions data can support.

**Difficulty:** Intermediate | **Language:** English | **Price:** Paid

**Link:** https://www.amazon.com/dp/1491952962?tag=edmonddante07-20

**Tags:** applied-statistics, data-science, ab-testing, regression, resampling, r-programming

## Youtubes

### 1. StatQuest with Josh Starmer

**Author:** Josh Starmer

YouTube channel by Josh Starmer that explains statistics and machine learning step by step, from p-values, linear models and ANOVA to PCA, decision trees, neural networks and transformers. Viewers build clear intuition for how common methods work before tackling the math.

**Difficulty:** Beginner | **Language:** English | **Price:** Free

**Link:** https://www.youtube.com/@statquest

**Tags:** statistics, machine-learning, statistical-intuition, data-analysis

---

*This content is part of Dantes.io - Your Treasure Map to Knowledge*

*Curated by humans at Dantes.io. Personal study use welcome; republishing this curation requires permission (team@dantes.io).*

View this page online: https://dantes.io/subject/statistics-for-machine-learning