Guide

Interactive toolkit

Live examples of the primitives used to build lesson interactives.

Linear transformations

A matrix A∈R2×2\mat{A} \in \R^{2 \times 2} is determined by the images of the basis vectors: its columns.

InteractiveA matrix deforms the plane
Show
A=[2.01.00.51.5]\mat{A} = \begin{bmatrix} 2.0 & 1.0 \\ 0.5 & 1.5 \end{bmatrix}
det⁡A\det \mat{A} (signed area)2.50
The columns of A\mat{A} are Ae1\mat{A}\vb{e}_1 and Ae2\mat{A}\vb{e}_2. The unit square becomes a parallelogram with area ∣det⁡A∣\abs{\det \mat{A}}.

Gradient descent

InteractiveZigzagging in a narrow valley
  • descent trajectory
  • level curves of ff
0.200
8.0
iter. 40
f(xk)f(\vb{x}_k)0.000
Threshold 2/a2/a0.250
Converges: ∣1−ηa∣<1\abs{1 - \eta a} < 1.
With η>2/a\eta > 2/a iteration along the direction of greatest curvature diverges.

Central limit theorem

InteractiveMeans approaching a normal distribution
  • Simulated ZnZ_n
  • density N(0,1)\Normal(0, 1)
Distribution
5
Skewness of ZnZ_n0.856
Replicates4000
Histogram of Zn=(Xˉn−μ)/(σ/n)Z_n = (\bar X_n - \mu)/(\sigma/\sqrt{n}) against the standard normal density.

3D surfaces

InteractiveThe gradient on a surface
1.00
-0.50
f(x,y)f(x, y)0.504
∥∇f∥\norm{\grad f}0.709
The gradient is perpendicular to the level curves and points in the direction of steepest ascent.