Learn

Learning preferences

Make learning more comfortable. Changes apply immediately.

Enlarges page content, including diagrams and their labels. You can also use your browser’s zoom.

Choose the colours that are easiest for you to distinguish. Applies to lesson diagrams and lab plots. Labels, shapes, hatching and line patterns also distinguish meanings. Source photographs and raw image brightness stay unchanged; mask-only views are available for image overlays.

ExampleComparisonSample link

Saved in this browser on this device. Preferences are separate from progress backups.

Learn through experiments

Use a slope to improve a choice

When does following the downhill direction overshoot?

Entering midway? Revisit Build the largest enclosure for the preceding worked example, or start here and use the explanation below.

1 · Try

Start with a concrete question

Minimize the original synthetic squared-error function (x − 2)². A derivative gives its local slope; step size controls how far to move.

Try the initial inputs, then write a prediction before changing one setting. All calculations run locally on your CPU.

Go directly to the experiment · Review basic mathematics

2 · Predict

What do you expect?

Predict what happens when step size rises from 0.25 to 1.25.

3 · Experiment

Change one thing. Inspect what happens.

  1. At x=6 calculate error and slope before updating.
  2. Compare step sizes 0.25, 0.5, 1 and 1.25 with the same start.
  3. Start at the optimum x=2 and explain why no step moves it.
Experiment inputs
Inputs
Your settings
Mechanism
Calculation below
Evidence
Compare outcomes
Final position2.5
Final squared error0.25
Initial slope8

Compare the current results

Every bar starts at zero and uses the same numeric scale in this chart. The upper bound automatically adjusts to the largest current value (at least 1), so compare the numbers when changing inputs. Units and quantities come from each label; different kinds of quantity are not interchangeable. Displayed values are rounded to at most six significant digits.
016
  • Initial squared error16
    Initial squared error: 16Horizontal bar from zero to 16, on the shared zero to 16 numeric axis.
  • Step 1 squared error4
    Step 1 squared error: 4Horizontal bar from zero to 4, on the shared zero to 16 numeric axis.
  • Step 2 squared error1
    Step 2 squared error: 1Horizontal bar from zero to 1, on the shared zero to 16 numeric axis.
  • Step 3 squared error0.25
    Step 3 squared error: 0.25Horizontal bar from zero to 0.25, on the shared zero to 16 numeric axis.

Follow the calculation

  1. Step 1: slope = 2 × (6 − 2) = 8; next = 6 − 0.25 × 8 = 4.
  2. Step 2: slope = 2 × (4 − 2) = 4; next = 4 − 0.25 × 4 = 3.
  3. Step 3: slope = 2 × (3 − 2) = 2; next = 3 − 0.25 × 2 = 2.5.

A derivative measures local change. Subtracting the slope can reduce error, but an oversized step can oscillate or diverge.

Captures keep your inputs, prediction and observation. Results are recalculated from those inputs. Resetting inputs keeps your captures and challenge history.

4 · Understand

Explain the mechanism

Use a slope to improve a choice

Minimize the original synthetic squared-error function (x − 2)². A derivative gives its local slope; step size controls how far to move.

Predict before changing inputs

Predict what happens when step size rises from 0.25 to 1.25.

Understand the mechanism

A derivative measures how the output changes for a tiny input change. For this squared error the slope is 2(x−2).

At x=6, slope 8 and step size 0.25 give next x=6−0.25×8=4. Error falls from 16 to 4.

The direction alone is insufficient. At step size 1 the distance from the optimum stays the same while its sign flips; above 1 it grows.

Calculate it yourself

Slope = 2(x−2); next x = x − step size × slope.

Guided investigation

  1. At x=6 calculate error and slope before updating.

  2. Compare step sizes 0.25, 0.5, 1 and 1.25 with the same start.

  3. Start at the optimum x=2 and explain why no step moves it.

Assumptions and limitations

  • One convex scalar objective; real objectives can have multiple minima and noisy slopes.

  • Only eight updates run. Divergence here is a numerical lesson, not a training benchmark.

Further investigations

High school: Compare a small finite difference with the exact slope.

College: Prove the convergence range for this quadratic and implement gradient checks.

Working professionals: Explain a tuning decision with learning rate, failure criteria and a baseline.

5 · Apply

Try a fresh case

For error (x−3)², start at x=7 and use step size 0.25. What is x after one update?

This is a public practice check. Retries support learning; matching a number does not certify independent proficiency.

Take the investigation further

Choose any extension. These are project prompts for you to carry out; they are not automatically assessed.

School investigation

Compare a small finite difference with the exact slope.

College investigation

Prove the convergence range for this quadratic and implement gradient checks.

Workplace investigation

Explain a tuning decision with learning rate, failure criteria and a baseline.

6 · Continue

Keep the evidence, choose your next step

Completion records your own decision that you have worked through this investigation. Practice checks and independent project evidence are separate.