Linear Algebra for ML, CV, and Robotics

Author

James H. Choi, Ph.D.

Preface

This book teaches linear algebra through the problems it actually solves in machine learning, computer vision, and robotics.

Standard linear algebra textbooks present the theory cleanly but leave you to figure out why any of it matters for real work. Applied tutorials give you recipes without the foundations. Neither prepares you for the moment your solver silently returns a wrong answer, your camera calibration diverges, or your robot arm hits a singularity.

This book takes a different approach. Every concept is motivated by a real problem — trilateration, plane fitting, point cloud registration, Kalman filtering — and every technique is shown in Python code that you can run immediately.

What you will be able to do

After working through this book you will be able to:

  • Understand why a least-squares solver fails near rank-deficient configurations and how to detect it
  • Implement camera calibration from scratch and diagnose ill-conditioned calibration setups
  • Transform point clouds between coordinate frames without the pervasive normal-vector bug
  • Write a working Extended Kalman Filter for sensor fusion
  • Understand what an SVD is doing geometrically, not just how to call numpy.linalg.svd
  • Read papers in CV, robotics, and ML that use matrix notation without getting lost

How to read this book

Each chapter opens with a concrete problem, builds the necessary theory, and closes with a fully worked application in Python. The exercises are designed to expose the gaps in intuitive understanding that cause bugs in practice.

Fast tracks by field:

Track Essential chapters
Machine Learning 1, 4, 5, 13, 14, 15, 17, 18, 20, 21
Computer Vision 1, 4, 6, 7, 10, 11, 17, 18, 25
Robotics 1, 4, 7, 8, 9, 12, 17, 22, 23, 24

Code conventions

All code is Python 3. Paste any code block directly into a Jupyter notebook cell to run it.

Required packages:

# Install everything you need for this book
pip install numpy scipy matplotlib opencv-python open3d ipywidgets sympy scikit-learn