1. Gaussian Elimination0%

Systems of Equations · Topic 1 of 1

1. Gaussian Elimination

Video coming soon6 worked examples

Theory

A system of three equations in three unknowns can be solved by writing an augmented matrix and using row operations to reach upper-triangular form, then back-substituting. The permitted row operations are: swap two rows, multiply a row by a non-zero constant, and add a multiple of one row to another.

Reducing a 3×33\times 3 system leads to one of three outcomes:

  • Unique solution — the matrix reduces fully; solve by back-substitution.
  • Redundancy — a row becomes 0 0 0  00\ 0\ 0\ |\ 0, giving infinitely many solutions described by a parameter.
  • Inconsistency — a row becomes 0 0 0  k0\ 0\ 0\ |\ k with k0k \neq 0, which is impossible, so there is no solution.

A related idea is ill-conditioning: a system where a tiny change in a coefficient or constant produces a large change in the solution (geometrically, the lines or planes are nearly parallel).

The Golden Rule: use row operations only, never column operations, and show each operation (e.g. R2R22R1R_2 \to R_2 - 2R_1). Read the final row carefully: 0=00=0 means redundant, 0=non-zero0=\text{non-zero} means inconsistent.

⚠️ Common Examiner Traps

  • Redundant vs inconsistent: a final row of 0 0 0  00\ 0\ 0\ |\ 0 is infinitely many solutions; 0 0 0  k0\ 0\ 0\ |\ k (k0k \neq 0) is none.
  • Arithmetic under pressure: keep the augmented bar aligned and state each row operation so slips are easy to spot and recover.
  • Column operations: only row operations are valid — never operate on columns.

Worked examples

Example 1

Unique solution. Use Gaussian elimination to solve:

x+y+z=62x+yz=1xy+2z=5\begin{aligned} x + y + z &= 6 \\ 2x + y - z &= 1 \\ x - y + 2z &= 5 \end{aligned}

Step 1: Write the augmented matrix and eliminate the first column:

(111621111125)R2R22R1R3R3R1(1116013110211)\left(\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 2 & 1 & -1 & 1 \\ 1 & -1 & 2 & 5 \end{array}\right) \xrightarrow{\substack{R_2 \to R_2 - 2R_1 \\ R_3 \to R_3 - R_1}} \left(\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 0 & -1 & -3 & -11 \\ 0 & -2 & 1 & -1 \end{array}\right)

Step 2: Eliminate the second column below the pivot:

R3R32R2(11160131100721)\xrightarrow{R_3 \to R_3 - 2R_2} \left(\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 0 & -1 & -3 & -11 \\ 0 & 0 & 7 & 21 \end{array}\right)

Step 3: Back-substitute: 7z=21z=37z = 21 \Rightarrow z = 3; then y3(3)=11y=2-y - 3(3) = -11 \Rightarrow y = 2; then x+2+3=6x=1x + 2 + 3 = 6 \Rightarrow x = 1.

(x,y,z)=(1,2,3)(x, y, z) = (1, 2, 3)

Example 2

Redundancy. Solve the system:

x+y+z=6x+2y+3z=14x+3y+5z=22\begin{aligned} x + y + z &= 6 \\ x + 2y + 3z &= 14 \\ x + 3y + 5z &= 22 \end{aligned}

Step 1: Eliminate the first column:

(11161231413522)R2R2R1R3R3R1(1116012802416)\left(\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 1 & 2 & 3 & 14 \\ 1 & 3 & 5 & 22 \end{array}\right) \xrightarrow{\substack{R_2 \to R_2 - R_1 \\ R_3 \to R_3 - R_1}} \left(\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 0 & 1 & 2 & 8 \\ 0 & 2 & 4 & 16 \end{array}\right)

Step 2: Eliminate the second column:

R3R32R2(111601280000)\xrightarrow{R_3 \to R_3 - 2R_2} \left(\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 0 & 1 & 2 & 8 \\ 0 & 0 & 0 & 0 \end{array}\right)

Step 3: The final row is 0=00 = 0, so the system is redundant with infinitely many solutions. Let z=tz = t. Then y=82ty = 8 - 2t and x=6yz=t2x = 6 - y - z = t - 2:

(x,y,z)=(t2, 82t, t)(x, y, z) = (t - 2,\ 8 - 2t,\ t)

Example 3

Inconsistency. Show that the following system has no solution:

x+y+z=6x+2y+3z=14x+3y+5z=20\begin{aligned} x + y + z &= 6 \\ x + 2y + 3z &= 14 \\ x + 3y + 5z &= 20 \end{aligned}

Step 1: Eliminate the first column:

(11161231413520)R2R2R1R3R3R1(1116012802414)\left(\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 1 & 2 & 3 & 14 \\ 1 & 3 & 5 & 20 \end{array}\right) \xrightarrow{\substack{R_2 \to R_2 - R_1 \\ R_3 \to R_3 - R_1}} \left(\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 0 & 1 & 2 & 8 \\ 0 & 2 & 4 & 14 \end{array}\right)

Step 2: Eliminate the second column:

R3R32R2(111601280002)\xrightarrow{R_3 \to R_3 - 2R_2} \left(\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 0 & 1 & 2 & 8 \\ 0 & 0 & 0 & -2 \end{array}\right)

Step 3: The final row reads 0=20 = -2, which is impossible. The system is inconsistent and has no solution.

Example 4

Ill-conditioning. Solve x+y=2, x+1.01y=2.01x + y = 2,\ x + 1.01y = 2.01. Then re-solve with the second constant changed to 2.022.02, and comment.

Step 1: Subtracting the first equation from the second gives 0.01y=0.010.01y = 0.01, so y=1y = 1 and x=1x = 1. Solution (1,1)(1, 1).

Step 2: With the constant changed to 2.022.02, subtracting gives 0.01y=0.020.01y = 0.02, so y=2y = 2 and x=0x = 0. Solution (0,2)(0, 2).

Step 3: A change of just 0.010.01 in one constant moved the solution from (1,1)(1,1) to (0,2)(0,2). The system is ill-conditioned — the two lines are almost parallel, so the solution is highly sensitive to small changes.

Example 5

Show that the system below has infinitely many solutions, give the general solution in terms of a parameter λ\lambda, and state the particular solution when λ=1\lambda = 1.

The system is x+2yz=3x + 2y - z = 3, 2xy+3z=12x - y + 3z = 1, 3x+y+2z=43x + y + 2z = 4.

Step 1: Write the augmented matrix:

(121321313124)\left(\begin{array}{ccc|c} 1 & 2 & -1 & 3 \\ 2 & -1 & 3 & 1 \\ 3 & 1 & 2 & 4 \end{array}\right)

Step 2: Clear the first column with R2R22R1R_2 \to R_2 - 2R_1 and R3R33R1R_3 \to R_3 - 3R_1:

(121305550555)\left(\begin{array}{ccc|c} 1 & 2 & -1 & 3 \\ 0 & -5 & 5 & -5 \\ 0 & -5 & 5 & -5 \end{array}\right)

Step 3: Rows 2 and 3 are now identical, so R3R3R2R_3 \to R_3 - R_2 produces a row of zeros:

(121305550000)\left(\begin{array}{ccc|c} 1 & 2 & -1 & 3 \\ 0 & -5 & 5 & -5 \\ 0 & 0 & 0 & 0 \end{array}\right)

The line 0=00 = 0 is always true, so the third equation was redundant — it carried no new information. Two equations cannot pin down three unknowns, so there are infinitely many solutions.

Step 4: Introduce a parameter for the free variable. Let z=λz = \lambda. From row 2:

5y+5λ=5    yλ=1    y=1+λ-5y + 5\lambda = -5 \implies y - \lambda = 1 \implies y = 1 + \lambda

Step 5: Back-substitute into row 1:

x+2(1+λ)λ=3    x+2+λ=3    x=1λx + 2(1+\lambda) - \lambda = 3 \implies x + 2 + \lambda = 3 \implies x = 1 - \lambda

Step 6: The general solution is:

x=1λ,y=1+λ,z=λx = 1 - \lambda, \qquad y = 1 + \lambda, \qquad z = \lambda

Step 7: Setting λ=1\lambda = 1 gives the particular solution (0, 2, 1)(0,\ 2,\ 1).

Check: in the second equation, 2(0)2+3(1)=12(0) - 2 + 3(1) = 1

Example 6

A parabola with equation y=ax2+bx+cy = ax^2 + bx + c passes through the points (1,4)(1, 4), (2,3)(2, 3) and (3,6)(3, 6). Form a system of equations and solve it to find the equation of the parabola.

Step 1: Substitute each point into y=ax2+bx+cy = ax^2 + bx + c. Each one gives a linear equation in the three unknowns:

(1,4):a+b+c=4(2,3):4a+2b+c=3(3,6):9a+3b+c=6\begin{aligned} (1,4): &\quad a + b + c = 4 \\ (2,3): &\quad 4a + 2b + c = 3 \\ (3,6): &\quad 9a + 3b + c = 6 \end{aligned}

Step 2: Eliminate cc by subtracting consecutive equations:

(2)(1):3a+b=1(3)(2):5a+b=3\begin{aligned} (2)-(1): &\quad 3a + b = -1 \\ (3)-(2): &\quad 5a + b = 3 \end{aligned}

Step 3: Subtract these two to find aa:

2a=4    a=22a = 4 \implies a = 2

Step 4: Back-substitute for bb, then cc:

3(2)+b=1    b=7,27+c=4    c=93(2) + b = -1 \implies b = -7, \qquad 2 - 7 + c = 4 \implies c = 9

Step 5: The parabola is:

y=2x27x+9y = 2x^2 - 7x + 9

Check: at x=3x=3, y=1821+9=6y = 18 - 21 + 9 = 6