BrightChamps Logo
Login
Creative Math Ideas Image
Live Math Learners Count Icon102 Learners

Last updated on July 4th, 2025

Math Whiteboard Illustration

Linear Programming

Professor Greenline Explaining Math Concepts

Linear programming is a way to find the best possible result for a situation using a mathematical method. Linear programming helps simplify a complex situation, making it easier to study and solve the problem. This article explores linear programming concepts.

Linear Programming for Bahraini Students
Professor Greenline from BrightChamps

What is Linear Programming?

The mathematical method used to find the best possible output is called linear programming. It is used in situations involving linear relationships, such as the maximum profit or minimum cost in a business. It helps make decisions like maximizing profit or minimizing cost by using equations and inequalities. It is used in many fields to solve real-life problems.

Professor Greenline from BrightChamps

What are the Components of Linear Programming?

Objective function, constraints, and decision variables are the components of linear programming. We will learn about them one by one.

 

  • Objective Function: The objective function is the main goal of linear programming. It can be used to minimize or maximize the output of any situation.

 

  • Constraints: Constraints are the limitations we must consider, like how much money, time, or materials we have.

 

  • Decision Variables: Decision variables are the unknowns or our choices.
Professor Greenline from BrightChamps

How to Solve Linear Programming Problems?

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: Make the objective clear, like how many items to produce. These are our decision variables.

 

Step 2: Formulate the objective function that shows what we want to maximize or minimize. This is our objective function. 

 

Step 3: Write down all the constraints, like how much money, time, or materials we can use.

 

Step 4: Make sure the choices can’t be negative. We can’t produce a negative number of items, so our minimal decision variable should be zero. 

 

Step 5: Solve the problem using the graphical method or the simplex method to find the best answer.

Professor Greenline from BrightChamps

What are the Methods of Linear Programming?

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:

 

  • Graphical Method
     
  • Simplex Method
Professor Greenline from BrightChamps

Graphical Method

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 + y ≤ 10 (money limit).

x + y ≤ 7 (items limit).

x ≥ 0, y ≥ 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. Pick the point that gives the Go through the objective function at each corner point of the feasible region. Select the point that gives the lowest or highest value. The selection of this point depends on the objective.

Professor Greenline from BrightChamps

Simplex Method

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. Imagine if we have Lego bricks, and we want to build the biggest tower, but only with a certain number of red and blue bricks. In this situation, the simplex method helps us figure out how many red and blue bricks can be used to build the tallest tower. 

 

The method also uses a table called simplex tableau to keep the equations organized. The method utilizes a new, basic variable at each step to replace one solution with another. In other words, it uses the table to decide on the change that improves the tower’s height the most. This process called pivoting helps explore the feasible region and the best solution is then selected. It is like swapping the bricks in and out, one brick at a time, and selecting the best possible Lego brick.

Professor Greenline from BrightChamps

Real Life Applications of Linear Programming

Linear programming is used in different real-life scenarios such as engineering, healthcare, and marketing. Let us take a look at their applications mentioned below:

 

  • Agriculture: In agriculture, linear programming helps allocate land, water, and fertilizers efficiently. It also helps in exhibiting constraints wherever needed.

 

  • Marketing: Linear programming helps identify the best possible way to divide the money between online, TV, and newspaper ads to get more customers without going over budget.

 

  • Healthcare: In hospitals, it helps schedule shifts for various personnel to make sure the patients are cared for and the staff are not overworked.

 

  • Finance: If an investor wants to make money with minimum risks, linear programming finds the best way to invest in stocks and bonds within a budget and risk level.
Max Pointing Out Common Math Mistakes

Common Mistakes and How to Avoid Them in Linear Programming

Linear programming is a useful tool for solving problems that involve limited resources. While using linear programming, students might make minor mistakes that can lead to the wrong answer. Here are some of the common mistakes and the ways to avoid them.

Mistake 1

Red Cross Icon Indicating Mistakes to Avoid in This Math Topic

Missing decision variables

Green Checkmark Icon Indicating Correct Solutions in This Math Topic

After writing the constraints, students may forget which variable they used for a particular rule. Define each variable before starting, like x = number of tables and y = number of chairs. Writing them down avoids confusion later.

Mistake 2

Red Cross Icon Indicating Mistakes to Avoid in This Math Topic

Forgetting to add all the constraints

Green Checkmark Icon Indicating Correct Solutions in This Math Topic

Missing some constraints makes a big difference in the problem. Focus on one step at a time and add all constraints. Include every condition in the form of an equation or inequality.

Mistake 3

Red Cross Icon Indicating Mistakes to Avoid in This Math Topic

Using the wrong inequality signs

Green Checkmark Icon Indicating Correct Solutions in This Math Topic

Be careful with the signs while doing linear programming. A wrong sign can lead to a mistake. Reread the question to get the right signs. 

 

≤ refers to ‘at most’

≥ refers to ‘at least’

Mistake 4

Red Cross Icon Indicating Mistakes to Avoid in This Math Topic

Including negative signs unnecessarily

Green Checkmark Icon Indicating Correct Solutions in This Math Topic

Sometimes students might neglect non-negativity constraints. Always remember that the quantity in real life cannot be negative. Add x ≥ 0 and y ≥ 0 to the constraints.

Mistake 5

Red Cross Icon Indicating Mistakes to Avoid in This Math Topic

Plotting the graph incorrectly

Green Checkmark Icon Indicating Correct Solutions in This Math Topic

Plot each line on the graph carefully using the correct points. Label the points clearly; use a ruler if needed. Don’t forget to shade the region satisfying the inequality.

arrow-right
Max from BrightChamps Saying "Hey"

Solved Examples of Linear Programming

Ray, the Character from BrightChamps Explaining Math Concepts
Max, the Girl Character from BrightChamps

Problem 1

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?

Ray, the Boy Character from BrightChamps Saying "Let’s Begin"

Make 4 bookmarks and 6 stickers to earn $14.

Explanation

Let x = number of bookmarks

y = number of stickers

Total money = 2x + 1y

Constraints:
x + y ≤ 10 (total items)
2x + 1y ≤ 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.

Max from BrightChamps Praising Clear Math Explanations
Max, the Girl Character from BrightChamps

Problem 2

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?

Ray, the Boy Character from BrightChamps Saying "Let’s Begin"

John buys 2 apples and 4 bananas at a cost of $14.

Explanation

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 at $14.

Max from BrightChamps Praising Clear Math Explanations
Max, the Girl Character from BrightChamps

Problem 3

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?

Ray, the Boy Character from BrightChamps Saying "Let’s Begin"

Sam should play 2 video games and watch 4 movies for 42 fun points.

Explanation

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 4 games and 2 movies use 10 hours and 6 activities.

Max from BrightChamps Praising Clear Math Explanations
Max, the Girl Character from BrightChamps

Problem 4

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?

Ray, the Boy Character from BrightChamps Saying "Let’s Begin"

Visits 5 towns in A and 0 towns in B.

Total cost: $15

Explanation

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

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  

 

Max from BrightChamps Praising Clear Math Explanations
Max, the Girl Character from BrightChamps

Problem 5

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.

Ray, the Boy Character from BrightChamps Saying "Let’s Begin"

Make 3 cars and 2 trucks to earn $24.

Explanation

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

 

Best is 3 cars, 2 trucks for $24 profit.

Max from BrightChamps Praising Clear Math Explanations
Ray Thinking Deeply About Math Problems

FAQs of Linear Programming

1.What is linear programming?

Math FAQ Answers Dropdown Arrow

2.What are decision variables?

Math FAQ Answers Dropdown Arrow

3.What is the feasible region?

Math FAQ Answers Dropdown Arrow

4.What if there is no solution?

Math FAQ Answers Dropdown Arrow

5.What happens if more than one point gives the same best value?

Math FAQ Answers Dropdown Arrow

6.How does learning Algebra help students in Bahrain make better decisions in daily life?

Math FAQ Answers Dropdown Arrow

7.How can cultural or local activities in Bahrain support learning Algebra topics such as Linear Programming?

Math FAQ Answers Dropdown Arrow

8.How do technology and digital tools in Bahrain support learning Algebra and Linear Programming?

Math FAQ Answers Dropdown Arrow

9.Does learning Algebra support future career opportunities for students in Bahrain?

Math FAQ Answers Dropdown Arrow
Math Teacher Background Image
Math Teacher Image

Jaskaran Singh Saluja

About the Author

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.

Max, the Girl Character from BrightChamps

Fun Fact

: He loves to play the quiz with kids through algebra to make kids love it.

INDONESIA - Axa Tower 45th floor, JL prof. Dr Satrio Kav. 18, Kel. Karet Kuningan, Kec. Setiabudi, Kota Adm. Jakarta Selatan, Prov. DKI Jakarta
INDIA - H.No. 8-2-699/1, SyNo. 346, Rd No. 12, Banjara Hills, Hyderabad, Telangana - 500034
SINGAPORE - 60 Paya Lebar Road #05-16, Paya Lebar Square, Singapore (409051)
USA - 251, Little Falls Drive, Wilmington, Delaware 19808
VIETNAM (Office 1) - Hung Vuong Building, 670 Ba Thang Hai, ward 14, district 10, Ho Chi Minh City
VIETNAM (Office 2) - 143 Nguyễn Thị Thập, Khu đô thị Him Lam, Quận 7, Thành phố Hồ Chí Minh 700000, Vietnam
Dubai - BrightChamps, 8W building 5th Floor, DAFZ, Dubai, United Arab Emirates
UK - Ground floor, Redwood House, Brotherswood Court, Almondsbury Business Park, Bristol, BS32 4QW, United Kingdom