How to Solve Linear Optimization Problems with GeoGebra

You can use GeoGebra for solving linear optimization problems. The instructions below cover both the substitution method and the ruler method.

When you input equations and inequalities into GeoGebra, you don’t need to move the terms around so that y is isolated on the left-hand side. Simply enter them as they’re written!

GeoGebra Instruction 1

1.
Open Algebra View and Graphics View under GeoGebra icon View in GeoGebra icon Menu.
2.
Enter your inequalities, one by one, into Algebra View.
3.
Now input your inequalities as equations, each in its own row in Algebra View, by replacing the inequality signs >, , <, with the equality sign =. You need these equations to find the intersections later.
4.
The lines you drew in Step 3 are the inequality boundary lines. To find the coordinates of the points of intersection between them, first select the Intersect GeoGebra icon tool (it’s under the Point GeoGebra icon toolbox). For every pair of lines that intersect, click the two lines in each pair to draw their point of intersection.
5.
Now, you should see the feasible region of the optimization problem as the area with the darkest shade of blue, and its vertices should be the points of intersection in Step 4. To make this area even clearer, select the Polygon GeoGebra icon tool and click all the points of intersection. Complete the polygon by clicking the initial point again.
6.
In an empty row in Algebra View, enter the objective function Z by typing Z(x,y) = Ax+By, where A and B are given in the exercise.
7.
Now you can choose between the substitution method or the ruler method.

The Substitution Method

7.1.
Compute the value of the objective function Z at all of the points of intersection. Type Z(A) for the point A, Z(B) for the point B, and so on. The point that yields the highest value of Z is the optimal solution.

Screenshot of GeoGebra showing an optimization problem solved with the substitution method

The Ruler Method

7.1.
Type w in an empty row in Algebra View and press Enter (if there is already another object with the name w, use another name instead). You should get a slider for the number w in the same row. Enter the settings menu of the slider by clicking the three vertical dots in the row w is on. Click the Slider pane, and set Min to 0 and Max equal to the smallest value of A and B.
7.2.
In the next row in Algebra View, type

r(x) = -A*x/B+w

where you replace A and B with A and B from the exercise. You should get a line.

7.3.
Adjust the slider for the number w so that w increases, while making sure that at least one segment of the line remains within the feasible region. The line should eventually hit one point of intersection. This point is the optimal solution. If the line can’t reach a point of intersection, adjust Max in the slider settings accordingly.

Screenshot of GeoGebra showing an optimization problem solved with the ruler method

Want to know more?Sign UpIt's free!