The Topology of Sets: Open, Closed, and Compact
In optimization, we often restrict our choices to a specific set, such as a budget set. The "shape" of this set determines whether our mathematical tools will work.
Open and Closed Sets
A set S is open if every point in S has "breathing room"—meaning you can draw a tiny ball around any point in the set that stays entirely within the set. The collection of all such points is called the interior of the set (int S).
Conversely, a set is closed if it contains all its limit points. A useful way to think about this is through the complement: a set is closed if and only if everything not in the set is open.
Boundedness and Compactness
A set is bounded if it does not extend to infinity; it can be contained within a ball of a fixed radius B.
The most critical concept for economists is compactness. In Rn, a set is compact if and only if it is both closed and bounded.
Why it matters: The Extreme Value Theorem (or Weierstrass Theorem) states that a continuous function on a non-empty compact set is guaranteed to reach both a maximum and a minimum. Without compactness, a firm's profit might increase forever without ever reaching a peak.

Functions of Several Variables and Continuity
In economics, functions usually depend on multiple inputs (e.g., a production function $Q = f(L, K)$). A function f:Rk→Rm maps a vector of k inputs to a vector of m outputs.
Component Functions and Continuity
A vector-valued function is continuous if and only if every one of its component functions is continuous. We define continuity through sequences: f is continuous at x0 if, whenever a sequence xn converges to x0, the sequence of outputs f(xn) converges to f(x0).
Quadratic Forms
Many economic models involve quadratic expressions, such as $x^T Ax$, where A is a symmetric matrix. These are called quadratic forms. For example, the expression x12−2x1x2+x22 can be written in matrix form to simplify complex calculations involving curvature and optimization.
Calculus and Optimization
To find the "best" outcome, we use derivatives to find critical points—points where the gradient ∇f is zero.
The Gradient and Differentials
For a function of several variables, the gradient ∇f is a vector of all its first-order partial derivatives. The total differential df provides a linear approximation of how the function changes given small changes in the inputs:
df=∂x∂fdx+∂y∂fdy
This is used in marginal analysis to estimate changes in production or demand without re-calculating the entire function.
Second-Order Conditions
Finding a point where the gradient is zero is not enough; we must check if it is a maximum, a minimum, or a saddle point (a point that is a maximum in one direction but a minimum in another). We use the Hessian matrix Hf, which contains the second-order partial derivatives. In two variables, we look at the determinant D=fxxfyy−fxy2:
- If D>0 and fxx<0, it is a strict local maximum.
- If D>0 and fxx>0, it is a strict local minimum.
- If D<0, it is a saddle point.
For a strictly concave function on a convex domain, any local maximum is actually a unique global maximizer.