In words
What it is, why it matters, and what it is like.
Why am I learning this?
Optimal control is the mathematical foundation of how AI systems make sequences of decisions under uncertainty. You will see its fingerprints everywhere: the way a self-driving car steers, the way an LLM generates tokens one at a time, the way a robot re-plans when something unexpected happens. Learning this unlocks the deeper understanding of: Model Predictive Control (re-solving decisions as reality diverges), Dynamic Programming and the Bellman principle (the heart of reinforcement learning), and the Euler-Lagrange equations that characterise optimal trajectories. It connects directly to your notes on Gradient Descent (adjusting parameters to minimise a loss) and Convex Optimization (when is the best answer guaranteed).
The idea, in plain terms
Imagine you are planning a road trip from Delhi to Mumbai. You have a map, a car, and a limited amount of petrol. You want to arrive as quickly as possible, but you also care about comfort, delays, and not breaking down. Every time you decide how fast to go, which roads to take, and whether to stop for tea, you are choosing a 'control'. The whole plan — what you do at every moment — is called the 'control policy'. Optimal control is the study of how to choose that policy so that, over the journey, you optimise some measure of success: total time, fuel used, or a blend of many factors. The catch: the road conditions change (traffic, weather), and your decisions now affect what happens later. If you speed now, you might run out of fuel later. If you stop for tea, you might miss the rush-hour traffic in Pune. So the best policy is not just about what to do now, but about how your choices now shape your options later. That's the essence of optimal control: making a sequence of decisions that together give the best outcome, knowing that the world is dynamic and the future depends on your choices.
An analogy
Think of the captain of a ship crossing the Indian Ocean. The ship has engines that can be throttled up or down, and a rudder that can turn it. These are the 'controls'. The 'state' of the ship is its position and speed. The captain wants to reach the port while minimising fuel and avoiding storms. This is a ship control problem. The captain could decide the entire route and engine settings before departure, then just follow the plan. But the ocean has currents that push the ship off course, winds change, and storms appear. So the smart captain does not just plan once; he re-plans constantly. Every hour, he looks at where the ship actually is, compares it to where he wanted to be, and adjusts the rudder and throttle to get back on track. This is 'feedback control'. The mathematical framework for this is called 'model predictive control' — you solve a short planning problem using a model of the ocean, apply the first action, then measure the real outcome, and solve again.
Where the analogy breaks down: in our ship story, the captain has a pretty good idea of the ocean's behaviour — that's the 'model'. In many AI problems, we don't know the model exactly. We learn it from data. Also, the same mathematics assumes we can quantify 'good' with a single number — the 'cost'. But real journeys have many conflicting goals, and the brain of a captain is not as simple as a number. The mathematics also assumes we can measure the ship's state perfectly, but in real life, sensors are noisy. These gaps are what make modern AI control different: we often learn the model and the cost from data, and we deal with uncertainty.
Definition
Optimal control is the problem of choosing a sequence of decisions (controls) over time so as to minimise a given cost, where the state of the system changes according to known (or learned) dynamics.
Where this sits
You have notes on Optimization: this is that same idea — minimise a cost — but applied over time, not just at a single point. Your notes on Gradient Descent show how to adjust a set of parameters to minimise a loss; here, the 'parameters' are the decisions at each moment, and the loss is the accumulated cost over time. The Bellman principle, which you'll learn now, is the cornerstone of Reinforcement Learning, which your library calls the continuous-time ancestor of RL. Convex Optimization connects: if the cost and dynamics are convex, the optimal policy is unique and easy to find; otherwise, as in deep learning, we rely on practical methods.