Classical Programme / Curriculum / Calculus of Learning
Companion Lab

The Calculus
of Learning.

Gradient descent as terrain. Apple's Grapher as algebraic bridge. The loss landscape rendered live. Where the mathematics meets the machine learning.

01

What machines do when they “learn”

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.

θnew = θold − α · ∇L(θ)

θ is the parameter. α is the learning rate. ∇L is the gradient of the loss function. This single equation is the engine of modern AI.

02

The loss landscape as terrain

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.

The tool

Apple Grapher

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.

Verdict

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.

Assessment
Sufficient for MS CS prerequisites
03

Interactive gradient descent

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.

Gradient Descent Canvas

Interactive loss landscape visualization

α = 0.01 α = 0.1 α = 0.5
CU Boulder MS CS

Prerequisite mapping.

Six prerequisite courses for CU Boulder's Master of Science in Computer Science. This lab maps directly to the calculus and mathematical foundations requirements.

CSCI 2820 Mapped

Linear Algebra with CS Applications

CSCI 2824 Mapped

Discrete Structures

APPM 1350 Active

Calculus 1 for Engineers

APPM 1360 Planned

Calculus 2 for Engineers

CSCI 3104 Planned

Algorithms

CSCI 3155 Planned

Principles of Programming Languages

Continue the sequence
Previous Module

← The Geometry of Knowing

Euclid's axiomatic method. The four-layer architecture that SwiftVector inherits.

Next Module

Linear Algebra as Transformation →

Matrices as transformations. Eigenvectors as invariant directions. The dot product as attention.