Summarize this article:
867 LearnersLast updated on October 23, 2025

Linear programming is a mathematical method used to find the best possible outcome in a situation. Linear programming helps simplify a complex situation, making it easier to study and solve the problem. This article explores linear programming concepts.
The mathematical method used to find the best possible output is called linear programming.
Objective function, constraints, and decision variables are the components of linear programming. We will learn about them one by one.
Formulating the problem using the given data is the first step for solving linear programming problems. The steps given below are used to solve linear programming problems.
Step 1: Identify the Decision Variables. Decide what choices you can make. For example, how many items to produce. These are your decision variables.
Step 2: Define the Objective Function. Decide what you want to achieve, like maximize profit or minimize cost. Write it as a simple equation using your decision variables.
Step 3: List the Constraints. Write down all the limits or rules, such as how much money, time, or materials you have.
Step 4: Make Sure Variables Are Non-Negative. You cannot produce negative items, so all decision variables must be zero or more.
Step 5: Solve the Problem. Use a method like the graphical method (for small problems) or the simplex method (for bigger problems) to find the best solution.
Linear programming can be used to achieve the best result when we have limitations. These two methods mentioned below are used to solve linear programming:
The constraints (conditions or limits) are drawn on the graph in this method. Then we have to look for the common area where all the constraints are true. This is called feasible region. We can check the corners of the area to see where we can get the best result.
Example: Rohan has $10 with which he wants to buy pencils worth $2 a piece and erasers worth $1 each. Rohan wants to buy at most 7 items in total.
Solution:
1. Let x be the number of pencils and y be the number of erasers.
2. Write the constraints.
\(2x + 1y \le 10\) (money limit).
\(x + y \le 7\) (items limit).
\(x \ge 0, \quad y \ge 0\), because the items cannot be negative.
3. Draw these lines on a graph.
4. Shade the area that fits all the constraints.
5. Try the corner points and calculate the cost.
6. Evaluate the objective function at each corner point of the feasible region and select the point giving the optimal value. Select the point that gives the lowest or highest value. The selection of this point depends on the objective.
The simplex method checks only one possible answer at a time. It helps in solving bigger problems. It keeps improving the answer until it can’t get better.
For example:
Imagine you have red and blue Lego bricks and want to build the tallest tower, but you can only use a certain number of each color. The simplex method helps you figure out how many red and blue bricks to use to make the tower as tall as possible.
The method uses a table called the simplex tableau to keep everything organized. At each step, it swaps one variable for another (called pivoting) to improve the solution. Think of it like trying different Lego bricks one at a time to see which combination gives the tallest tower. At the end, it finds the best possible solution.
Linear programming helps find the best possible outcome when working within limits. These tips and tricks simplify solving problems, making it easier for students to plan, analyze, and make smart decisions quickly and accurately.
Linear programming is a useful tool for solving problems that involve limited resources.Students may make minor mistakes while using linear programming, leading to incorrect results. Here are some of the common mistakes and the ways to avoid them.
Linear programming is a branch of mathematics that focuses on finding the best possible outcome in situations where certain conditions or limits must be considered. It helps in making optimal decisions while working within these constraints. Here are some real-life applications:
You sell bookmarks and stickers, making $2 for a bookmark and $1 for a sticker. You can make 10 items, but have only 12 minutes, and it takes 2 minutes for a bookmark and 1 minute for a sticker. How many bookmarks and stickers should you make to earn the maximum amount?
Make 4 bookmarks and 6 stickers to earn $14.
Let x = number of bookmarks
y = number of stickers
Total money = 2x + 1y
Constraints:
\(x + y \le 10\) (total items)
\(2x + y \le 12 \) (time)
x ≥ 0 and y ≥ 0, because we can’t make negative items.
Draw these lines on the graph and find points where the lines meet.
Check each corner of the feasible region to find the best answer:
| Point (x, y) | Money = 2x + y |
| (0, 0) | 0 |
| (0, 10) | 10 |
| (3, 6) | 12 |
| (4, 6) | 14 |
| (6, 0) | 12 |
So, 4 bookmarks and 6 stickers give the maximum amount of $14.
John wants to buy apples and bananas. $3 and $2 per fruit is the cost of an apple and banana respectively. John needs 6 fruits at least. He needs to buy at least 2 apples, and he doesn't want to spend too much. How many of each should he buy to spend as less as possible?
John buys 2 apples and 4 bananas at a cost of $14.
Let x = apples and y = bananas
Cost = \(3x + 2y\)
Constraints:
\(x + y ≥ 6\) (needs 6 fruits)
\(x ≥ 2\) (at least 2 apples)
x ≥ 0 and y ≥ 0 (no negative fruits)
Try with small numbers that follow the rules and compare the cost:
| Apples (x) | Bananas (y) | Total fruits | Cost |
| 2 | 4 | 6 | $14 |
| 2 | 5 | 7 | $16 |
| 3 | 3 | 6 | $15 |
| 4 | 2 | 6 | $16 |
John’s best option is to buy 4 bananas and 2 apples for $14.
Sam has 10 hours for fun during the weekend. He plays video games (1 hour each) and watches movies (2 hours each) He wants to do at most 6 activities total He wants to spend all 10 hours having fun. Each video game gives him 5 fun points, and each movie gives him 8 fun points. What should Sam do to get the most fun points?
Sam should play 2 video games and watch 4 movies for 42 fun points.
Let x = video games, and y = movies.
Fun \(= 5x + 8y\)
Constraints:
Time: \(x + 2y = 10 ⇒ x = 10 - 2y\)
Substituting the values into the activity limit,
\((10 − 2y) + y ≤ 6 ⇒ 10 − y ≤ 6 ⇒ y ≥ 4\)
Also, since \(x = 10 - 2y, x ≥ 0 ⇒ 10 − 2y ≥ 0 ⇒ y ≤ 5\)
So the values for y are: \(4 ≤ y ≤ 5\)
Let us substitute y as 4 and check
\(x = 10 − 2(4) = 2.\)
Total activities \(= x + y = 2 + 4 = 6\)
\(P = 5(2) + 8(4) = 10 + 32 = 42\)
Only 2 video games and 4 movies use 10 hours and 6 activities.
A school bus must visit 2 towns: town A and town B. It uses 3 liters of fuel for town A and 5 liters of fuel for town B. It can use no more than 30 liters total and must visit 5 towns in total. Fuel costs $1 per liter. How many towns A and B should the bus visit to use the least fuel?
Visits 5 towns in A and 0 towns in B.
Total cost: $15
Let x = towns in A and y = towns in B
Fuel used: \(3x + 5y\)
Constraints:
\(3x + 5y ≤ 30\)
\(x + y ≥ 5\)
x ≥ 0 and y ≥ 0
Objective: Minimize fuel usage.
Try the combinations that follow the rules:
| x | y | Total Towns | Fuel | Cost |
| 5 | 0 | 5 | 15 | $15 |
| 4 | 1 | 5 | 17 | |
| 3 | 2 | 5 | 19 | |
| 2 | 3 | 5 | 21 |
A factory makes toy cars and toy trucks. Selling a car and a truck means a profit of $4 and $6 respectively. Cars take 1 hour to make, trucks take 3 hours. Factor works only 9 hours a day. Can make at most 4 trucks. Calculate the number of cars and trucks the factory should make to get maximum profit.
Make 3 cars and 2 trucks to earn $24.
Let x = cars, y = trucks
Profit\( = 4x + 6y\)
Constraints:
\(1x + 3y ≤ 9\) (work time)
\(y ≤ 4\) (max trucks)
x ≥ 0 and y ≥ 0
Try values that fit:
| x | y | Time used | profit |
| 3 | 2 | 3 + 6 = 9 | $24 |
| 2 | 2 | 2 + 6 = 8 | $20 |
| 1 | 3 | 1 + 9 = 10 | Over limit |
| 4 | 1 | 4 + 3 = 7 | $22 |
The best is 3 cars and 2 trucks for a $24 profit.
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.






