USTHLinear Algebra · MAT1.002

Modules › Systems of linear equations

Systems of linear equations

Augmented matrices, elementary row operations, Gauss and Gauss–Jordan elimination, solution types, systems with a parameter.

Lecture 1 · Exercise Sheet 1 · Systems of linear equations
Textbook sections: Elementary Linear Algebra (8th ed.) ch. 1 §1.1–1.3 · Strang ch. 2 §2.1–2.3 and §3.3–3.4
USTHDSES

Systems of linear equations

Linear Algebra · Module 1
Lecture 1 · Exercise Sheet 1
Chapter: Systems of linear equations
Books: Elementary Linear Algebra (8th ed.) ch. 1 §1.1–1.3 · Strang ch. 2 §2.1–2.3 and §3.3–3.4
USTHDSES

After this module you can

  • Reduce an augmented matrix with elementary row operations and read off the solution set.
  • Decide between no, one or infinitely many solutions with ranks and count free variables.
  • Solve a system with a parameter $k$ and find the values of $k$ for each behaviour.
USTHDSES

Linear systems and row operations

  • A system $A\mathbf x=\mathbf b$ is stored in the augmented matrix $[A\mid\mathbf b]$.
  • Elementary row operations (they do not change the solution set): swap two rows; multiply a row by $c\ne0$; add a multiple of one row to another. Never multiply by $0$.
  • REF: zero rows at the bottom, leading entries move right. RREF: leading entries are $1$ and are the only non-zero entry in their column.
  • Gauss: reach REF then back-substitute. Gauss–Jordan: reach RREF and read the answer.
USTHDSES

Solution types

After row reductionMeaning
a row $[0\ \cdots\ 0\mid c]$ with $c\ne0$inconsistent: no solution
every unknown is a pivot unknownunique solution
consistent, with free unknownsinfinitely many: $n-\operatorname{rank}A$ free parameters
Rank test
Consistent $\iff\operatorname{rank}A=\operatorname{rank}[A\mid b]$; unique $\iff$ both equal $n$. A homogeneous system $A\mathbf x=\mathbf 0$ is always consistent.
USTHDSES

Many ways to solve $A\mathbf x=\mathbf b$

MethodWorks whenIdea
Gauss + back-substitutionalwaysREF then solve upward
Gauss–JordanalwaysRREF: solution is visible
Cramer's rule$A$ square, $\det A\ne0$$x_j=\frac{\det A_j}{\det A}$
Inverse matrix$A$ invertible$\mathbf x=A^{-1}\mathbf b$
LU factorisation$A$ square$PA=LU$: solve $L\mathbf y=P\mathbf b$, $U\mathbf x=\mathbf y$
Jacobi / Gauss–Seidel$A$ diagonally dominantiterate $x_i\leftarrow\frac{1}{a_{ii}}(b_i-\sum_{j\ne i}a_{ij}x_j)$

The Linear Algebra lab runs all of them on your system and checks that they agree.

USTHDSES

Systems with a parameter

  • Example (Final 2024–25, Shift 1): $x_1+2x_2+x_3+x_4=4$, $x_2+3x_3=-1$, $2x_1+5x_2+5x_3+kx_4=8$.
  • Eliminate: the last row becomes $[0\ 0\ 0\ k-2\mid1]$. If $k=2$: $0=1$, inconsistent; if $k\ne2$: one free variable, infinitely many solutions.
  • Square systems: $\det A(k)=0$ gives the critical values; test each one separately, every other $k$ behaves like a generic one.
  • For $k=3$ the solution is $x_1=5t+5,\ x_2=-3t-1,\ x_3=t,\ x_4=1$.
USTHDSES

Typical mistakes

Row operationsWrite each operation ($R_2\leftarrow R_2-2R_1$) and apply it to the WHOLE row, including the right-hand side.
Free variables$n-\operatorname{rank}$, counted among the unknowns, not equations.
Parameter casesCheck the critical values separately; do not divide by an expression that can be $0$.
USTHDSES

Practice next

  • Chapter quizzes Ch. 1 (3 sets)
  • Practice bank, filtered to this chapter, then written mode
  • Lab: Solve Ax = b
  • Then the mock exams (Exams page)

Worked examples from the course problems

Worked example 1 · Systems with a parameter (Exercise Sheet 1, Ex. 4)
Consider $$\begin{cases}x + 2y - 3z = 4 \\ 3x - y + 5z = 2 \\ 4x + y + \left(a^{2} - 14\right)z = a + 2\end{cases}$$ For which real $a$ does the system have no solution?
Show the answer and the solution

Answer: $a=-4$

$\det\begin{bmatrix}1&2&-3\\3&-1&5\\4&1&a^2-14\end{bmatrix}=-7(a^2-16)$, so only $a=\pm4$ need checking. Row 3 equals row 1 + row 2 in the coefficients; the right-hand sides then agree iff $a+2=6$, i.e. $a=4$. Hence $a=4$: infinitely many solutions; $a=-4$: none; otherwise unique.
Worked example 2 · Reading an RREF (Exercise Sheet 1, Ex. 2)
The augmented matrix of a system in $x_1,\dots,x_4$ is already in reduced row-echelon form: $$\left[\begin{array}{cccc|c}1 & 0 & 0 & 4 & -1 \\ 0 & 1 & 0 & 2 & 6 \\ 0 & 0 & 1 & 3 & 2\end{array}\right]$$ Which vector is a solution of the system?
Show the answer and the solution

Answer: $(-5, 4, -1, 1)$

Give values to the free variables and solve for the pivot variables; $(-5, 4, -1, 1)$ satisfies every row.
Worked example 3 · Solving systems (Exercise Sheet 1, Ex. 3.3)
Solve the system by Gauss–Jordan elimination. $$\begin{cases}x + 2y - t + w = 1 \\ 3y + z - w = 2 \\ z + 7t = 1\end{cases}$$ Which vector $(x,y,z,t,w)$ is a solution?
Show the answer and the solution

Answer: $(\frac{2}{3}, - \frac{4}{3}, 8, -1, 2)$

Gauss–Jordan on the augmented matrix gives $\left[\begin{array}{ccccc|c}1 & 0 & 0 & \frac{11}{3} & \frac{5}{3} & \frac{1}{3} \\ 0 & 1 & 0 & - \frac{7}{3} & - \frac{1}{3} & \frac{1}{3} \\ 0 & 0 & 1 & 7 & 0 & 1\end{array}\right]$. There are 2 free variable(s), so there are infinitely many solutions; substituting each option into the equations, only $(\frac{2}{3}, - \frac{4}{3}, 8, -1, 2)$ satisfies all of them.
Worked example 4 · Row operations (Linear Algebra Summary (Gen 16), I.2 (note on row operations))
In the course notation, which single elementary row operation replaces $R_2$ by $R_2-R_1$?
Show the answer and the solution

Answer: $-R_1+R_2\to R_2$

The allowed forms are $R_i\leftrightarrow R_j$, $kR_i\to R_i$ and $kR_i+R_j\to R_j$. To subtract a row, add $(-1)$ times it: $-R_1+R_2\to R_2$. Writing $R_1-R_2\to R_2$ gives the opposite row $R_1-R_2$ (it needs two steps: $-R_1+R_2\to R_2$ and then $-R_2\to R_2$); $R_2-R_1\to R_1$ changes the wrong row; a swap only exchanges rows.

Practice

Quiz set A Quiz set B Quiz set C Practice bank (this chapter) Written mode Lab: Solve Ax = b

Matrices ▶