Page 1 of 14
Module 4 at a glance
In Modules 2 and 3 we used derivatives to study functions. In Module 4 we use them, along with a little geometry, to find the best choice: the largest profit, the smallest cost, the shortest distance.
- Lagrange multipliers. Find the maximum or minimum of when and are connected by a condition such as . There can be one condition (constraint) or two.
- Linear programming. Optimise a linear objective like when the variables must satisfy some linear inequalities. Write word problems in mathematical form, and then solve them by the graphical method.
- Gradient descent (steepest descent). A step-by-step numerical method that moves downhill to a minimum, using the gradient from Module 3.
What you will be able to do
- Set up the Lagrange function and solve the system .
- Find the point on a plane that is closest to the origin, the largest area for a fixed perimeter, and similar problems.
- Solve problems with two constraints using two multipliers and .
- Convert a word problem into a linear programming problem (LPP).
- Draw the feasible region of a two-variable LPP, find its corner points and choose the optimal one.
- Identify infeasible, unbounded and multiple-optimum problems.
- Do gradient descent iterations by hand.
How to use these notes
- Every topic has the same shape: idea → method → worked examples → common mistakes.
- Try each worked example yourself before reading the solution.
- Green boxes hold key ideas. Amber boxes marked Watch out show the mistakes that make you lose marks. Boxes marked Note on the source show where the handwritten class notes were corrected.
- The last page has practice questions with answers and a formula sheet.
Where each topic sits
| Part | Topics |
|---|---|
| Lagrange multipliers | One constraint, applications in three variables, two constraints |
| Linear programming | Terms and general form, formulation, graphical method, special cases |
| Numerical optimisation | Gradient descent |
Before you start. You should know partial derivatives and the gradient (Modules 2 and 3), how to solve simultaneous linear equations, and how to draw straight lines using their intercepts.
Page 2 of 14
Lagrange multipliers
The idea
In Module 3 we found extreme values of where and could take any values. Many times they are not free: a fence of fixed length, a point that must stay on a circle, a budget that must be spent fully. Such a condition is called a constraint, and it is written as
We want the largest or smallest value of among the points that satisfy the constraint.
Key idea. At a constrained maximum or minimum, the level curve of just touches the constraint curve . Curves that touch have parallel normals, so and are parallel: for some number . This is the Lagrange multiplier.
Method
- Write the function , and write the constraint in the form .
- Build the Lagrange function
- Put all its partial derivatives equal to zero:
That is,
The third equation is just the constraint itself.
- Solve for , (and ). The solutions are the critical points.
- Find at every critical point. On a closed, bounded constraint curve (a circle, an ellipse) the largest value is the maximum and the smallest value is the minimum.
Solving tip. The usual trick: find from the first two equations, put the two expressions equal (this removes ), and put the resulting relation between and in the constraint.
First example
Example 1. Find the extreme value of subject to .
Here and
From (1) and (2), , so . Putting this in (3): , so
This is the minimum. is the square of the distance from the origin, and is the point on the line that is nearest to the origin.
Note on the source. The class notes asked to "maximise" on . There is no maximum, because points on the line far from the origin make as large as we like. The only critical point gives the minimum value .
Watch out. The Lagrange method gives only possible points. Decide whether each point is a maximum or a minimum by comparing the values. Remember that on an unbounded constraint (a line, a plane), one of the two may not exist.
Page 3 of 14
Lagrange multipliers: worked examples
Example 1. Find the maximum and minimum of subject to .
From (1), ; from (2), . Equating them, . Then (3) gives , so , : four critical points.
| Point | |
|---|---|
| , | |
| , |
Maximum at the first pair, minimum at the second pair.
Example 2. Maximise subject to .
From (1), ; from (2), . Equating and cross-multiplying:
Put in (3): , so and , .
| Point | |
|---|---|
| , | |
| , |
The maximum is at and .
Note on the source. The class notes went from to "", where the square root was taken wrongly (it should be ). Then they found at by adding the coordinates and got . That point does lie on the ellipse, but there is only . The correct maximum is .
Example 3. Find the extreme values of subject to .
Exactly as in Example 1: and give , and the constraint gives , so , .
| Point | |
|---|---|
| , | |
| , |
Maximum , minimum .
Note on the source. One line of the handwritten table wrote . It should be . The final conclusion in the notes was correct.
Example 4. Find the maximum and minimum of on the circle .
Put this in the constraint:
- : , , and (maximum).
- : , , and (minimum).
Note on the source. In the copied notes, the page was blank after the value . The maximum at is completed here.
Watch out. When you divide by or to get , you are assuming that they are not zero. Check separately whether or can satisfy the equations. (In these examples it cannot, because then the other variable would also be , and that point is not on the curve.)
Page 4 of 14
Lagrange multipliers: applications
The method works in the same way with three variables: and four equations .
Example 1. Closest point on a plane. Find the point on the plane that is closest to the origin.
The distance is . Minimising is the same as minimising , which has no square root, so take
Put these in the plane equation:
so
Check. The distance from the origin to is .
Note on the source. The notes wrote "" from , but it should be . The next lines actually used , so the final point is correct.
Example 2. Find the minimum of subject to .
, , give . The constraint gives , so and :
Note on the source. The question of this example was missing in the copied notes. Only the working ", , " was available. The constraint gives exactly that working.
Example 3. Largest rectangle. A rectangle has perimeter . Find the dimensions that maximise its area.
Let the length be and the breadth be . Maximise subject to , that is .
The constraint gives , so and
The best rectangle is a square.
Note on the source. One line of the notes read "". It should be (the next line, , is correct).
Watch out. When the quantity to optimise is a distance, minimise instead of . The square root only makes the derivatives difficult and does not change the place where the minimum comes.
Page 5 of 14
Lagrange multipliers with two constraints
Method
To optimise subject to two constraints and , use one multiplier for each:
and solve the five equations
The last two are the constraints themselves.
Key idea. Each constraint takes away one degree of freedom. In three variables with two constraints, the allowed points form a curve (usually a line, where two planes meet), and we optimise along it.
Examples
Example 1. Find the extreme value of subject to and .
Adding (3) and (4): , so , and then . From (1) and (2): and , so .
Two lines in the plane meet at a single point, so is the only point that satisfies both constraints, and is the only value can take.
Example 2. Find the extreme value of subject to and .
- (4) (5): , so .
- (1) and (3) give , so .
- (4) then gives , so .
The critical point is with
This is the minimum: the two planes meet in a line, and is the point on that line nearest to the origin. There is no maximum, because the line goes to infinity.
Example 3. Find the extremum of subject to and .
- (5): .
- (1) (2): , so .
- Then (1) and (3) give , so .
- (4): , so .
Note on the source. The copied page with Examples 2 and 3 was not clear. The working above is rebuilt from the equations that were readable, and both answers have been checked again: with value , and with value .
Watch out. Number your equations and write which ones you are combining. With five equations it is easy to miss one, and a missing equation usually gives a wrong point.
Page 6 of 14
Linear programming: the terms
The idea
A linear programming problem (LPP) asks for the best value of a linear function when the variables must obey several linear inequalities. It models production planning, diets, staffing, transport and many other decisions.
The parts of an LPP
| Term | Meaning | Example |
|---|---|---|
| Decision variables | the unknown quantities that we choose; they are usually required to be | = units of product 1, = units of product 2 |
| Objective function | the linear function to maximise or minimise | profit |
| Constraints | linear equations or inequalities that the variables must satisfy | resources: |
| Non-negativity | the variables cannot be negative |
Constraints come in three types:
General form
subject to
Kinds of solution
- Feasible solution: any values of the variables that satisfy all the constraints, including non-negativity. The set of all feasible solutions is the feasible region.
- Basic feasible solution: with variables and equality constraints, put of the variables equal to and solve for the rest. If the result is feasible, it is a basic feasible solution. In the graph, these are the corner points of the feasible region.
- Optimal solution: a feasible solution that gives the largest value (for maximise) or the smallest value (for minimise) of the objective.
Each inequality is a half-plane
A single linear inequality in two variables is satisfied on one side of its boundary line. To find which side, test a point not on the line, usually the origin: if satisfies the inequality, shade the side containing the origin; otherwise shade the other side. The feasible region is where all the shaded sides overlap.

Watch out. "" does not always mean "shade below". For , the origin gives , which is true, so the side of the origin is shaded even though the line slopes upward. Always test a point.
Page 7 of 14
Formulating an LPP from a word problem
Method
- Name the decision variables: which quantities can we choose? Write what each one means.
- Write the objective function: the profit, cost or number to be maximised or minimised, in terms of the variables.
- Write one constraint for each limited resource or requirement. "Available" or "at most" gives . "At least" or "required" gives .
- Add non-negativity: .
Examples
Example 1. Manufacturing. A factory makes products and , with profit Rs 3 and Rs 5 per unit. needs 1 unit of resource 1 and 2 units of resource 2; needs 2 units of resource 1 and 1 unit of resource 2. Only 4 units of resource 1 and 6 units of resource 2 are available. Write the LPP to maximise the profit.
Let , be the numbers of units of and produced.
subject to
(It is solved on the practice page: the best profit is at , .)
Example 2. Diet problem. A hospital diet must provide at least 2000 calories, 50 g of protein and 300 g of carbohydrate per day, at minimum cost. Food 1 costs Rs 3 per unit and gives 500 cal, 20 g protein and 30 g carbohydrate. Food 2 costs Rs 4 per unit and gives 600 cal, 30 g protein and 40 g carbohydrate. Write the LPP.
Let , be the units of food 1 and food 2 per day.
subject to
(It is solved graphically on the "word problems" page.)
Example 3. Staff scheduling. A company needs at least 5 employees from 8 am to 12 noon, 3 from 12 noon to 4 pm, and 4 from 4 pm to 8 pm. Each employee works an 8-hour shift starting at 8 am, 12 noon or 4 pm. Minimise the number of employees.
Let , , be the numbers starting at 8 am, 12 noon and 4 pm. A person starting at 8 am works from 8 am to 4 pm, so covers the first two periods. A person starting at noon covers the second and third periods. A person starting at 4 pm covers the third period.
subject to
The minimum is employees, for example , , : the first constraint forces and the third forces .
Note on the source. The handwritten question said employees "can't start" at 8 am, 12 noon or 4 pm, and named by the four-hour periods. The constraints in the notes make sense only if shifts start at those times, so we have used that meaning here.
Watch out. Write what each variable means, with units. Most mistakes in writing the LPP come from a variable whose meaning changes in the middle of the working.
Page 8 of 14
The graphical method
The idea
With two decision variables, we can draw the feasible region. For a linear objective, the lines are parallel. If we move them in the direction in which increases, the last point of the region that they touch is a corner.

Key idea (corner-point theorem). If an LPP has an optimal solution, then one occurs at a corner point (vertex) of the feasible region. So we only need to find at the corners.
Method
- Change each inequality to an equation and draw the line, using its two intercepts (put , and then ).
- Shade the side of each line that satisfies the inequality (test the origin). Also include .
- The common part is the feasible region. Write its corner points. Find each one by solving the equations of the two lines that meet there.
- Find at every corner. The largest (or smallest) value is the optimum.
Examples
Example 1. Maximise subject to , , .
Intercepts: passes through and ; passes through and .
The two lines meet where and . Multiply the second by 2 to get . Subtracting the first, , so and .
{
"boundingBox": [-4, 46, 30, -4],
"axis": true,
"points": [
{ "id": "A", "x": 0, "y": 0, "label": "A(0,0)" },
{ "id": "B", "x": 20, "y": 0, "label": "B(20,0)" },
{ "id": "C", "x": 2.5, "y": 35, "label": "C(2.5,35)" },
{ "id": "D", "x": 0, "y": 36, "label": "D" },
{ "id": "P", "x": 0, "y": 40, "label": "" },
{ "id": "Q", "x": 10, "y": 32, "label": "2x₁+5x₂=180" }
],
"polygons": [{ "points": ["A", "B", "C", "D"] }],
"segments": [
{ "from": "P", "to": "B" },
{ "from": "D", "to": "Q" }
],
"circles": [],
"functions": [],
"title": "Feasible region ABCD; the steep line is 4x₁ + 2x₂ = 80"
}
| Corner | |
|---|---|
Maximum at , .
Example 2. Maximise subject to , , .
Intercepts: through and ; through and . They meet where and . Subtracting, , so , .

| Corner | |
|---|---|
Maximum at .
Watch out. An intercept of a constraint line is a corner only if it satisfies every other constraint. In Example 2, is on but does not satisfy , so it is not a corner.
Page 9 of 14
Graphical method: more examples
Example 1. Maximise subject to , , , .
The constraints say (through and ), , and . The last one is never the deciding one, because already forces .
The line meets at , so .
{
"boundingBox": [-8, 75, 100, -8],
"axis": true,
"points": [
{ "id": "A", "x": 0, "y": 0, "label": "A(0,0)" },
{ "id": "B", "x": 60, "y": 0, "label": "B(60,0)" },
{ "id": "C", "x": 60, "y": 20, "label": "C(60,20)" },
{ "id": "D", "x": 0, "y": 60, "label": "D(0,60)" },
{ "id": "P", "x": 90, "y": 0, "label": "(90,0)" },
{ "id": "Q", "x": 60, "y": 70, "label": "x₁ = 60" }
],
"polygons": [{ "points": ["A", "B", "C", "D"] }],
"segments": [
{ "from": "D", "to": "P" },
{ "from": "B", "to": "Q" }
],
"circles": [],
"functions": [],
"title": "Feasible region ABCD for 4x₁ + 6x₂ ≤ 360 and x₁ ≤ 60"
}
| Corner | |
|---|---|
Maximum at , .
Note on the source. The class notes listed the corners as , , , , and chose at . But does not satisfy , the point is not where any two constraint lines meet, and is not on any boundary. The correct corners are those in the table, and the maximum is .
Example 2. Maximise subject to , , , .
The region lies between the horizontal lines and , to the right of the line (because ), to the left of , and below . Its corners are:
- meets at and meets at .
- meets at .
- meets at .
- meets at .
{
"boundingBox": [-2, 33, 33, -2],
"axis": true,
"points": [
{ "id": "A", "x": 3, "y": 3, "label": "A" },
{ "id": "B", "x": 20, "y": 3, "label": "B" },
{ "id": "C", "x": 20, "y": 10, "label": "C" },
{ "id": "D", "x": 18, "y": 12, "label": "D" },
{ "id": "E", "x": 12, "y": 12, "label": "E" },
{ "id": "L1", "x": 0, "y": 30, "label": "x+y=30" },
{ "id": "L2", "x": 30, "y": 0, "label": "" },
{ "id": "M1", "x": 0, "y": 0, "label": "" },
{ "id": "M2", "x": 28, "y": 28, "label": "y = x" },
{ "id": "V1", "x": 20, "y": 0, "label": "" },
{ "id": "V2", "x": 20, "y": 30, "label": "x = 20" }
],
"polygons": [{ "points": ["A", "B", "C", "D", "E"] }],
"segments": [
{ "from": "L1", "to": "L2" },
{ "from": "M1", "to": "M2" },
{ "from": "V1", "to": "V2" },
{ "from": "A", "to": "B" },
{ "from": "E", "to": "D" }
],
"circles": [],
"functions": [],
"title": "Feasible region ABCDE between y = 3 and y = 12"
}
| Corner | |
|---|---|
Maximum at . (The minimum, if asked, is at .)
Note on the source. The notes used as a corner, with . That point does not satisfy . The correct corner is with . The maximum does not change.
Example 3. Maximise subject to , , .
The line passes through and , and the origin satisfies , so the feasible side is below this line that goes up. The line passes through and . The two lines meet where and : , so , .
{
"boundingBox": [-1, 7, 7.5, -1],
"axis": true,
"points": [
{ "id": "A", "x": 0, "y": 0, "label": "A(0,0)" },
{ "id": "B", "x": 6, "y": 0, "label": "B(6,0)" },
{ "id": "C", "x": 3, "y": 3, "label": "C(3,3)" },
{ "id": "D", "x": 0, "y": 2, "label": "D(0,2)" },
{ "id": "P", "x": 0, "y": 6, "label": "(0,6)" },
{ "id": "Q", "x": 4.5, "y": 3.5, "label": "x₁ − 3x₂ = −6" }
],
"polygons": [{ "points": ["A", "B", "C", "D"] }],
"segments": [
{ "from": "P", "to": "B" },
{ "from": "D", "to": "Q" }
],
"circles": [],
"functions": [],
"title": "Feasible region ABCD"
}
| Corner | |
|---|---|
Maximum at .
Note on the source. The notes gave the -intercept of as . It is (put : ). The corner in the notes was correct.
Page 10 of 14
Word problems solved graphically
Example 1. Chairs and tables. A manufacturer makes chairs and tables on machines and . A chair needs 2 hours on and 6 hours on ; a table needs 5 hours on and 1 hour on . Machine is available 16 hours a day and machine 30 hours. The profit is Rs 2 per chair and Rs 10 per table. Write the LPP and solve it.
Let chairs and tables be made per day.
subject to
Intercepts: through and ; through and .
The two lines meet here: from the second, ; then , so and .
{
"boundingBox": [-0.8, 5.5, 9, -0.8],
"axis": true,
"points": [
{ "id": "A", "x": 0, "y": 0, "label": "A(0,0)" },
{ "id": "B", "x": 5, "y": 0, "label": "B(5,0)" },
{ "id": "C", "x": 4.786, "y": 1.286, "label": "C(4.79,1.29)" },
{ "id": "D", "x": 0, "y": 3.2, "label": "D(0,3.2)" },
{ "id": "P", "x": 8, "y": 0, "label": "(8,0)" },
{ "id": "Q", "x": 4.25, "y": 4.5, "label": "6x₁+x₂=30" }
],
"polygons": [{ "points": ["A", "B", "C", "D"] }],
"segments": [
{ "from": "D", "to": "P" },
{ "from": "B", "to": "Q" }
],
"circles": [],
"functions": [],
"title": "Feasible region ABCD; the shallow line is 2x₁ + 5x₂ = 16"
}
| Corner | |
|---|---|
Maximum profit is Rs 32, by making no chairs and tables a day (that is, 16 tables in five days).
Note on the source. The notes wrote the value at as "". The correct working is . They also rounded to with , but the exact value is . The conclusion (maximum ) is correct.
Example 2. The diet problem, solved. Minimise subject to , , , (from the formulation page).
The carbohydrate line passes through and . Every point on or above it automatically satisfies the calorie line (through and ) and the protein line (through and ), which lie below it. So the feasible region is everything on or above the carbohydrate line. It is an unbounded region.
{
"boundingBox": [-1, 10, 13, -1],
"axis": true,
"points": [
{ "id": "P", "x": 0, "y": 7.5, "label": "(0,7.5)" },
{ "id": "Q", "x": 10, "y": 0, "label": "(10,0)" },
{ "id": "R", "x": 18, "y": 0, "label": "" },
{ "id": "S", "x": 18, "y": 15, "label": "" },
{ "id": "T", "x": 0, "y": 15, "label": "" },
{ "id": "C1", "x": 0, "y": 3.333, "label": "calories" },
{ "id": "C2", "x": 4, "y": 0, "label": "" },
{ "id": "P1", "x": 0, "y": 1.667, "label": "protein" },
{ "id": "P2", "x": 2.5, "y": 0, "label": "" }
],
"polygons": [{ "points": ["P", "Q", "R", "S", "T"] }],
"segments": [
{ "from": "P", "to": "Q" },
{ "from": "C1", "to": "C2" },
{ "from": "P1", "to": "P2" }
],
"circles": [],
"functions": [],
"title": "Feasible region (shaded, continuing upwards) on or above 30x₁ + 40x₂ = 300"
}
| Corner | |
|---|---|
Both corners give . Notice that everywhere in the region, and it is equal to along the whole carbohydrate line. So the minimum cost is Rs 30, and it is reached at every point of the segment from to . This LPP has multiple optimal solutions.
Watch out. For a minimisation over an unbounded region, a minimum can still exist (as here), because the cost increases as you go further into the region. It is a maximisation over an unbounded region that may have no answer.
Page 11 of 14
Special cases of the graphical method
Not every LPP has one single answer.
| Case | What the graph shows | What to say |
|---|---|---|
| Unique optimum | one corner gives the best value | "the optimum is at " |
| Multiple optima | two neighbouring corners give the same best value: the objective lines are parallel to an edge | every point of that edge is optimal (diet problem) |
| Unbounded | the region goes on forever in the direction in which improves | no finite optimum |
| Infeasible | the constraints have no common point, so there is no feasible region at all | the LPP has no feasible solution |
Example 1. An infeasible problem. Maximise subject to , , .
Divide the constraints by 2 and 4:
No pair can make both at most and at least . The boundary lines are parallel (through , and through , ). The first constraint allows only the triangle below the lower line, and the second allows only the region above the upper line.
{
"boundingBox": [-0.4, 2.4, 4.4, -0.4],
"axis": true,
"points": [
{ "id": "O", "x": 0, "y": 0, "label": "" },
{ "id": "A", "x": 2, "y": 0, "label": "(2,0)" },
{ "id": "B", "x": 0, "y": 1, "label": "(0,1)" },
{ "id": "C", "x": 3.75, "y": 0, "label": "(3.75,0)" },
{ "id": "D", "x": 0, "y": 1.875, "label": "(0,1.875)" }
],
"polygons": [{ "points": ["O", "A", "B"] }],
"segments": [
{ "from": "A", "to": "B" },
{ "from": "C", "to": "D" }
],
"circles": [],
"functions": [],
"title": "Shaded: 2x₁ + 4x₂ ≤ 4. The second constraint needs points above the upper line, so the regions never meet"
}
The LPP is infeasible: it has no solution.
Note on the source. The class notes concluded "there is no bounded region". The correct statement is stronger: there is no feasible region at all, so the problem is infeasible (not just unbounded).
Watch out. "Unbounded" and "infeasible" are different. Unbounded means feasible points exist but can be made as large as we like. Infeasible means there are no feasible points.
Page 12 of 14
Gradient descent (method of steepest descent)
The idea
From Module 3, points in the direction in which increases fastest, so points in the direction in which it decreases fastest. To find a minimum, start at any point and keep taking small steps downhill.
Update rule. From the current point ,
where is the step size (also called the learning rate).
Method
- Find as a formula.
- Start at the given .
- At each step, find at the current point, multiply by , and subtract.
- Repeat for the required number of iterations, or until the steps become very small.
Write the work in a table: point, gradient, new point.
Examples
Example 1. Find the minimum of by steepest descent from , with , for five iterations.
. Each update is
| 0 | ||
| 1 | ||
| 2 | ||
| 3 | ||
| 4 | ||
| 5 |
The points move towards the true minimum , where . The -coordinate decreases faster because is steeper in the -direction.
Note on the source. No step size was given in this question. The class notes took , and we have kept that assumption. One line of the notes copied as , but it is . The value is correct.
Example 2. Minimise from with , for three iterations.
, so each step multiplies both coordinates by :
approaching the minimum at the origin.
Watch out. Find the gradient at the current point in every step. A common mistake is to keep using , or to write the new point in place of the gradient.
Page 13 of 14
Gradient descent: more examples
Example 1. Minimise from with fixed step , for five iterations.
. So and .
| 0 | ||
| 1 | ||
| 2 | ||
| 3 | ||
| 4 | ||
| 5 |
With such a small step, the progress towards is slow.
Note on the source. At step 3 the notes used for the -component of the gradient, but it is . This mistake made and wrong ( and in the notes). The corrected values are in the table.
Example 2. Minimise from with learning rate .
.
| 0 | ||
| 1 | ||
| 2 | ||
| 3 | ||
| 4 |
The points come closer to the true minimum , where . Each step reduces the remaining gap by 20 %, since and .
Note on the source. The notes wrote the second step as , where the next point was written in the place of the gradient. The gradient at is , which gives the point .
Watch out. The step size is important. If it is too small, the method is slow (Example 1). If it is too large, the points go beyond the minimum: for , any makes increase instead of decrease.
Page 14 of 14
Practice questions and formula sheet
Practice questions
Try these without looking at the answers. The answers are given below.
A. Lagrange multipliers
- Find the maximum and minimum of on the circle .
- Find the point of the line closest to the origin.
- Three positive numbers add up to . Use Lagrange multipliers to find the largest product.
- Minimise subject to and .
B. Linear programming
- Solve the manufacturing problem: maximise subject to , , .
- Minimise subject to , , .
- Show that the LPP "maximise subject to , , " has no solution.
C. Gradient descent
- Take two steps of steepest descent for from with .
Answers
- , give ; then . Maximum at , minimum at .
- Minimise : , give , ; the line gives . The point is , at distance .
- : gives . Maximum product .
- , , give ; with , : , . Minimum at .
- Corners , , , with . Maximum at .
- The region is unbounded above, with corners , , and . Minimum at .
- The constraints require and at once, which is impossible: the LPP is infeasible.
- . From : gradient , new point . Then gradient , new point . (The minimum is at .)
Study tip. For LPPs, always make the corner table: corner, how you found it (which two lines), and value of . This makes the answer easy to check and easy to mark.
Formula sheet
Lagrange multipliers
| One constraint | ; solve |
| Condition | at the optimum |
| Three variables | add |
| Two constraints | ; solve |
| Distance problems | minimise , not |
Linear programming
| General form | optimise subject to (or , ), |
| Feasible region | intersection of the half-planes of all constraints |
| Corner-point theorem | if an optimum exists, one occurs at a corner of the feasible region |
| Graphical method | draw lines by intercepts, test the origin, list corners, evaluate at each |
| Special cases | multiple optima, unbounded, infeasible |
Gradient descent
| Direction of steepest descent | |
| Step size (learning rate) | : small is slow, too large overshoots |
| For | , |