Rigorous mathematics deserves more than static ink on paper.
This repository contains animated visualizations of key theorems and proof techniques spanning Topological Data Analysis, Fixed Point Theory, Multi-Objective Optimization, Banach Algebras, and Support Vector Machine Classification. Every animation is written in Manim Community Edition and is fully reproducible from source.
| Proof | Domain | Key Idea |
|---|---|---|
| Persistent Homology | Topological Data Analysis | Vietoris--Rips filtration and persistence barcodes |
| Banach Fixed Point Theorem | Functional Analysis | Contraction mappings and cobweb iteration |
| Pareto Front Construction | Optimization | Dominance, non-dominated sets, and the Pareto frontier |
| Banach Algebra Spectrum | Abstract Algebra / Analysis | Norms, spectral radius, and invertibility |
| SVM Maximum Margin | Machine Learning Theory | Optimal separating hyperplane and support vectors |
File: proofs/persistent_homology/scene.py
Visualizes the core pipeline of persistent homology:
- A random 2D point cloud is sampled.
- Balls of increasing radius grow around each point (Vietoris--Rips construction).
- Edges appear when balls overlap; triangles fill when three-way intersections form.
- A persistence barcode diagram is drawn, showing birth and death of topological features.
Mathematical context: Persistent homology tracks how topological features (connected components, loops, voids) appear and disappear across a filtration of simplicial complexes built from data. The resulting barcodes provide a multi-scale signature of the shape of data.
File: proofs/fixed_point_theorems/scene.py
Animates the classical Banach contraction mapping theorem on the real line:
- A contraction mapping
f: [0,1] -> [0,1]is plotted alongsidey = x. - Starting from an arbitrary initial point, the cobweb iteration is traced.
- The iterates visibly converge to the unique fixed point.
- The contraction constant and convergence rate are displayed.
Mathematical context: If (X, d) is a complete metric space and T: X -> X satisfies d(Tx, Ty) <= q * d(x, y) for some q in (0,1), then T has a unique fixed point, and every Picard iteration converges to it.
File: proofs/optimization/scene.py
Demonstrates Pareto optimality in bi-objective optimization:
- A scatter of candidate solutions is plotted in objective space.
- Dominated solutions are identified and dimmed.
- Non-dominated (Pareto-optimal) solutions are highlighted.
- The Pareto front curve is traced through the non-dominated set.
Mathematical context: A point x* is Pareto optimal if there is no feasible x such that f_i(x) <= f_i(x*) for all objectives with strict inequality for at least one. The set of all Pareto-optimal points forms the Pareto front.
File: proofs/banach_algebra/scene.py
Visualizes fundamental concepts in Banach algebra theory:
- A Banach space norm ball is drawn in an abstract 2D representation.
- The spectrum of an element is displayed in the complex plane.
- The spectral radius is shown as a bounding circle.
- Invertibility regions are highlighted with the resolvent set.
Mathematical context: In a unital Banach algebra A, the spectrum sigma(a) of an element a is the set of lambda in C for which lambda e - a is not invertible. The spectral radius formula states r(a) = lim ||a^n||^{1/n} = inf ||a^n||^{1/n}.
File: proofs/svm_classification/scene.py
Builds intuition for the Support Vector Machine optimization problem:
- Two-class data is plotted in 2D feature space.
- Several candidate separating hyperplanes are drawn.
- The maximum-margin hyperplane is identified.
- Support vectors are highlighted and the margin band is shaded.
Mathematical context: The SVM solves min (1/2)||w||^2 subject to y_i(w . x_i + b) >= 1. The optimal hyperplane maximizes the geometric margin 2/||w|| between classes. Only the support vectors (points on the margin boundary) determine the solution.
# Low quality (fast preview, 480p @ 15fps)
manim render -ql proofs/persistent_homology/scene.py PersistentHomologyScene
# High quality (production, 1080p @ 60fps)
manim render -qh proofs/persistent_homology/scene.py PersistentHomologyScenefor scene_dir in proofs/*/; do
manim render -qh "${scene_dir}scene.py"
donemanim render -qh --format=gif proofs/persistent_homology/scene.py PersistentHomologyScene
# Output: media/videos/scene/1080p60/PersistentHomologyScene.gifmkdir -p frames/persistent_homology
ffmpeg -i media/videos/scene/1080p60/PersistentHomologyScene.mp4 \
-vf "fps=30" \
frames/persistent_homology/frame_%04d.png| Package | Version | Purpose |
|---|---|---|
manim |
>= 0.18 | Animation engine (Community Edition) |
numpy |
>= 1.24 | Numerical computation |
scipy |
>= 1.11 | Scientific computing utilities |
| Tool | Purpose |
|---|---|
ffmpeg |
Video/frame conversion |
pdflatex |
Beamer slide compilation (optional) |
| Python 3.10+ | Runtime |
pip install -r requirements.txtanimated-proof-gallery/
βββ README.md
βββ LICENSE
βββ requirements.txt
βββ proofs/
β βββ persistent_homology/
β β βββ scene.py # Vietoris-Rips filtration + persistence barcodes
β βββ fixed_point_theorems/
β β βββ scene.py # Banach contraction mapping + cobweb diagram
β βββ optimization/
β β βββ scene.py # Pareto front construction
β βββ banach_algebra/
β β βββ scene.py # Spectrum and spectral radius visualization
β βββ svm_classification/
β βββ scene.py # Maximum margin hyperplane + support vectors
βββ media/
βββ gifs/ # Exported GIF animations
βββ videos/ # Rendered MP4 videos
Contributions are welcome. To add a new animated proof:
- Create a new directory under
proofs/with a descriptive name. - Add a
scene.pyfile containing one or more ManimScenesubclasses. - Ensure the animation renders cleanly with
manim render -qh. - Update this README with a description of the proof.
- Open a pull request.
Please follow the existing code style: descriptive class names, consistent color palettes, clear mathematical labels, and animations between 10--20 seconds.
If you use these animations in a talk, lecture, or publication, please cite:
@misc{joshi2026animatedproofgallery,
author = {Joshi, Milan Amrut},
title = {Animated Proof Gallery: Mathematical Proofs Come Alive},
year = {2026},
publisher = {GitHub},
howpublished = {\url{https://github.com/mlnjsh/animated-proof-gallery}},
note = {Manim Community Edition visualizations of theorems in TDA,
optimization, functional analysis, and machine learning}
}This project is licensed under the MIT License. See LICENSE for details.
Built by Prof. Milan Amrut Joshi
mlnjsh@gmail.com Β·
github.com/mlnjsh
Mathematics Β· Topology Β· Optimization Β· Machine Learning