Skip to content

Latest commit

 

History

28 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linear Algebra for Deep Learning

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).

🎯 Pre-Workshop Preparation

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

Languages

English Slides · Exercises · English README
Español Diapositivas · Ejercicios · README en español

Slides

Interactive exercises

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.

Recommended topics before the Tensors Workshop

  • 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

📐 SVD and Matrix Factorization

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:

Repository structure

.
├── 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.

Local preview / Vista previa local

quarto preview

The 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.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages