01 Math for learning
Home | Next: 02 Geometry and Kinematics
Vectors describe a robot
A vector is an ordered list of numbers. An arm configuration is : one joint position per coordinate. A velocity has different units from a position even when both use the same number of coordinates. Write units beside variables before combining them.
A matrix maps one vector to another. For and , . The transpose makes a column into a row. The Euclidean norm measures length. A dot product measures alignment, but only has a meaningful geometric interpretation when coordinates and units are compatible.
Derivatives tell you what to change
A scalar derivative measures local sensitivity. A gradient collects derivatives of a scalar loss with respect to many parameters:
holds learned weights; is the learning rate; counts optimizer updates. The chain rule propagates derivatives through composed functions and is the basis of backpropagation. Your existing Loss Functions and Backpropagation note connects here.
For the teaching example , . Starting at with gives . The step moves toward 3. A learning rate of 1 oscillates between 0 and 6; choosing a step size is part of numerical stability.

Analytic teaching example generated locally; this is not a robot training result.
Two learning rates on the bowl , where descent is stable only while . Rate 0.37 bounces across the steep direction; rate 0.08 is smooth but slow along the shallow one. Source: Tools/animations/ch01_gradient_descent.py.
Probability represents uncertainty
A random variable may take different values. Its expectation is a probability-weighted average. For discrete outcomes:
Conditional probability describes actions given an observation. Bayes’ rule updates a belief after evidence:
The prior expresses belief before seeing ; the likelihood models what you would observe if the state were ; the posterior is the updated belief. A probability of 0.9 is not a promise that a particular action succeeds.
Learn by doing
- Write the dimensions of camera features , a linear policy , and an action vector with six coordinates. What dimensions must have?
- Derive one gradient step for at , .
- Explain why averaging joint angles and camera pixels without normalization is problematic.
and . The second loss has gradient , so . Pixels and angles have incompatible scales and meanings; normalization aids optimization but does not make them physically interchangeable.
Build: implement linear regression with NumPy and compare your analytic gradient against central finite differences. Further mathematical study: MIT OpenCourseWare linear algebra.