Last updated on July 13th, 2025
In linear programming, the objective function is used to represent and solve optimization problems. It is written in the basic form Z = ax + by, where x and y are the decision variables and a and b are constants. The objective function is either maximized or minimized to find the optimal solution. In this article, we will learn the objective function, related terms, and common types of objective functions.
An objective function represents a linear programming optimization problem and is used to solve. The equation for objective function is Z=ax+by, where Z is the value to be optimized, x and y are variables, and a and b are constants, where x > 0 and y > 0.
The objective functions can be classified into two types, such as:
Maximization Objective Function: It is a mathematical expression used for maximizing the quantity in an optimization condition. It is the value obtained at one of the vertices of the feasible region formed by the constraint.
Minimization Objective Function: It is a mathematical expression where the quantity of the function has to be minimized under optimization. The solution typically lies at one of the vertices of the feasible region.
There are different methods of solving problems with objective functions, such as:
Graphical Method: The graphical method involves converting the given problem to a mathematical equation and plotting it on an XY-plane. The feasible part is the region of intersection.
Northwest Corner Method: First, we form an equation based on the given problem and then mark the feasible region. The objective function is then evaluated at each corner point of this region. If the feasible region is bounded, the highest and lowest values, denoted as N and n, give the maximum and minimum of the objective function. If the region is unbounded, the maximum exists only if the objective function’s open half-plane doesn’t overlap with the feasible region. Or else there is no solution
Iso-cost Method: In this method, we plot the constraints on a graph and identify the feasible region. Then plot the objective function, use the objective function, and choose any suitable value for the objective function Z, and draw its line. Draw a parallel line to the objective function line. Mark the coordinates of the corner points within the feasible region, and then decide a suitable value of Z and draw its corresponding line.
In linear programming, the objective function follows two theorems that help in identifying the optimal solution:
The linear programming problem is solved to find to maximize or minimize an objective function, in the form Z = ax + by. In this section, we will learn how to solve an objective function.
Step 1: Representing the objective function Z = ax + by and the constraints x ≤ k, y ≤m as a straight line on the graph. It forms a feasible region, that is, the common overlapping area.
Step 2: Identifying the corner points of the feasible region using a graph or solving equations where the constraints' line intersects each other
Step 3: Calculating the objective function value for each of the corner points. Then identify the maximum and minimum value.
Step 4: The values are easy to identify if the feasible region is bounded; if it is unbounded, then:
The objective functions are used to quantify the goal of optimization problems and to find the optimal solution in different fields. Here are some of the real-life applications of the objective function.
Students often make mistakes when finding the objective function. Here are some common mistakes and tips to avoid them.
For example, a farmer has at most 12 hours a day to work on two crops: wheat and corn. He spends 3 hours cultivating one acre of wheat and 2 hours on one acre of corn. He can manage a maximum of 4 acres in total. Furthermore, he earns a profit of Rs 50 per acre of wheat and Rs 80 per acre of corn. Determine the objective function
P = 50x + 80y
Let:
x be the number of acres of wheat
y be the number of acres of corn
The objective function is to maximize profit, which is the total profit from both crops:
The farmer plants x acres of wheat and y acres of corn,
So the profit from wheat = 50x
Profit from corn = 80y
So, total profit: P = 50x + 80y
The time constraint: 3x + 2y ≤ 12
Land constraint: x + y ≤ 4
A factory makes two products, A and B. Profit on A is $40 per unit and on B is $30 per unit. The objective is to maximize the total profit. Write the objective function.
P = 40x + 30y
Let x be the unit of product A
y is the unit of product B
The profit per unit from product A = $40 per unit
The profit per unit from product B = $30 per unit
The profit from product A = 40x
The profit from product B = 30y
So, P = 40x + 30y
A bakery sells cakes and pastries. Each cake gives a revenue of $20 and each pastry gives $8. How should the bakery maximize its revenue?
The objective function to maximize the total revenue is: R = 20x + 8y
Let us consider the number of cakes sold is x
The number of pastries sold is y
The total revenue is the sum of revenue from cakes and pastries
Revenue from cakes = 20x
Revenue from pastries = 8y
So, total revenue R = 20x + 8y
A delivery truck uses 2 liters of fuel per km on city roads and 1.5 liters per km on highways. To reduce fuel usage, write the objective function.
F = 2x + 1.5
Let x be the kilometers driven on city roads, and y be the kilometers driven on highways
Driving x km in the city uses 2x liters
Driving y km on the highway uses 1.5y liters
So, F = 2x + 1.5y
Jaskaran Singh Saluja is a math wizard with nearly three years of experience as a math teacher. His expertise is in algebra, so he can make algebra classes interesting by turning tricky equations into simple puzzles.
: He loves to play the quiz with kids through algebra to make kids love it.