This lecture introduces a general formulation for optimization problems, which can be applied to linear regression, logistic regression, and support vector machines. By mapping these machine learning problems to this formulation, one can utilize the gradient descent algorithm to iteratively move in the opposite direction of the gradient until reaching the function's minimum.