Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

2.1 Systems of Linear Equations

Note 1. The first note in this book. It records a question asked while reading Section 2.1 of Mathematics for Machine Learning (Deisenroth, Faisal & Ong), the two page screenshots the question is based on, and the response that was given.

The question is reproduced verbatim. The response is the answer as given, lightly edited for Markdown formatting and with LaTeX set as proper math; a correction to one claim in it is appended in Corrections and additions.

The question

These are from Mathematics for Machine Learning. Having studied SPM math and additional math, ACCA and implemented Oracle MRP this production plan doesn’t make sense. Is it listing out each individual resource?

Screenshots

The two pages the question refers to. Both are from Section 2.1, “Systems of Linear Equations”.

Response

Short answer: yes — but only in the accounting sense, and that’s exactly why it doesn’t line up with MRP.

What (2.3) actually says

Read the indices carefully:

  • runs over resources (steel, machine hours, labour, …)
  • runs over products
  • = units of resource needed for one unit of product
  • = the unknown decision variable: how many units of product to make
  • = units of resource available

So each row of (2.3) is one resource’s conservation statement:

Each column, by contrast, is one product’s recipe — its resource-consumption vector . So the matrix is an matrix: rows = resources, columns = products, and is the -dimensional resource-availability vector.

Two things worth flagging, because the textbook’s framing is a bit loose:

  1. “Optimal” is doing no work in (2.3). That system is only the feasibility constraint set — it says “the plan must consume exactly what’s available, leaving nothing over.” Optimality needs a separate objective (max profit, min cost), which is where linear programming enters. (2.3) alone just says “don’t waste material.”
  2. The word “system” is matrix notation for a definition, not a recipe. The rows are the resources, the columns are the products. Reading a column gives you one product’s bill of materials; reading a row gives you one resource’s demand ledger.

A concrete check with , :

Why MRP intuition resists it

Your Oracle MRP instinct is right to flag this, but the mismatch is structural, not a math error:

Textbook (2.3)MRP
Structureone flat level, all products independentmulti-level BOM explosion, parent → component
Coefficientsfixed for the whole problemper-item, per-BOM quantity-per-assembly, often phantom/optional
Timea single static periodtime-phased buckets, lead times, offsets
Quantitiesany real number order quantities, lot-sizing rules, sometimes integer
Resourcean equation to satisfy exactlya capacity check you may violate (overload/underload)

In MRP terms, is roughly your quantity-per-assembly, is roughly your available supply / capacity, and fixing is a single-level, infinite-capacity, exact-satisfaction feasibility question. In Oracle MRP you’d actually be solving a recursive netting problem (gross requirement → on-hand → scheduled receipts → net requirement → planned orders), not a static system of equations. That’s why this example feels incomplete — it’s a toy that captures the arithmetic of resource consumption while dropping all the machinery MRP adds.

The gap that usually bites next

Note that in the generic case : with resource equations and product unknowns, you get:

  • (more products than binding resources): an underdetermined system — a whole family of exact plans, not one answer. That’s the setup where LP becomes necessary to pick among them.
  • : overdetermined — likely inconsistent, meaning you cannot consume every resource exactly. That’s a real-world situation MRP handles by over/under-capacity warnings; (2.3) has no way to express it except “no solution.”

For example, with the case above, if satisfies then every is again an exact solution, so there are infinitely many plans that consume precisely 100 and 80 units of and . No MRP run would ever return a one-parameter family — it returns one plan. That difference is the crux of the intuition. (For this particular , which has full row rank 2, no such exists; see Corrections and additions.)

Corrections and additions

2026-09-29 — the underdetermined example was wrong as originally given

The response above, as first delivered, claimed that for the concrete case “every (where ) is an exact solution: infinitely many plans all consuming precisely 100 and 80 units of and ,” and listed four such solutions computed from an incorrect null vector. That specific numerical illustration was wrong, and the corrected paragraph above replaces it. Here is the accurate picture, verified in scripts/explore_example_2_1.py:

  • (singular values and ), so the two equations are independent and the null space of is : forces .
  • Solving gives the minimum-norm exact solution .
  • Because the null space is trivial, is the only exact solution of , not the base of a one-parameter family.

So the structure of the argument in the response stands — with equations in unknowns the solution set is generally an affine subspace of dimension , so whenever is rank-deficient there are infinitely many exact plans — but this particular matrix is a degenerate illustration of it, since leaves no freedom. A correct illustration needs dependent resource rows. For instance

has and hence a null space of dimension , and the minimum-norm solution is ; then is exact for every , which is the free-family behaviour the original text was reaching for. A basis of that null space is

Lesson recorded for future notes: an “infinitely many solutions” claim must be backed by an explicit check that , and any null vector quoted must be verified with rather than asserted.

References

  • Deisenroth, Faisal & Ong, Mathematics for Machine Learning, Section 2.1 (“Systems of Linear Equations”), Example 2.1 and Equations (2.2)–(2.3). See References for the full citation and link.
  • Reproducibility script: scripts/explore_example_2_1.py.