Lab Overview
Linear algebra is not only a list of definitions and theorems. It is a language for turning the world into numbers, transforming those numbers, measuring similarity, discovering hidden structure, and building intelligent systems.
The labs in this book are designed to help students learn by doing. Each chapter has two companion lab formats:
- Jupyter notebook lab: a guided Python notebook with explanations, computations, visualizations, experiments, and student tasks.
- Interactive HTML lab: a standalone visual activity page with sliders, buttons, dynamic graphics, and conceptual experiments.
The notebooks are best for deeper computation and coding practice. The interactive HTML labs are best for quick exploration, classroom demonstration, and intuition building. Lab and Interactive HTML page
For each chapter, first read the story and main mathematical ideas. Then open the interactive HTML lab to build intuition. Finally, work through the Jupyter notebook to compute, visualize, and extend the ideas in Python.
The lab sequence
The labs follow the same story arc as the book:
- Chapters 1–4: how the world becomes vectors, points, and data clouds.
- Chapters 5–8: how matrices transform information, solve systems, and lose information.
- Chapters 9–12: how geometry enters through distance, angles, projection, and orthogonality.
- Chapters 13–18: how hidden structure appears through eigenvectors, iteration, optimization, SVD, images, and PCA.
- Chapters 19–22: how signals, images, and text become linear-algebraic objects.
- Chapters 23–25: how linear algebra becomes the grammar of modern AI.
Complete lab list
| Chapter | Lab theme | Jupyter notebook | Interactive HTML |
|---|---|---|---|
| 1 | The world as numbers | Google Colab | Interactive |
| 2 | Vectors: numbers with meaning | Google Colab | Interactive |
| 3 | Combining ideas | Google Colab | Interactive |
| 4 | Data as points | Google Colab | Interactive |
| 5 | Matrix machines | Google Colab | Interactive |
| 6 | Stretching, rotating, shearing | Google Colab | Interactive |
| 7 | Solving backwards | Google Colab | Interactive |
| 8 | When information is lost | Google Colab | Interactive |
| 9 | Length and distance | Google Colab | Interactive |
| 10 | Angles and similarity | Google Colab | Interactive |
| 11 | Projection: the best shadow | Google Colab | Interactive |
| 12 | Orthogonality | Google Colab | Interactive |
| 13 | Eigenvectors | Google Colab | Interactive |
| 14 | Stability, ranking, and iteration | Google Colab | Interactive |
| 15 | Energy landscapes | Google Colab | Interactive |
| 16 | SVD: the matrix microscope | Google Colab | Interactive |
| 17 | Image compression | Google Colab | Interactive |
| 18 | PCA | Google Colab | Interactive |
| 19 | Fourier analysis | Google Colab | Interactive |
| 20 | Haar wavelets | Google Colab | Interactive |
| 21 | Images as matrices | Google Colab | Interactive |
| 22 | Text as vectors | Google Colab | Interactive |
| 23 | Neural networks as matrix machines | Google Colab | Interactive |
| 24 | Recommendation systems | Google Colab | Interactive |
| 25 | The grammar of AI | Google Colab | Interactive |
Lab map by learning goal
Foundations: representing the world
Chapters 1–4 teach how to translate real objects into vectors, features, tables, and point clouds. These labs emphasize representation, scaling, visualization, and the first geometric view of data.
Recommended classroom use:
- Use the interactive pages for live discussion.
- Use the notebooks for short coding assignments.
- Bring a small dataset and explain the meaning of each coordinate.
Matrix thinking: machines, systems, and information
Chapters 5–8 show matrices as machines. Learn to transform vectors, solve systems, understand invertibility, and diagnose what information is preserved or lost.
Recommended classroom use:
- Use Chapter 5 and Chapter 6 interactives to build geometric intuition.
- Use Chapter 7 and Chapter 8 notebooks for computation, rank, pivots, residuals, and numerical sensitivity.
Geometry of comparison and approximation
Chapters 9–12 build the geometric foundation of applied linear algebra: length, distance, angle, similarity, projection, and orthogonality.
Recommended classroom use:
- Assign Chapter 9 and Chapter 10 labs before nearest-neighbor, cosine similarity, or search applications.
- Use Chapter 11 and Chapter 12 labs as preparation for least squares, QR, PCA, and SVD.
Signals, images, text, and AI
Chapters 19–25 show how linear algebra becomes the infrastructure of modern data science and AI.
Recommended classroom use:
- Use Chapter 19 and Chapter 20 to compare global and local bases.
- Use Chapter 21 and Chapter 22 to connect images and text with matrices and vectors.
- Use Chapter 23–25 as an applied capstone sequence: neural networks, recommendation systems, and the grammar of AI.
Suggested assignment patterns
Short weekly lab
Complete one notebook section and one reflection question. This works well when the lab supports a lecture topic.
Full computational lab
Complete an entire notebook, including student tasks and extensions. This works well for Chapters 7, 11, 12, 15, 16, 18, 23, and 24.
Interactive pre-class exploration
Open the HTML page before lecture, move sliders, and write down three observations. This works well for geometric chapters such as 5, 6, 9, 10, 11, 13, and 18.
Mini-project extension
Modify a notebook by changing the dataset, image, signal, text corpus, or network. This works well for Chapters 17–25.
Suggested grading rubric
| Component | Description | Points |
|---|---|---|
| Conceptual understanding | Student explains what the computations mean, not only what the code returns. | 30 |
| Python computation | Code runs correctly and uses appropriate linear algebra operations. | 25 |
| Visualization | Graphs or images are clear, labeled, and interpreted. | 20 |
| Reflection | Student connects the lab to the chapter story and real applications. | 15 |
| Extension | Student modifies an example or explores a new case. | 10 |
Technical notes
The notebook labs are written for Python with standard scientific libraries such as numpy, matplotlib, and, when useful, pandas or scikit-learn. The interactive HTML labs are standalone pages using browser-based JavaScript and do not require Python to run.
A good rhythm is: interactive intuition first, Python computation second, mathematical explanation third.