Stanford EE364A Convex Optimization I Stephen Boyd I 2023 I Lecture 1

Stanford EE364A Convex Optimization I Stephen Boyd I 2023 I Lecture 1

Course Logistics

  • The course will primarily use Ed, with a static course website as a supplement.
  • Contact the staff using the provided email address, which goes to all TAs.
  • Course requirements include weekly homework assignments, a midterm quiz, and a 24-hour take-home final exam.

Course Content

First Three Weeks

  • The initial focus will be on math, which may be challenging for those more interested in applications.
  • Topics will include basic concepts like declining verbs in Spanish and pronouncing tones in Chinese.
  • The midterm quiz will cover material from these first three weeks and will be in a traditional format, focusing on basic material without gratuitous math.

Transition to Applications

  • After the first three weeks, the course will transition to applications, making the material more relevant and interesting.
  • Python and CVX Pi will be the primary tools, with support for other languages like CVX R, CVX JL, and CVX MATLAB.


  • Prerequisites include linear algebra, probability, and basic Python skills.

Chat GPT and Language Models

  • Chat GPT has been used to generate solutions to homework and final exam problems, but its responses are often incorrect despite being well-written.
  • The instructors plan to train a large language model using the discussion forum to provide accurate answers to students' questions.

Optimization Basics


  • Optimization problems involve choosing decision variables to minimize an objective function while satisfying constraints.
  • The objective function represents the best effort, and the smaller or more negative its value, the better.
  • Constraints are predicates that evaluate to true or false and describe limitations or preferences.
  • A solution or optimal point (xstar) has the smallest objective value among all choices that satisfy the constraints.


  • Portfolio optimization: Construct a portfolio with minimum risk while meeting various constraints.
  • Device sizing in electronic circuits: Determine the size of gates to meet timing requirements while considering factors like area and power consumption.


  • Circuit design: Size critical paths to ensure signal validity.
  • Data fitting: Find parameters in a model that minimize misfit with training data while promoting robustness.

Convex Optimization

  • Convex optimization is a mathematical technique used to solve optimization problems with non-negative curvature.
  • Linear programming is a specific type of convex optimization problem with analytical solutions for a limited number of cases.
  • Convex optimization problems are ubiquitous in various fields, including supply chain management, scheduling, and engineering.
  • Recognizing convex functions is crucial for solving convex optimization problems, and the course will focus on developing this skill.

Course Structure and Expectations

  • The course aims to train students to recognize and solve convex optimization problems.
  • Students will gain practical experience by writing 10-line scripts and working on problems in various fields.
  • The focus is on solving problems rather than delving into the theory behind optimization.
  • The course will provide a sandbox environment for students to practice and master various optimization techniques.
  • The tone of the course will change significantly after the first class, becoming more challenging and in-depth.

Overwhelmed by Endless Content?