The Matrix Form of a Linear Program

Collecting the coefficients of a linear program into a matrix and its data into vectors replaces m written constraints with one statement, A x ≤ b . The compression is not cosmetic: the row reading recovers the individual constraints, the column reading exhibits A x as a combination of the columns of A , and every later method is stated in terms of one reading or the other.

Definition

A linear program written out in scalars,

min c 1 x 1 + ⋯ + c n x n subject to a 11 x 1 + ⋯ + a 1 n x n ≤ b 1 , ⋮ a m 1 x 1 + ⋯ + a m n x n ≤ b m , x 1 , … , x n ≥ 0 ,

is written in matrix form as

min c T x subject to A x ≤ b , x ≥ 0 ,

where A ∈ R m × n holds the constraint coefficients, b ∈ R m the right-hand sides, c ∈ R n the objective coefficients, and x ∈ R n the variables.

The shapes are forced by the arithmetic. A has one row per constraint and one column per variable, so A x is an m -vector comparable with b . The objective c T x is a 1 × n row times an n -vector, giving a scalar.

The inequality is entrywise. A x ≤ b abbreviates m separate scalar inequalities, one per row. It is not a statement about vector magnitude or ordering in any other sense.

Row reading. Row i of A is the coefficient vector a i T of constraint i , and the i th entry of A x is the dot product a i T x . Reading by rows recovers the original constraints one at a time.

Column reading. Column j of A is the vector A j of coefficients that variable j contributes, one entry per constraint, and

A x = x 1 A 1 + x 2 A 2 + ⋯ + x n A n .

Reading by columns exhibits the left-hand side as a combination of the columns, with the variables as weights.

Formal statement

A ∈ R m × n , b ∈ R m , c ∈ R n . The feasible set is { x ∈ R n : A x ≤ b ,   x ≥ 0 } , and the program seeks x in that set minimising c T x . The i th row of A x ≤ b is a i T x ≤ b i ; the column expansion is A x = ∑ j = 1 n x j A j .

Assumptions and scope

  • The relation A x ≤ b holds entrywise: it abbreviates m scalar inequalities and asserts nothing about norms or about any other ordering of vectors.

  • The shapes must agree. A is m × n with one row per constraint and one column per variable, so A x is an m -vector; a transposed A produces a product that is defined only by accident and means something else.

  • Sign restrictions are stated separately from A x ≤ b . Writing x ≥ 0 as extra rows of A is possible but changes which rows the later theory counts as constraints.

  • The matrix form records the same program, not a simpler one. Converting to it neither removes constraints nor changes the feasible set.

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.

symbolic

The product A x read one row at a time. Row i of A is the coefficient vector a i T of constraint i , and the i th entry of A x is the dot product a i T x : the amount of resource i that the plan x consumes. The constraint set is then m separate statements, a i T x ≤ b i for i = 1 , … , m , all required to hold at once.

This form answers questions about a point. Deciding feasibility is running down the rows and comparing each dot product with its right-hand side. Identifying the active set is collecting the rows that hold with equality. Describing the feasible region as an intersection of half-spaces is the same reading applied to every row at once.

What it does not expose is what a plan is made of. A row mixes every variable together into one number, so nothing in this reading isolates the contribution of a single activity, which is what a basis selects and what a pivot exchanges.

Translates into: symbolic

symbolic

The product A x read one column at a time. Column j of A is the vector A j holding everything variable j contributes, one entry per constraint, and the product expands as

A x = x 1 A 1 + x 2 A 2 + ⋯ + x n A n .

So A x is a combination of the columns, with the decision variables as the weights. Column j is the resource profile of activity j : run it at level x j and it consumes x j A j .

This form answers questions about which plans are available. A basis is a selection of m independent columns; a basic solution solves A B x B = b using only those; a simplex direction is u = A B − 1 A j , built from the entering column; a reduced cost prices one column against the current basis. Every one of those objects is a statement about columns, which is why the method is presented for programs written A x = b .

What it does not expose is whether a given point is allowed. Feasibility is a row question, and no single column answers it.

Translates into: symbolic

Worked material

Non-example

Four assemblies that are not the program

Comparing the vectors as wholes. A reader takes A x ≤ b to mean that A x is shorter than b , or that its entries sum to less. With A x = ( 95 , 80 , 185 ) T and b = ( 120 , 90 , 250 ) T both readings happen to agree with the entrywise one, which is why the mistake survives. Take A x = ( 135 , 90 , 225 ) T instead: the total is smaller than the total of b , and the plan is infeasible, because row 1 gives 135 > 120 . The inequality is m separate statements and one failure is enough.

A transposed coefficient matrix. Writing A with one row per variable and one column per constraint makes A x undefined unless the counts coincide. When they do coincide, a square A , as in the worked example, the product is defined and computes nothing the problem asked about: entry i becomes a sum over constraints of the coefficients of variable i , which is not a resource total. This is the failure that a units check catches and a shape check does not.

A dropped direction. A constraint x 1 + x 2 ≥ 12 entered as the row ( 1 , 1 , 0 ) with right-hand side 12 asserts x 1 + x 2 ≤ 12 : the feasible set is now bounded where the description bounded it below. The row is correct and the program is a different one.

Omitted zeros. Variable 3 absent from constraint 1 is recorded as a 13 = 0 . A row written with two entries because "the third does not appear" either fails to parse or silently shifts every later coefficient one place left, which renames the variables.

What unites the four is that each produces a well-formed object. Nothing about A , b or the arithmetic reports the fault; only translating a row back into the sentence it came from does.

Contrast

The same matrix, read two ways

Take

A = ( 2 1 3 1 2 2 4 3 5 ) , b = ( 120 90 250 ) ,

for three products and three resources.

Row readingColumn reading
What one line isa constraintan activity
Row 2 / column 2 saysproduct mix uses x 1 + 2 x 2 + 2 x 3 labour hours, at most 90 one unit of product 2 uses 1 machine hour, 2 labour hours, 3 kg
The question it answersis this plan allowed?what does this product cost in resources?
A x isa list of resource totals, one per constraint x 1 A 1 + x 2 A 2 + x 3 A 3
Used byfeasibility, active sets, the polyhedronbases, pivots, reduced costs

Both descriptions are of the same nine numbers. Row 2 and column 2 share only the entry a 22 = 2 , and they mean different things by it: in the row it is the labour used per unit of product 2, in the column it is the same quantity seen as part of product 2's resource profile. That the two readings agree on every entry is what makes the matrix one object rather than two tables.

The practical use of the distinction is diagnostic. A reader stuck on "what is A B − 1 A j " is usually reading rows in a column statement. Naming the reading in force is often the whole of the difficulty.

Common errors

Common misconception

In A x ≤ b the inequality compares the vectors as wholes, by length, by total, or by some ordering of vectors, rather than asserting that each entry of A x is at most the corresponding entry of b .

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.