Contour Lines and the Direction of Improvement

An objective assigns a value to every point, so points of equal value form a family of parallel lines and the objective's coefficient vector points perpendicular to them, towards increase. Drawing the family correctly and knowing which way along it improves are two different skills, and the second is where the errors are.

Definition

For an objective c T x with c ≠ 0 , the contour at value k is the set { x : c T x = k } . In two variables this is the line c 1 x 1 + c 2 x 2 = k .

Different values of k give parallel lines: they share the coefficient vector c , hence the same slope − c 1 / c 2 when c 2 ≠ 0 , and differ only in position.

The vector c is orthogonal to every contour and points in the direction of increase. For any direction d , moving from x to x + λ d changes the objective by λ c T d . So the objective increases along d exactly when c T d > 0 , decreases when c T d < 0 , and is unchanged when c T d = 0 . The last being precisely the directions along a contour.

A maximisation therefore pushes the contour along c ; a minimisation pushes it against c .

Formal statement

Contour at k : { x : c T x = k } . Directional change: c T ( x + λ d ) − c T x = λ c T d . Improving directions for a maximisation: { d : c T d > 0 } ; for a minimisation: { d : c T d < 0 } . Contour directions: { d : c T d = 0 } .

Assumptions and scope

  • The account requires c ≠ 0 . A zero objective makes every feasible point optimal and there is no improving direction; this is a degenerate case, not an instance of the rule.

  • The vector c points towards increase regardless of whether the problem is a maximisation or a minimisation. What changes is which way you push, not which way c points.

  • Contours are parallel because the objective is linear. Equal spacing in value does not mean equal spacing in distance unless measured perpendicular to the contours.

  • Orthogonality of c to the contours is with respect to the standard dot product and assumes the axes are drawn to the same scale. On distorted axes the perpendicularity is not visually apparent, though the algebra is unaffected.

  • A contour is not a constraint. Constraints bound the region and come from the restrictions; contours come from the objective and bound nothing.

Forms this is expressed in

The same content in several forms. Each makes something visible that the others leave implicit, so moving between them is part of understanding the topic rather than a presentation choice.

geometric

Objective contours at several valuesAlternate form: geometric

The objective drawn as a family of parallel lines, one for each value k , given by c T x = k . Consecutive values are evenly spaced, and every line in the family shares the slope − c 1 / c 2 when c 2 ≠ 0 .

This form shows the objective as a landscape over the whole plane rather than as a formula, and it makes the optimisation visibly a motion: the family is pushed until the last line still touching the region is reached.

What it does not carry is direction. The family looks identical for c and for − c , so the drawing alone cannot say which way improves, that information lives in the gradient form.

Translates into: geometric

geometric

The objective vector is normal to its contoursAlternate form: geometric

The objective drawn as the single arrow c = ( c 1 , c 2 ) , placed anywhere in the plane and understood as a direction rather than a location.

The arrow is orthogonal to every contour and points towards increase. It converts a question about a direction d into an arithmetic test: the objective rises along d when c T d > 0 , falls when the product is negative, and holds constant when it is zero.

This form carries exactly what the contour family lacks, orientation, and lacks what the contour family carries, namely the values themselves. The two are used together: the family says where equal-value lines run, the arrow says which way along them to push, and a maximisation goes with the arrow while a minimisation goes against it.

Translates into: geometric

Worked material

Example

Reading direction off the coefficients

A maximisation with positive coefficients. max 3 x 1 + 2 x 2 gives c = ( 3 , 2 ) . Contours have slope − 3 / 2 . Push along ( 3 , 2 ) , up and to the right. Check: from ( 0 , 0 ) to ( 3 , 2 ) the objective goes from 0 to 13 .

The same objective minimised. min 3 x 1 + 2 x 2 . The contours are identical lines with identical slope. Push against ( 3 , 2 ) , towards the origin. Nothing about the drawing changed; the travel direction reversed.

A negative coefficient. max 2 x 1 − 5 x 2 gives c = ( 2 , − 5 ) . Improvement means moving right and down. A learner pushing 'away from the origin' by habit would slide up and to the right and lose 5 per unit of x 2 gained.

A direction test. With c = ( 2 , − 5 ) , is d = ( 1 , 1 ) improving for a maximisation? c T d = 2 − 5 = − 3 < 0 : no, it worsens the objective. Is d = ( 5 , 2 ) ? c T d = 10 − 10 = 0 : neither. It runs along a contour, and the objective is unchanged.

The last case is the significant one. A direction with c T d = 0 is exactly how a linear program comes to have an edge of equally good answers.

Non-example

Things that are not the improving direction

Not the improving direction: the contour's own slope. The contour for max 3 x 1 + 2 x 2 has slope − 3 / 2 , and ( − 2 , 3 ) is a direction along it. Moving that way changes the objective by c T d = − 6 + 6 = 0 . Along the contour is precisely where nothing improves.

Not the improving direction: away from the origin. For max 2 x 1 − 5 x 2 , the direction ( 1 , 1 ) leads away from the origin and worsens the objective, since c T ( 1 , 1 ) = − 3 . The habit works only for objectives with all-positive coefficients and fails quietly otherwise.

Not a contour: a constraint line. x 1 + 2 x 2 ≤ 8 drawn as x 1 + 2 x 2 = 8 is a boundary of the region. It bounds what is permitted. A contour bounds nothing. It records where the objective is constant, and it extends across the whole plane, inside the region and outside it alike.

Not a reason to reverse c : a minimisation. For min 3 x 1 + 2 x 2 the vector c = ( 3 , 2 ) still points towards increase. It is not redefined as ( − 3 , − 2 ) . What changes is that you travel against it. Redefining c per problem type is how sign errors enter the reduced-cost test later, where there is no picture to catch them.

Contrast

Contour slope against direction of improvement

Two facts about a linear objective look like one fact, and separating them is the whole of this unit.

What the drawing settles. Where the equal-value lines run. This needs only the ratio of the coefficients, and it is identical for max 3 x 1 + 2 x 2 , for min 3 x 1 + 2 x 2 , and for max − 3 x 1 − 2 x 2 . All three produce the same family of parallel lines of slope − 3 / 2 .

What the drawing cannot settle. Which way along them improves. Those three problems travel in three different ways: along ( 3 , 2 ) , against ( 3 , 2 ) , and against ( 3 , 2 ) respectively. A family of parallel lines carries no orientation, so no amount of care in drawing recovers it.

Why the error survives inspection. Suppose the direction is taken backwards on the first of these. The contours are correct, the region is correct, the contour is slid neatly until it last touches, at the wrong corner. The output is a specific point and a specific value, both plausible, neither flagged by anything visible. Compare an arithmetic slip, which usually produces something that looks odd.

The habit that prevents it. Write c down explicitly, state whether you are maximising or minimising, and say the travel direction in words before sliding anything: maximising, so travel along c , or minimising, so travel against c . When a direction is in doubt, test it: compute c T d and read the sign. One multiplication settles what an hour of careful drawing cannot.

Common errors

Common misconception

The direction in which to push the objective contour can be read from the drawn contour line itself, so a correctly drawn contour family determines which way improves.

Related units

Requires

Connected

Learn this topic

Used in

Sources

Results update as you type. Use the up and down arrow keys to move between results, Enter to open one, and Escape to close.

Type to search.

Settings

Appearance

Interface density

Your record

Your progress is stored in this browser and nowhere else: an identifier, the answers you have given, the mastery states and review schedule derived from them, and the lesson you last opened. Clearing it makes you a new learner on this device. It cannot be undone, and it will not affect your appearance or density settings.

Focus timer

Focus--minutes remaining

Phase

Kept in this browser only, and used to label the session in your own history.

Today

Nothing recorded yet. Finish a focus session and it will appear here.

Settings

Focus sessions between long breaks.

Sessions you are aiming for in a day.

Notifications

Your history

Sessions are stored in this browser and nowhere else. They are not evidence and never reach your mastery record.