Course contentsShow
← Mathematics
Lesson 305 of 3,1218. Systems of Linear Equations and InequalitiesFree lesson

The Objective Function

Write and interpret objective functions that represent quantities to be optimized in real-world scenarios.

The Objective Function

What you'll learn: You'll learn what an objective function is and how to write and interpret it to represent real-world quantities you want to maximize or minimize.

What Is an Objective Function?

An objective function is a mathematical expression that represents the quantity you're trying to optimize—either maximize (make as large as possible) or minimize (make as small as possible). Think of it as your goal equation.

In real-world scenarios, you might want to:

  • Maximize profit, revenue, nutrition, or production output
  • Minimize cost, waste, time, or pollution

The objective function captures this goal mathematically using variables that represent the decisions you can make.

Structure of an Objective Function

The general form looks like:

P = ax + by (for two variables)

Where:

  • P (or sometimes z, C, R) represents the quantity to optimize
  • x and y are decision variables (things you control)
  • a and b are coefficients showing how much each variable contributes

Example

A bakery makes cookies and brownies. Cookies earn 3profiteach,andbrowniesearn3 profit each, and brownies earn 5 profit each. If x = number of cookies and y = number of brownies, the objective function for profit is:

P = 3x + 5y

This tells us: Total profit equals 3timesthecookiesplus3 times the cookies plus 5 times the brownies. You want to maximize P.

Writing Your Own

To write an objective function:

  1. Identify what you want to maximize or minimize
  2. Define your variables clearly
  3. Determine each variable's contribution (coefficient)
  4. Assemble the linear expression

Key Takeaway: The objective function is the formula representing the quantity you want to maximize or minimize, written in terms of the decision variables in your problem.