Systems of Linear Equations

⚡ Key Takeaways

A system of linear equations is a collection of two or more linear equations involving the same variables. Solving it means finding values for the variables that satisfy all equations simultaneously. A system can have exactly one solution, no solution, or infinitely many solutions — geometrically corresponding to lines/planes that intersect at a point, never meet, or coincide. Used everywhere from circuit analysis to economics; formalized through the 18th–19th centuries (Gauss, Cramer).

💡 The Core Insight

Each linear equation in two variables represents a line; the solution to a system is the set of points lying on all the lines at once. Solving algebraically (substitution or elimination) is just a bookkeeping method for finding that geometric intersection. The same idea scales: in three variables each equation is a plane, and solutions are where planes meet. Linearity guarantees that the solution set is itself "flat" — a point, a line, a plane, or empty — which is exactly why only three outcomes are possible.

Formal Statement

DefinitionLinear Equation

A linear equation in the variables x1,x2,…,xnx_1, x_2, \dots, x_n is an equation that can be written in the form

1
a1x1+a2x2+⋯+anxn=b\quad a_1 x_1 + a_2 x_2 + \cdots + a_n x_n = b

Derivation hint: A linear equation contains only first-degree terms — no xi2x_i^2, no xixjx_i x_j, no xi\sqrt{x_i}, no 1/xi1/x_i. Here the aia_i are the coefficients (known constants), bb is the constant term, and the xix_i are the unknowns. If all ai=0a_i = 0 and b≠0b \neq 0, the equation has no solution; if all ai=0a_i = 0 and b=0b = 0, every assignment satisfies it.

DefinitionSystem of Linear Equations

A system of mm linear equations in nn unknowns is a list

2
{a11x1+a12x2+⋯+a1nxn=b1a21x1+a22x2+⋯+a2nxn=b2⋮am1x1+am2x2+⋯+amnxn=bm\quad \begin{cases} a_{11}x_1 + a_{12}x_2 + \cdots + a_{1n}x_n = b_1 \\ a_{21}x_1 + a_{22}x_2 + \cdots + a_{2n}x_n = b_2 \\ \quad\vdots \\ a_{m1}x_1 + a_{m2}x_2 + \cdots + a_{mn}x_n = b_m \end{cases}

Derivation hint: The first subscript ii on aija_{ij} labels the equation (row); the second subscript jj labels the variable (column). A solution is an ordered tuple (x1,…,xn)(x_1, \dots, x_n) that satisfies every equation. The solution set is the collection of all such tuples. Two systems are equivalent if they have the same solution set.

For the common case of two equations in two unknowns:

3
{a1x+b1y=c1a2x+b2y=c2\quad \begin{cases} a_1 x + b_1 y = c_1 \\ a_2 x + b_2 y = c_2 \end{cases}

Derivation hint: Each equation, with ai,bia_i, b_i not both zero, plots as a straight line in the xyxy-plane.

TheoremTrichotomy of Solutions

Every system of linear equations has exactly one of the following: 1. No solution (the system is inconsistent), 2. Exactly one solution (consistent and independent), 3. Infinitely many solutions (consistent and dependent). No linear system can have, for example, exactly two solutions.

TheoremCramer's Rule for 2×2 Systems

For the system in equation [3], define the determinant D=a1b2−a2b1D = a_1 b_2 - a_2 b_1. If D≠0D \neq 0, the unique solution is

4
x=c1b2−c2b1a1b2−a2b1,y=a1c2−a2c1a1b2−a2b1\quad x = \frac{c_1 b_2 - c_2 b_1}{a_1 b_2 - a_2 b_1}, \qquad y = \frac{a_1 c_2 - a_2 c_1}{a_1 b_2 - a_2 b_1}

Derivation hint: Each numerator is the determinant of the coefficient matrix with one column replaced by the constants (c1,c2)(c_1, c_2). If D=0D = 0, the system has either no solution or infinitely many. See Determinants and Cramer's Rule.

Why It Holds / Derivation

ProofSolving a 2×2 System by Elimination

We solve the general system [3] to derive Cramer's rule and confirm the trichotomy.

Step 1. Multiply the first equation by b2b_2 and the second by b1b_1:

5
a1b2 x+b1b2 y=c1b2,a2b1 x+b1b2 y=c2b1\quad a_1 b_2\, x + b_1 b_2\, y = c_1 b_2, \qquad a_2 b_1\, x + b_1 b_2\, y = c_2 b_1

Derivation hint: We chose multipliers that make the yy-coefficients equal so they cancel on subtraction.

Step 2. Subtract the second from the first; the yy-terms vanish:

6
(a1b2−a2b1) x=c1b2−c2b1\quad (a_1 b_2 - a_2 b_1)\, x = c_1 b_2 - c_2 b_1

Derivation hint: b1b2y−b1b2y=0b_1 b_2 y - b_1 b_2 y = 0, isolating xx.

Step 3. If D=a1b2−a2b1≠0D = a_1 b_2 - a_2 b_1 \neq 0, divide to obtain x=c1b2−c2b1Dx = \dfrac{c_1 b_2 - c_2 b_1}{D}, matching [4]. By a symmetric elimination of xx we get yy.

Step 4. If D=0D = 0, equation [6] reads 0⋅x=c1b2−c2b10 \cdot x = c_1 b_2 - c_2 b_1. If the right side is nonzero, this is impossible — no solution. If the right side is also zero, the two original equations are proportional and describe the same line — infinitely many solutions. This exhausts all cases, proving the trichotomy for n=2n = 2. ■\blacksquare

∎
mathematician · Carl Friedrich Gauss | 1777–1855

Though systematic elimination was known in ancient China, Gauss formalized the elimination procedure now bearing his name while computing the orbit of the asteroid Ceres around 1801. His method — reducing a system to row-echelon form through systematic operations — remains the foundation of computational linear algebra. Gauss treated linear systems as routine tools in his astronomical and geodetic work, and the method's reliability made large-scale hand computation feasible long before computers.

Building Intuition

🧠 Intuition

Picture two straight roads on a flat map. Each road is the graph of one equation. A solution to the system is a place that lies on both roads at once — an intersection. Three things can happen: the roads cross once (one solution), run parallel and never meet (no solution), or are the same road drawn twice (infinitely many shared points). This is why a system can never have exactly two solutions: two distinct straight lines cannot cross twice. The algebra of elimination is simply a way of finding that crossing without drawing the map.

Figure
Three possible outcomes for a system of two lines

```svg

One solution lines cross No solution parallel lines Infinitely many same line

```

Worked Examples

ExampleA Unique Solution by Elimination

Given: Solve

{2x+3y=124x−y=5\begin{cases} 2x + 3y = 12 \\ 4x - y = 5 \end{cases}

Step 1. Make the yy-coefficients opposites. Multiply the second equation by 33:

12x−3y=1512x - 3y = 15

Step 2. Add to the first equation (2x+3y=12)(2x + 3y = 12):

14x=27  ⟹  x=271414x = 27 \implies x = \frac{27}{14}

Step 3. Substitute into 4x−y=54x - y = 5:

4⋅2714−y=5  ⟹  10814−y=5  ⟹  y=10814−7014=3814=1974 \cdot \frac{27}{14} - y = 5 \implies \frac{108}{14} - y = 5 \implies y = \frac{108}{14} - \frac{70}{14} = \frac{38}{14} = \frac{19}{7}

Check (Cramer's rule): D=(2)(−1)−(4)(3)=−2−12=−14≠0D = (2)(-1) - (4)(3) = -2 - 12 = -14 \neq 0, confirming a unique solution.

x=2714,y=197\boxed{x = \tfrac{27}{14}, \quad y = \tfrac{19}{7}}

(Pure numbers — no units in this abstract example.)

ExampleAn Application with Units

Given: A vendor sells apples at $2 each and bananas at $1 each. A customer buys 7 pieces of fruit total and pays $11. How many of each? Let aa = number of apples, bb = number of bananas.

{a+b=7(count)2a+b=11(dollars)\begin{cases} a + b = 7 \quad (\text{count}) \\ 2a + b = 11 \quad (\text{dollars}) \end{cases}

Step 1. Subtract the first equation from the second:

(2a+b)−(a+b)=11−7  ⟹  a=4(2a + b) - (a + b) = 11 - 7 \implies a = 4

Step 2. Substitute back: 4+b=7  ⟹  b=34 + b = 7 \implies b = 3.

Check: 2(4)+1(3)=8+3=112(4) + 1(3) = 8 + 3 = 11 ✓ and 4+3=74 + 3 = 7 ✓.

a=4 apples,b=3 bananas\boxed{a = 4 \text{ apples}, \quad b = 3 \text{ bananas}}

Common Misconceptions

⚠️ Common mistake

"More equations always means a smaller solution set or a unique answer." False. Adding equations can leave the solution unchanged (if they are redundant), make a system inconsistent, or have no effect. What matters is not the count of equations but how many are independent. A system with three equations in two unknowns is overdetermined and usually has no solution — but if all three lines pass through one point, the unique solution survives.

⚠️ Common mistake

"If I get 0=00 = 0 while solving, I made a mistake." Not necessarily — 0=00 = 0 signals that the equations were dependent, giving infinitely many solutions. Conversely, arriving at 0=50 = 5 (or any false statement) correctly signals no solution. These are meaningful outcomes, not errors.

Counterexample

Consider the system

{x+y=12x+2y=3\begin{cases} x + y = 1 \\ 2x + 2y = 3 \end{cases}

A naive solver might expect a unique intersection. But the lines have the same slope and different intercepts — they are parallel. Eliminating: multiply the first by 2 to get 2x+2y=22x + 2y = 2, then subtract from the second: 0=10 = 1, which is false. No solution exists. This shows that two equations in two unknowns do not guarantee a solution.

Connections

connection

Systems of linear equations are the gateway to Matrices, where the coefficients are packaged into an array and the system written compactly as Ax=bA\mathbf{x} = \mathbf{b}. Solving then connects to Matrix Inverse (via x=A−1b\mathbf{x} = A^{-1}\mathbf{b} when AA is invertible), Determinants (which detect whether a unique solution exists), and Gaussian Elimination as the general algorithm. The geometric viewpoint links directly to Linear Functions and the graphing of Lines and Slopes. At a higher level, the trichotomy is a special case of the structure of solution sets in Vector Spaces and Linear Transformations.

Real-World Applications

🔬 Where this appears

Historical Development

⏳ History
- c. 200 BCE — China: The Nine Chapters on the Mathematical Art presents a method essentially identical to Gaussian elimination ("fangcheng") for solving systems with rod numerals.
- c. 250 CE — Greece: Diophantus solves simultaneous equations, though without systematic notation.
- 1545 — Italy: Cardano gives a rule resembling a 2×2 determinant in Ars Magna.
- 1683 — Japan: Seki Takakazu develops determinant-like methods for eliminating variables.
- 1693 — Germany: Leibniz independently writes about determinants in correspondence, anticipating modern notation.
- 1750 — Switzerland: Gabriel Cramer publishes the rule now bearing his name in Introduction à l'analyse des lignes courbes algébriques.
- c. 1801 — Germany: Gauss systematizes elimination during his orbit computations for Ceres.
- 1888 — England: Wilhelm Jordan refines the method into Gauss–Jordan elimination, reducing to reduced row-echelon form.
- 1858 — England: Arthur Cayley founds matrix algebra, giving the system the compact form Ax=bA\mathbf{x} = \mathbf{b}.

Subtleties & Limits

open-problem

For small hand-computed systems the methods here are exact, but real applications raise deeper questions. When systems are overdetermined (more equations than unknowns) with no exact solution — as in fitting noisy experimental data — one seeks a best approximate solution via Least Squares rather than an exact one. When coefficients are only known approximately, a system may be ill-conditioned: tiny changes in the data produce huge changes in the solution, a central concern of numerical analysis. For systems with millions of variables (climate models, search engines), the practical challenge is not whether a solution exists but how to compute it efficiently and stably — an active area connecting linear algebra to computer science. The boundary between "solvable in principle" and "solvable in practice" remains a rich frontier.

See Also

Matrices · Determinants · Cramer's Rule · Gaussian Elimination · Matrix Inverse · Linear Functions · Least Squares · Vector Spaces