LearnViz CompSci
Home / Learn / Math for Computing / Optimization

Advanced Topic 35 of 51 Math for Computing

Optimization

Finding inputs minimizing or maximizing a function.

How it works

Optimization finds the inputs that minimize or maximize an objective function, possibly subject to constraints. Unconstrained problems are approached by setting the gradient to zero and checking the Hessian, or by iterative methods such as gradient descent, Newton's method and quasi-Newton methods like BFGS. Constrained problems use Lagrange multipliers, penalty and barrier methods or specialized algorithms such as linear and quadratic programming. Landscapes may have local minima, saddle points and plateaus, and global optimization uses heuristics such as simulated annealing and evolutionary algorithms.

Where it is used

Training machine-learning models, resource allocation, scheduling, routing, portfolio selection, engineering design and parameter fitting use optimization.

Common pitfall

Non-convex problems can trap methods in poor local optima. Poor scaling and step sizes cause slow convergence or divergence. Constraints can make problems infeasible. The objective may not capture what you really want. Start with a convex formulation if possible, scale variables, use multiple starts and monitor convergence.

Where it fits in the course

Optimization is topic 35 of 51 in Math for Computing, rated Advanced. It follows Taylor Series. The next topic is Convex Optimization.

Practice and explore

How to study this topic

  1. Read the explanation above and restate the definition in your own words.
  2. Open the interactive lesson and answer its mini quiz.
  3. Read the common pitfall, then write a short example that avoids it.
  4. Check your understanding in the Math for Computing quiz, and revisit the topic if you miss a question.

Frequently asked questions

What is Optimization?
Finding inputs minimizing or maximizing a function. It belongs to Math for Computing and is an advanced-level topic.
Where do people use Optimization?
Training machine-learning models, resource allocation, scheduling, routing, portfolio selection, engineering design and parameter fitting use optimization.
What is the most common mistake with Optimization?
Non-convex problems can trap methods in poor local optima.
What should I learn before this topic?
Start with Taylor Series, the topic just before it in Math for Computing.
How can I practice it?
Answer the mini quiz in the interactive lesson, then take the Math for Computing quiz.
Is Optimization hard to learn?
It is an Advanced topic. Expect to read the explanation more than once and to connect it with earlier topics. Working through a small example by hand helps most.
How long does it take to learn Optimization?
Most learners can read the explanation and finish the interactive lesson in under an hour. Fluency comes from applying the idea, so plan a few short practice sessions with the quiz.
Which topics are related to Optimization?
Taylor Series, Convex Optimization, Integrals are closely connected. The full list is in the related topics section of this page.
What should I study after Optimization?
Continue with Convex Optimization, the next topic in Math for Computing.

Related topics