Gradient descent as terrain. Apple's Grapher as algebraic bridge. The loss landscape rendered live. Where the mathematics meets the machine learning.
A machine learning model doesn't learn the way you do. It adjusts numbers. Millions of them. The question is: which direction do you adjust, and by how much? Calculus answers both questions. The derivative tells you the direction. The learning rate tells you the step size. Gradient descent is the algorithm that walks downhill.
θ is the parameter. α is the learning rate. ∇L is the gradient of the loss function. This single equation is the engine of modern AI.
Imagine a mountainous landscape where altitude is error. Gradient descent is a blindfolded hiker feeling the slope underfoot and stepping downhill. The learning rate is stride length — too large and you overshoot the valley, too small and you never arrive.
Local minima are false valleys. Saddle points are mountain passes where the gradient vanishes but you're not at a minimum. The landscape is high-dimensional — you can't visualize it, but the mathematics works regardless.
Grapher ships with every Mac. It's in /Applications/Utilities/Grapher.app. It renders 2D and 3D equations in real time, supports parametric surfaces, vector fields, and differential equations. It is the most underused mathematical tool in Apple's ecosystem.
In this lab, Grapher bridges symbolic algebra to visual calculus. You type the equation; Grapher shows you the surface. You adjust the learning rate; Grapher shows you the descent path.
Grapher is not a toy. It's a publication-grade mathematical visualization tool that ships free with macOS. For this curriculum, it replaces MATLAB and Mathematica for the functions that matter.
The canvas below renders a loss landscape. Click to place your starting point. Choose a learning rate. Press Run to watch gradient descent navigate the terrain.
Interactive canvas coming soon. This lab is under active development.
Interactive loss landscape visualization
Six prerequisite courses for CU Boulder's Master of Science in Computer Science. This lab maps directly to the calculus and mathematical foundations requirements.