Bilingual, hands-on review of the linear algebra behind machine learning, deep learning, and tensors — from scalars to PCA, based on Chapter 2 of Deep Learning (Goodfellow, Bengio & Courville).
Use these materials before attending the Tensors Workshop. Each notebook takes roughly 10–15 minutes; working through all 14 takes about 2–3 hours total, and can be split across several sessions. Everything runs in Google Colab — no local install required.
Recommended order / Orden recomendado:
| # | Topic |
|---|---|
| 00 | Google Colab setup / Preparación de Google Colab |
| 1 | Scalars, vectors, matrices, and tensors / Escalares, vectores, matrices y tensores |
| 2 | Matrix–vector and matrix–matrix multiplication / Multiplicación de matrices y vectores |
| 3 | Identity and inverse matrices / Matrices identidad e inversa |
| 4 | Linear dependence and span / Dependencia lineal y span |
| 5 | Norms / Normas |
| 6 | Special matrices and vectors / Matrices y vectores especiales |
| 7 | Eigendecomposition / Descomposición en autovalores |
| 8 | Singular Value Decomposition (SVD) / Descomposición en valores singulares |
| 9 | Moore–Penrose pseudoinverse / Pseudoinversa de Moore–Penrose |
| 10 | Trace / Traza |
| 11 | Determinant / Determinante |
| 12 | Principal Component Analysis (PCA) / Análisis de componentes principales |
| Appendix / Apéndice | CPU/GPU frameworks: NumPy, TensorFlow, PyTorch |
| English | Slides · Exercises · English README |
| Español | Diapositivas · Ejercicios · README en español |
Every exercise notebook opens directly in Google Colab — no setup needed beyond the 00 setup notebook. Full tables with per-notebook Colab links live in en/README.md and es/README.md.
- Vectors and matrices / Vectores y matrices
- Matrix multiplication / Multiplicación de matrices
- Tensor shapes / Formas (
shape) de los tensores - Transpose / Transposición
- Linear dependence / Dependencia lineal
- Norms / Normas
- Eigendecomposition / Descomposición en autovalores
- SVD / Descomposición en valores singulares
- Pseudoinverse / Pseudoinversa
- PCA / Análisis de componentes principales
- Matrix factorizations / Factorizaciones matriciales
Arriving from a blog post about SVD or matrix factorizations? This section is for you. SVD and its relatives are core tools for:
- Dimensionality reduction — projecting high-dimensional data onto a smaller number of informative directions.
- Low-rank approximation — reconstructing a matrix (or image) from its most important components.
- Compression — storing an approximate version of a matrix using far fewer numbers.
- PCA — a direct application of eigendecomposition/SVD to find directions of maximum variance.
- Tensor decomposition — the same low-rank idea generalized beyond matrices to n-dimensional tensors.
- Machine learning — from recommender systems to model compression and adaptation techniques (e.g. LoRA-style low-rank updates).
These notebooks build the concepts up in order, each with a runnable Colab lab:
| Concept | English notebook | Notebook en español |
|---|---|---|
| Special matrices & vectors (diagonal, symmetric, orthogonal) | 06 Special matrices | 06 Matrices especiales |
| Eigendecomposition | 07 Eigendecomposition | 07 Eigendecomposition |
| Singular Value Decomposition (SVD) | 08 SVD | 08 SVD |
| Moore–Penrose pseudoinverse | 09 Pseudoinverse | 09 Pseudoinversa |
| PCA (eigendecomposition/SVD in practice) | 12 PCA | 12 PCA |
The matching slide sections are in the English deck and Spanish deck, sections 2.6–2.9 and 2.12.
This repository is meant to complement, not duplicate, in-depth blog coverage of SVD and matrix factorizations — use it to build or refresh the linear-algebra prerequisites, then read the deeper material with the notation and intuition already in hand.
Related blog posts — two complementary articles by Dr. Ravi Kalia:
- The Matrix That Rotates, Stretches, and Rotates Again — an intuitive, interactive exploration of SVD / una exploración intuitiva e interactiva de la descomposición en valores singulares (SVD).
- Matrix Factorizations as Optimization Problems: QR, SVD, Eigendecomposition, NMF, and Cholesky — QR, SVD, eigendecomposition, NMF, and Cholesky from an optimization perspective / QR, SVD, eigendecomposition, NMF y Cholesky desde una perspectiva de optimización.
.
├── en/
│ ├── slides/
│ ├── exercises/
│ └── README.md
├── es/
│ ├── slides/
│ ├── exercises/
│ └── README.md
├── shared/ # images, styles, code, and common resources
└── README.md
The Quarto site publishes a bilingual landing page and both slide decks. Shared assets live in shared/ to avoid duplication.
quarto previewThe notebooks can be opened directly from each language guide, run in Google Colab with no installation, or run locally with the dependencies in shared/requirements.txt.