Linear Algebra for AI
Vectors, Matrices and the Geometry of Learning
- Pages
- 80
- Chapters
- 39
- Level
- Intermediate
- Format
- E-book
About this book
Every modern AI model is, underneath, a large amount of linear algebra. Embeddings are vectors, layers are matrices, attention is a set of dot products. This book makes that machinery intuitive.
Starting from vectors as arrows and lists of numbers, it covers dot products and similarity, matrices as transformations, matrix multiplication, systems of equations, rank, eigenvectors and the singular value decomposition, always connecting each idea to where it appears in AI. Worked examples are small enough to compute by hand.
You need school algebra and patience; no university mathematics is assumed.
What you will learn
- Vectors, length, angle and the dot product
- Matrices as transformations of space
- Matrix multiplication and why layers are matrices
- Solving systems, rank and what can be inverted
- Eigenvectors, eigenvalues and PCA
- The singular value decomposition and low-rank ideas
Table of contents
- IntroductionIntroduction
- Chapter 1Vectors as Lists and Arrows
- Chapter 2Adding and Scaling Vectors
- Chapter 3Length
- Chapter 4Unit Vectors and Normalisation
- Chapter 5The Dot Product
- Chapter 6Angles and Cosine Similarity
- Chapter 7Projections
- Chapter 8Other Norms
- Chapter 9Linear Combinations and Span
- Chapter 10Matrices as Tables of Numbers
- Chapter 11Matrices as Transformations
- Chapter 12Matrix Multiplication
- Chapter 13The Identity and Inverses
- Chapter 14Determinants
- Chapter 15Systems of Linear Equations
- Chapter 16Least Squares
- Chapter 17Bases and Coordinates
- Chapter 18Orthogonality
- Chapter 19Rank
- Chapter 20Eigenvectors and Eigenvalues
- Chapter 21Symmetric Matrices and Covariance
- Chapter 22Principal Component Analysis
- Chapter 23The Singular Value Decomposition
- Chapter 24Matrices Built From Outer Products
- Chapter 25Low-Rank Approximation
- Chapter 26Linear Algebra Inside a Neural Network Layer
- Chapter 27Gradients as Vectors
- Chapter 28Embeddings
- Chapter 29Attention as Matrix Operations
- Chapter 30Matrix Factorisation for Recommendation
- Chapter 31Computation, Precision and Scale
- Chapter 32Convolutions as Linear Operations
- Chapter 33Softmax: From Scores to Probabilities
- Chapter 34Rotations and Positional Encoding
- Chapter 35Normalisation Layers
- Chapter 36Geometry in High Dimensions
- Chapter 37Linear Algebra in Code
- Chapter 38Tensors: Beyond Matrices
- Chapter 39Where to Go Next
- AppendixExercises
- GlossaryGlossary
Who this book is for
Learners who want to understand the mathematics of AI models: students, developers and analysts comfortable with school algebra.
Details
| Format | PDF + web edition |
|---|---|
| Length | 80 pages (approx.) |
| Chapters | 39 |
| Level | Intermediate |
| Language | English |
| Topic | Fundamentals |
| Author | Latent Library Editorial |
Keep reading