Linear Algebra · Undergraduate

Applications of Linear Systems: Chemistry, Networks and Curve Fitting

Quick answer

Many problems become linear systems once each condition is written as an equation. Balancing a chemical equation gives one equation per element, with a free variable that sets the scale. A network of roads or pipes gives one equation per junction, flow in equals flow out, and free variables show which flows can be chosen. Fitting a polynomial through points gives one equation per point. Row reduction then solves them all the same way.

What you'll learn

  • Balance a chemical equation with a homogeneous system
  • Model flow in a network with conservation at each junction
  • Interpret free variables in an applied solution
  • Fit a polynomial through given points

Turning conditions into equations

Each application follows the same pattern: name the unknowns, write one linear equation per condition, and row reduce. The solution set then answers the question:

ApplicationUnknownsOne equation per
balancing a reactioncoefficients of each compoundelement
network flowflow along each road or pipejunction
polynomial fittingcoefficients of the polynomialdata point

Why free variables carry meaning

A balanced reaction stays balanced when every coefficient is doubled, so its solutions always form a line: one free variable sets the scale. In a network, a loop of roads can carry extra traffic around it without changing any junction’s balance, so loops show up as free variables. A free variable is not a defect in the model; it records a genuine choice in the real situation. Polynomial fitting is the opposite case: with as many points as coefficients and distinct xx-values, there are no free variables and the curve is unique.

A one-way traffic loop Four intersections A, B, C and D joined in a loop, with traffic flowing A to B, B to C, C to D and D to A. The unknown flows on these roads are x₁, x₂, x₃ and x₄. x₁ x₂ x₃ x₄ A B C D
A one-way traffic loop

Worked examples

Common mistakes

Practice problems

  1. Balance H2+O2→H2O\mathrm{H_2} + \mathrm{O_2} \to \mathrm{H_2O}.

    Answer

    2 H2+O2→2 H2O2\,\mathrm{H_2} + \mathrm{O_2} \to 2\,\mathrm{H_2O}

    Full solution

    H: 2x1=2x32x_1 = 2x_3; O: 2x2=x32x_2 = x_3. With x2=1x_2 = 1: x3=2x_3 = 2, x1=2x_1 = 2.

  2. Balance CH4+O2→CO2+H2O\mathrm{CH_4} + \mathrm{O_2} \to \mathrm{CO_2} + \mathrm{H_2O}.

    Answer

    CH4+2 O2→CO2+2 H2O\mathrm{CH_4} + 2\,\mathrm{O_2} \to \mathrm{CO_2} + 2\,\mathrm{H_2O}

    Full solution

    C: x1=x3x_1 = x_3; H: 4x1=2x44x_1 = 2x_4; O: 2x2=2x3+x42x_2 = 2x_3 + x_4. With x1=1x_1 = 1: x3=1x_3 = 1, x4=2x_4 = 2, x2=2x_2 = 2.

  3. In Example 2, what is the smallest possible flow on road AB?

    Answer

    400400 cars per hour

    Full solution

    x1=400+tx_1 = 400 + t with t≥0t \ge 0.

  4. In Example 2, road BC can carry at most 500500 cars per hour. What is the largest allowed tt?

    Answer

    350350

    Full solution

    x2=150+t≤500x_2 = 150 + t \le 500.

  5. Find the line through (1,4)(1, 4) and (3,10)(3, 10) by setting up a system.

    Answer

    y=1+3xy = 1 + 3x

    Full solution

    a+b=4a + b = 4 and a+3b=10a + 3b = 10 give b=3b = 3, a=1a = 1.

  6. Find the quadratic y=a+bx+cx2y = a + bx + cx^2 through (0,1)(0, 1), (1,0)(1, 0) and (2,3)(2, 3).

    Answer

    y=1−3x+2x2y = 1 - 3x + 2x^2

    Full solution

    a=1a = 1; then b+c=−1b + c = -1 and 2b+4c=22b + 4c = 2 give c=2c = 2, b=−3b = -3.

  7. Why does a network with a closed loop of roads always have a free variable?

    Answer

    Extra traffic can circle the loop without changing any junction’s balance.

    Full solution

    Adding the same amount to every road in the loop keeps flow in equal to flow out at each corner.

  8. A student balances Example 1 as 2 C3H8+10 O2→6 CO2+8 H2O2\,\mathrm{C_3H_8} + 10\,\mathrm{O_2} \to 6\,\mathrm{CO_2} + 8\,\mathrm{H_2O}. Is it wrong?

    Answer

    It is balanced, but not in lowest terms.

    Full solution

    It is x1=2x_1 = 2 on the same solution line. Chemists use the smallest whole numbers, from x1=1x_1 = 1.

Frequently asked questions

How do linear systems balance chemical equations?

Give each compound an unknown coefficient and require the number of atoms of each element to match on both sides. The result is a homogeneous system; choose the smallest whole-number solution.

What equation does each junction of a network give?

Flow in equals flow out. With one equation per junction, the system describes all possible flows.

What does a free variable mean in a network?

A flow that can be set freely, such as a road whose traffic can vary; the other flows then adjust to match.

How do you fit a polynomial through points?

For y = a + bx + cx², each point (xᵢ, yᵢ) gives the equation a + bxᵢ + cxᵢ² = yᵢ. Three points with different x give a unique quadratic.

Why does a chemical equation always have a free variable?

Doubling every coefficient balances the equation too, so the solutions form a line through the origin.

What to learn next