Lecture 2: Optimization via quadratic approximation
Overview
Burton Ma introduces minimization concepts through a triangle-distance example, then develops a one-dimensional line search that fits a quadratic to three bracketed samples and repeatedly narrows the bracket. He explains local versus global minima, derives the parabola’s minimizer, and demonstrates MATLAB implementation details including stopping tolerances, iteration limits, Vandermonde systems, and solving with backslash rather than an explicit matrix inverse.
Key takeaways
- A valid one-dimensional bracket requires t₁ < t₂ < t₃ and f(t₂) below both endpoint values, which confines a local minimum to the interval.
- Quadratic interpolation estimates a local minimum from three function evaluations by solving a Vandermonde system and calculating t* = −a₂/(2a₁).
- Updating the bracket according to the fitted minimum’s location and value progressively narrows the search, but cannot guarantee the global minimum.
- The optimization algorithm sees function evaluations rather than the complete objective-function graph, so visual intuition from a plot is not available to the procedure itself.
- In MATLAB, solve the coefficient system with A\y rather than inv(A)*y; the backslash solve is generally more numerically stable.
- The demonstrated stopping rule checks the change in successive t* estimates against a default tolerance of 10⁻⁶ and also caps execution at 10 iterations.
Chapters
- The example minimizes the sum of distances from a point X to triangle vertices A, B, and C.
- A MATLAB brute-force grid produces contour lines, each representing a constant objective value; one shown contour is about 5.99.
- For one triangle, the approximate minimizer is (3.52, 1.56) with a distance sum near 4.83; changing the triangle can put the minimizer at a vertex.
- Optimization searches a set of candidates, such as a subset of the real numbers R or vectors in R² and Rⁿ.
- The example sets include numbers between 0 and 1 and vectors with length less than 1, forming a unit disk in R².
- An objective function maps a candidate to a real-valued cost; the triangle problem’s cost is the sum of its three vertex distances.
- An optimization algorithm generally evaluates points rather than seeing the complete graph of the objective function.
- The arg min identifies the input that minimizes a function, while min gives the function value at that input.
- Maximization can be rewritten as minimization by negating the objective function.
- An exponentially damped sinusoid on the interval from 0 to 10 has eight local minima, but only one lowest value on that restricted domain.
- A global minimizer has an objective value no greater than the value at any other point in the domain; a strict global minimizer is strictly lower.
- Local minimizers are lowest within a neighborhood, and optimization algorithms can converge to one without finding the global minimum.
- A bracket uses three ordered points t₁ < t₂ < t₃ with f(t₂) below both f(t₁) and f(t₃).
- These inequalities establish that a minimum lies somewhere in the interval from t₁ to t₃, although multiple local minima may be present.
- Line-search methods reduce higher-dimensional optimization tasks to a sequence of one-dimensional searches.
- The method fits p(t) = a₁t² + a₂t + a₃ through the three evaluated points at t₁, t₂, and t₃.
- The coefficients come from a 3×3 Vandermonde linear system whose rows use t², t, and 1.
- A quadratic is useful because smooth functions often resemble a parabola near a local minimum, and its minimum is easy to calculate.
- Setting p′(t) = 2a₁t + a₂ to zero gives the fitted parabola’s stationary point, t* = −a₂/(2a₁).
- The bracket conditions determine which endpoint or interior point to replace, with four cases based on whether t* lies between t₁ and t₂ or t₂ and t₃ and how its fitted value compares with f(t₂).
- Repeated bracket updates shrink the search interval; the method finds a local minimum within the bracket, not a guaranteed global minimum.
- The MATLAB function q_fit_search accepts a function handle and three bracket points, with checks for real values and the ordering t₁ < t₂ < t₃.
- The example uses a default tolerance of 10⁻⁶ and a maximum of 10 iterations; it stops when the estimated t* changes by less than the tolerance or the iteration limit is reached.
- The implementation tracks function evaluations and can also store the history of t* estimates and fitted parabola coefficients.
- The fitted coefficients solve A a = y, where A is the Vandermonde matrix and y contains the three bracket-point function values.
- MATLAB’s backslash operator, A\y, is preferred to explicitly computing inv(A)*y because it solves the system more numerically stably.
- Vandermonde matrices can become poorly conditioned as powers grow, though the lecture’s fitting system is only 3×3.
Transcript excerpt
0:00 uh able to store the videos on my USB key for the previous lecture and I know it's not going to work today. Uh so I have to ask it to see if this thing is actually recording or not. So I can't promise you that either of the first two videos will be there. Uh if this thing's not working at all then I have to come up with some other solution to record these videos. All right. So uh we ended up looking at this little uh small example of an optimization problem at the last class. Right? So remember you're given a triangle or points uh making up the triangle. So A, B, and C. Uh and the goal is to find some point X such that the sum of the distances between X and the corner of the triangles is a minimum. Uh and so we were playing around in mat lab and I showed you a little uh a very
0:49 well a short mat lab script um that tries to brute force the solution, right? Uh and we ended up here. So there's our triangle. Uh these lines that you see uh these are called contour lines. Um which you may or may not have seen before. Uh each line represents a constant value of our uh of the objective function. Right? So our objective function is the sum of the distances from a point to a to the uh points of the triangle. Right? And so if you're on this line here, uh I guess it says its value is 5.99, right? If you're at that point, if you took the distance from that point to each of the three uh points on the triangle, sum those distances, you would
1:36 get 5.99, right? And they get smaller uh as you
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
In this course
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Burton Ma.