Courses
Courses for Kids
Free study material
Offline Centres
More
Store Icon
Store

Objective Function in Linear Programming Explained Clearly

ffImage
hightlight icon
highlight icon
highlight icon
share icon
copy icon

Objective Function Formula Examples and How to Solve Step by Step

Making smart choices in business, science, or even exam problems often comes down to maximizing profit or minimizing cost. The objective function helps you do this by turning real-world situations into simple equations—so you can spot the best answer faster and ace those board or competitive exam questions.


Formula Used in Objective Function

The standard formula is: \( Z = ax + by \), where Z is the objective function, x and y are decision variables, and a and b are constants (like profit or cost per unit).


Here’s a helpful table to understand objective function more clearly:


Objective Function Table

WordValueApplies?
Maximize Profit, Output Yes
Minimize Cost, Loss Yes
Subjective Opinion No

This table shows how the pattern of objective function always focuses on measurable values that can be maximized or minimized in real problems.


Worked Example – Solving a Problem

Let’s use an objective function to solve a classic linear programming scenario.

1. Suppose a furniture shop earns ₹300 profit per table and ₹100 per chair. They have ₹50,000 to invest (each table costs ₹2,500, each chair ₹500) and a storage limit of 60 pieces.

2. Let the number of tables = x, number of chairs = y.

3. The objective function for profit is: \( Z = 300x + 100y \) (to maximize).

4. The constraints are:
  • \( 2500x + 500y \leq 50000 \) (Money limit)
  • \( x + y \leq 60 \) (Storage limit)
  • \( x \geq 0, y \geq 0 \) (Can’t buy negative items)

5. To solve, graph or substitute corner points for x and y in \( Z = 300x + 100y \) to find where profit is maximized.

In exams, always clearly state your objective function and identify all constraints for full marks.


Practice Problems

  • Write the objective function for: Maximize profit if profit per toy car is ₹120, and per toy robot is ₹350.
  • Given constraints \( 2x + y \leq 40 \), \( x + y \leq 25 \), and non-negativity, what is the objective function if x and y represent biscuits and cakes produced (profit per biscuit ₹10, per cake ₹20)?
  • Is \( Z = 5x + 3y \) a suitable objective function for minimizing total transport cost?
  • List two examples where the objective function should minimize, not maximize, the output.

Common Mistakes to Avoid

  • Confusing objective function with constraint equations—remember, constraints limit the solution while the objective function tells you what to optimize.
  • Mixing up maximize (profit) with minimize (cost) objectives in your exam answer.
  • Not stating non-negativity conditions (\( x \geq 0, y \geq 0 \)).
  • Forgetting to plug all corner points into the objective function when solving graphically.

Real-World Applications

Objective function concepts are used in finance to plan investments, in factories to optimize production, and even in logistics to reduce transportation costs. In linear programming, it is the backbone for maximizing and minimizing goals. Vedantu makes these maths ideas practical—perfect for both exams and life skills.


Page Summary

We explored the idea of objective function—how to write and use it, solve real-world problems step by step, and avoid common errors. Practice with Vedantu and master these tools for success in maths, business, and everyday problem-solving!


Linear Equations
Regression Analysis

FAQs on Objective Function in Linear Programming Explained Clearly

1. What is an objective function in mathematics?

An objective function is a mathematical expression that represents the quantity to be maximized or minimized in an optimization problem. It is typically written in terms of decision variables and defines the goal of the problem.

  • In linear programming, it is usually a linear expression like Z = ax + by.
  • The objective can be to maximize profit, revenue, or output.
  • It can also be to minimize cost, time, or distance.
The objective function works together with constraints to determine the best possible solution.

2. What is the formula for an objective function in linear programming?

The general form of an objective function in linear programming is Z = c₁x₁ + c₂x₂ + ... + cₙxₙ. Here:

  • Z is the objective value (maximum or minimum).
  • c₁, c₂, ..., cₙ are coefficients (constants).
  • x₁, x₂, ..., xₙ are decision variables.
For example, if profit per unit is $5 and $3 for two products, the objective function is Z = 5x + 3y.

3. How do you write an objective function?

To write an objective function, identify the goal of the problem and express it as a function of decision variables. Follow these steps:

  • Define the decision variables (e.g., x = units of product A).
  • Determine the contribution of each variable (profit, cost, etc.).
  • Form a mathematical expression combining them.
For example, if profit is $10 per unit of A and $6 per unit of B, the objective function is Z = 10x + 6y.

4. What is the difference between objective function and constraints?

The objective function defines what you want to optimize, while constraints limit the possible solutions.

  • The objective function is maximized or minimized.
  • Constraints are equations or inequalities like 2x + y ≤ 100.
  • Constraints represent limitations such as resources or time.
Together, they form a complete optimization or linear programming problem.

5. Can you give an example of an objective function?

An example of an objective function is Z = 4x + 7y, where Z represents total profit. Suppose:

  • Profit per unit of product A (x) is $4.
  • Profit per unit of product B (y) is $7.
If x = 10 and y = 5, then Z = 4(10) + 7(5) = 40 + 35 = 75. The goal may be to maximize this value under given constraints.

6. What does it mean to maximize or minimize an objective function?

To maximize or minimize an objective function means to find the highest or lowest possible value of the function within the given constraints.

  • Maximization problems aim for the greatest value (e.g., maximum profit).
  • Minimization problems aim for the smallest value (e.g., minimum cost).
  • The optimal solution occurs at a feasible point satisfying all constraints.
This is the main goal in optimization and linear programming problems.

7. How do you solve an objective function in linear programming?

An objective function in linear programming is solved by finding the optimal value within the feasible region defined by constraints. Common methods include:

  • Graphical method (for two variables).
  • Simplex method (for multiple variables).
Steps using the graphical method:
  • Plot all constraints on a graph.
  • Identify the feasible region.
  • Evaluate the objective function at each corner point.
  • Choose the maximum or minimum value as required.

8. What are decision variables in an objective function?

Decision variables are the unknown quantities in an objective function that determine the outcome of the optimization problem.

  • They represent choices, such as number of products to produce.
  • They are usually denoted by symbols like x, y, x₁, x₂.
  • The objective function depends directly on their values.
For example, in Z = 8x + 5y, x and y are decision variables.

9. Is an objective function always linear?

An objective function is not always linear; it can be linear or nonlinear depending on the problem.

  • In linear programming, the objective function is linear (e.g., Z = 3x + 2y).
  • In nonlinear programming, it may include powers or products like Z = x² + 3xy.
The type of objective function determines which optimization method is used.

10. Why is the objective function important in optimization problems?

The objective function is important because it defines the goal of an optimization problem and determines the best possible solution.

  • It quantifies performance (profit, cost, efficiency).
  • It guides decision-making in business, economics, and engineering.
  • It helps identify the optimal feasible solution under constraints.
Without an objective function, there is no measurable criterion for optimization.