Functions on Rⁿ
A function on takes a vector as input and returns a single real number. You can picture it as a machine: feed in a point in -dimensional space, get out a height. These scalar-valued functions are the core objects of optimization — you want to find the input vector that makes the output as small (or as large) as possible.
Functions can have different levels of "complexity." The simplest are constant functions (same output no matter what you put in), followed by linear functions (output scales proportionally with the input), and then quadratic functions (output involves products of pairs of variables). This chapter focuses on all three types, because understanding them is essential for optimization in later chapters.
Formal View
In optimization we seek , the input that minimizes the function's output.
Why This Matters
Nearly every real-world optimization problem — from training a neural network to engineering a bridge — reduces to minimizing a scalar function on a vector space.
- Loss functions in machine learning: measures how well parameters fit data.
- Potential energy in physics: gives the energy stored in a mechanical system at configuration .
- Portfolio risk in finance: measures the variance of a portfolio with weights .
Learning Resources
Quiz
Which of the following is an example of a scalar-valued function on ?
A scalar-valued function on can return a vector as its output.
Common Mistakes
- Confusing scalar-valued functions with vector-valued functions — the chapter focuses exclusively on scalar outputs.
- Thinking that "function on " implies anything about the complexity of — it can be any rule that assigns a number to each input vector.