š Protected Content
Enter password to access mathematical animations and visualizations
ā Incorrect password. Please try again.
Mathematical Animations & Visualizations¶
Advanced Learning Tools for Deep Mathematical Understanding
š¬ About This Section¶
This section provides interactive mathematical animations and visualizations to help you develop intuitive understanding of abstract concepts covered in the course.
Tools Used: - Manim (Mathematical Animation Engine) - Created by Grant Sanderson (3Blue1Brown) - GeoGebra - Interactive geometry and algebra - Desmos - Graphing calculator - Python Visualizations - Custom interactive plots
š Why Mathematical Animations?¶
The Power of Visualization¶
Mathematical animations help you: - See abstract concepts in action - Understand geometric interpretations - Remember complex theorems through visual memory - Build intuition before diving into proofs - Connect different mathematical concepts
"Mathematics is not about numbers, equations, or algorithms: it is about understanding." - William Paul Thurston
šÆ Available Animations¶
Topic 1: Linear Algebra Fundamentals¶
Animation 1.1: Vector Addition and Scaling¶
- Visualizing vector addition (tip-to-tail method)
- Scalar multiplication and direction
- Linear combinations in 2D and 3D
š¹ Watch: Vector Operations Animation š» Code: Manim Source Code š Exercise: Try different scalars and see what happens!
Animation 1.2: Matrix Transformations¶
- Matrices as linear transformations
- Understanding det(A) geometrically (area scaling)
- Rotation, scaling, shearing, and reflection matrices
š¹ Watch: Matrix Transformations š» Interactive: GeoGebra - Matrix Transformations
Animation 1.3: Column Space and Null Space¶
- Visualizing column space as "reachable" vectors
- Null space as vectors that get squashed to zero
- Rank-nullity theorem in action
š¹ Watch: Column Space & Null Space
Topic 2: Analytic Geometry¶
Animation 2.1: Inner Products and Projections¶
- Geometric interpretation of dot product
- Vector projections animated
- Orthogonality visualization
š¹ Watch: Inner Products
Animation 2.2: Norms and Distances¶
- Different norms (L1, L2, Lā) visualized
- Unit balls in different norms
- Distance metrics comparison
š¹ Watch: Norms and Metrics
Topic 3: Matrix Decomposition¶
Animation 3.1: Eigenvalues and Eigenvectors¶
- What eigenvalues and eigenvectors really mean
- Visualizing Av = λv
- Diagonalization process animated
š¹ Watch: Eigendecomposition š Featured: This is one of the most important visualizations in the course!
Animation 3.2: Singular Value Decomposition (SVD)¶
- Breaking down any matrix into rotation + scaling + rotation
- Geometric interpretation of SVD
- Applications to image compression
š¹ Watch: SVD Visualization š» Interactive: SVD Image Compression Demo
Topic 4: Vector Calculus¶
Animation 4.1: Gradients and Directional Derivatives¶
- Gradient as "direction of steepest ascent"
- Visualizing gradient descent
- Contour plots and gradient fields
š¹ Watch: Gradient Visualization
Animation 4.2: The Chain Rule¶
- Chain rule in action with function composition
- Backpropagation visualization
- Computational graphs animated
š¹ Watch: Chain Rule & Backprop
Topic 5: Probability & Distributions¶
Animation 5.1: Common Probability Distributions¶
- Gaussian distribution evolving
- Central Limit Theorem animated
- Comparing different distributions
š¹ Watch: Probability Distributions
Animation 5.2: Bayesian Inference¶
- Prior to posterior animation
- Bayes' theorem visualized
- Updating beliefs with evidence
š¹ Watch: Bayesian Inference
Topic 6: Optimization¶
Animation 6.1: Gradient Descent Variants¶
- Batch, mini-batch, and stochastic gradient descent
- Momentum and acceleration visualized
- Adam optimizer animation
š¹ Watch: Optimization Algorithms š» Interactive: Gradient Descent Playground
Animation 6.2: Convex vs Non-Convex Optimization¶
- Convex functions and global minima
- Non-convex landscapes and local minima
- Saddle points visualization
š¹ Watch: Loss Landscapes
š ļø Create Your Own Animations¶
Getting Started with Manim¶
Manim is a powerful Python library for creating mathematical animations.
Installation¶
# Install Manim Community Edition
pip install manim
# Install dependencies
pip install numpy scipy matplotlib
Your First Animation¶
from manim import *
class VectorScene(Scene):
def construct(self):
# Create coordinate plane
plane = NumberPlane()
# Create vectors
v1 = Vector([2, 1], color=BLUE)
v2 = Vector([1, 2], color=RED)
v3 = Vector([3, 3], color=GREEN)
# Labels
v1_label = MathTex("\\vec{v}", color=BLUE).next_to(v1, RIGHT)
v2_label = MathTex("\\vec{w}", color=RED).next_to(v2, LEFT)
v3_label = MathTex("\\vec{v} + \\vec{w}", color=GREEN).next_to(v3, UP)
# Animate
self.add(plane)
self.play(Create(v1), Write(v1_label))
self.play(Create(v2), Write(v2_label))
self.wait()
self.play(Transform(v1.copy(), v3), Create(v3), Write(v3_label))
self.wait(2)
# Render with: manim -pql your_file.py VectorScene
Manim Resources¶
- Official Docs: https://docs.manim.community/
- 3Blue1Brown Channel: YouTube
- Manim Tutorial: Community Guide
Alternative Tools¶
1. GeoGebra (Interactive Geometry)¶
- Great for exploring transformations
- No coding required
- Download GeoGebra
2. Desmos (Graphing Calculator)¶
- Excellent for function visualization
- Web-based, no installation
- Desmos Calculator
3. Python + Matplotlib (Custom Visualizations)¶
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
# Example: Visualizing matrix transformation
def plot_transformation(A):
# Create unit square
square = np.array([[0, 1, 1, 0, 0],
[0, 0, 1, 1, 0]])
# Transform
transformed = A @ square
# Plot
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(12, 5))
ax1.plot(square[0], square[1], 'b-', linewidth=2)
ax1.set_title('Original')
ax1.grid(True)
ax1.axis('equal')
ax2.plot(transformed[0], transformed[1], 'r-', linewidth=2)
ax2.set_title('After Transformation')
ax2.grid(True)
ax2.axis('equal')
plt.show()
# Example usage
A = np.array([[2, 0],
[0, 1]]) # Scaling matrix
plot_transformation(A)
š Recommended Video Series¶
3Blue1Brown - Essence of Linear Algebra¶
The best visual introduction to linear algebra ever made.
- Vectors, what even are they? - Watch
- Linear combinations, span, and basis vectors - Watch
- Linear transformations and matrices - Watch
- Matrix multiplication as composition - Watch
- The determinant - Watch
- Inverse matrices, column space and null space - Watch
- Dot products and duality - Watch
- Cross products - Watch
- Change of basis - Watch
- Eigenvectors and eigenvalues - Watch
3Blue1Brown - Essence of Calculus¶
Visual approach to understanding derivatives, integrals, and gradients.
StatQuest - Statistics and ML Concepts¶
Great for probability and statistical learning visualizations.
š” How to Use This Section¶
Study Strategy:¶
- Before Lecture: Watch the relevant animation to build intuition
- During Lecture: Connect the visuals to mathematical definitions
- After Lecture: Create your own animations to test understanding
- Before Exam: Review animations for quick intuitive recall
Active Learning Tips:¶
- Pause and Predict: Stop the animation and guess what happens next
- Vary Parameters: Change values and observe the effects
- Code Your Own: Try recreating animations from scratch
- Teach Someone: Explain the visual to a classmate
š Student Projects¶
Want to earn bonus points? Create your own mathematical animation!
Project Ideas:¶
- Visualize the Jacobi or Gauss-Seidel iteration process
- Animate the convergence of gradient descent on different functions
- Show how PCA finds principal components
- Visualize the EM algorithm for Gaussian Mixture Models
- Animate SVM decision boundaries with different kernels
Submission:¶
- Email your Manim code to: mnemari@gmail.com
- Include a 1-page explanation of what you visualized
- Best submissions will be featured in this section!
- Bonus: +3% on final grade for exceptional work
š Download All Animations¶
Full Animation Pack (2.5 GB): š„ Download ZIP
Individual Topics: - Topic 1: Linear Algebra - 450 MB - Topic 2: Analytic Geometry - 320 MB - Topic 3: Matrix Decomposition - 380 MB - Topic 4: Vector Calculus - 290 MB - Topic 5: Probability - 340 MB - Topic 6: Optimization - 420 MB
š Access Information¶
This section is restricted to enrolled students only.
If you need the password: - Attend the first lecture - Check your email (sent after enrollment) - Contact during office hours
Keep the password confidential - sharing it violates academic integrity policies.
MOHAMMED ALNEMARI MATHEMATICS FOR MACHINE LEARNING ⢠SPRING 2026
Visualize. Understand. Master.
Last Updated: January 26, 2026 Next Animation Upload: Week 3 (SVD Deep Dive)