Cheatsheet 06 - Systems of Linear Equations

Mathematics for Master Students

What “Linear” Means

An equation is linear when every unknown appears on its own, to the first power: a weighted sum of the variables equals a number. No powers, no products of variables, no roots or exponents on a variable.

Linear Not linear
\(2x + 3y = 13\) \(x^2 + y = 4\) (a square)
\(x_1 + 2x_2 + 2x_3 = 16\) \(xy = 6\) (a product)
\(x - y = 4\) \(\sqrt{x} + y = 1\) (a root)

A system asks several linear equations to hold at the same time. A solution is a set of values satisfying every equation at once. Always check a candidate against all of them.

Solving a 2×2 System

Substitution. Solve one equation for one variable, drop it into the other:

  1. Isolate a variable, e.g. \(x = 5 - y\).
  2. Substitute into the other equation and solve for the remaining variable.
  3. Back-substitute to get the first variable.

Elimination. Scale the equations so a variable cancels:

  1. Multiply one (or both) equations so a variable has matching coefficients.
  2. Add or subtract to cancel that variable; solve for what remains.
  3. Back-substitute for the other variable.

Both methods give the same point where the two lines cross. Always verify in the original equations.

The Augmented Matrix

A system is just its numbers. Stack the coefficients, then the right-hand side after a bar. For example, \(\;x + y + z = 9,\ \ x + 2y + 2z = 16,\ \ 2x + y + 3z = 17\;\) becomes

\[\left[\begin{array}{ccc|c} 1 & 1 & 1 & 9 \\ 1 & 2 & 2 & 16 \\ 2 & 1 & 3 & 17 \end{array}\right]\]

Each row is an equation; the bar separates left from right. No matrix algebra: pure bookkeeping.

TipThe Three Row Operations

Each one can be undone, so the solution set stays the same:

  1. Swap two rows (reorder the equations).
  2. Scale a row by a non-zero number (multiply or divide an equation).
  3. Add a multiple of one row to another (combine two equations).

Every operation acts on the whole row (the right-hand side included).

Gaussian Elimination Recipe

To solve a \(3 \times 3\) system:

  1. Forward-eliminate: using row operations, create zeros below the diagonal, one column at a time, until the matrix is triangular (a staircase of zeros in the lower-left).
  2. Read the triangular system from the bottom up: the last row gives one variable directly.
  3. Back-substitute upward, one variable at a time.
  4. Verify the triple in the original equations.

Micro-example (from the matrix above): \[\left[\begin{array}{ccc|c} 1 & 1 & 1 & 9 \\ 0 & 1 & 1 & 7 \\ 0 & 0 & 1 & 3 \end{array}\right] \;\Rightarrow\; z = 3,\ \ y + 3 = 7 \Rightarrow y = 4,\ \ x + 4 + 3 = 9 \Rightarrow x = 2.\]

How Many Solutions?

With as many equations as unknowns, the triangular form tells you the fate:

In the matrix you see Number of solutions Geometry (2 unknowns)
Full triangle: each row pins one more unknown (no row of zeros on the left) exactly one lines cross at a point
A row \(\;0 = (\text{non-zero})\), e.g. \(0 = 5\) none parallel, distinct lines
A row \(\;0 = 0\), and no row \(0 = (\text{non-zero})\) infinitely many the same line
WarningRead the Right-Hand Side

\(\;0 = 0\;\) means an equation was redundant → infinitely many solutions. “No solution” appears only as \(\;0 = (\text{non-zero})\), a true contradiction. Never confuse the two.

Parameterise the free case: when a row vanishes, set the free variable to \(t\). For \(x + y = 4\) with a redundant partner: let \(y = t\), then \(x = 4 - t\), giving the solution set \((x, y) = (4 - t,\; t)\).

Market Equilibrium

A market clears where supply equals demand, one price and quantity solving both curves:

\[\text{demand } D(p) = 120 - 2p, \quad \text{supply } S(p) = 3p - 30 \;\Longrightarrow\; 120 - 2p = 3p - 30 \;\Rightarrow\; p = 30,\ q = 60.\]

Set the two expressions for \(q\) equal (or eliminate \(q\) from the system), solve for \(p\), then back-substitute for \(q\). Below equilibrium there is excess demand (shortage); above it, excess supply (surplus). The same idea drives production-planning systems.

Systems Checklist

TipBefore You Answer
  • Is every equation actually linear? (first power, no products or roots)
  • Did you apply each row operation to the whole row, right-hand side included?
  • Did you reduce to triangular form before back-substituting?
  • Did you read \(\;0 = 0\;\) (infinitely many) vs \(\;0 = (\text{non-zero})\) (none) correctly?
  • Did you verify the solution in the original equations?

This is the last cheatsheet. Bring all six to the mock exam in our final session.