Registry Synced

Gaussian Elimination: Solving Linear Systems

3868 words
19 min read

Reading compass

Now · 🎯 Learning Objectives

Gaussian Elimination: Solving Linear Systems

🎯 Learning Objectives

After this topic you will be able to:
  • Identify row echelon form (REF) and reduced row echelon form (RREF)
  • Perform the three elementary row operations
  • Carry out Gaussian elimination to transform any matrix to REF
  • Carry out Gauss-Jordan elimination to transform any matrix to RREF
  • Determine whether a linear system has zero, one, or infinitely many solutions
  • Express solution sets in parametric form using free variables
  • Compute the rank of a matrix from its RREF

📋 Prerequisites

  • Matrices Introduction (Week 1) — matrix notation, matrix-vector multiplication
  • Determinants (Week 1) — testing invertibility
  • Vectors Introduction (Week 1) — column vectors and linear combinations
  • Gaussian elimination is the master algorithm of linear algebra — it underlies finding bases, ranks, null spaces, and inverses

1. The Problem: Solving Ax=bA\mathbf{x} = \mathbf{b}

1.1 Intuition: From Messy to Clean

Imagine you have a system of equations. The equations are messy — coefficients everywhere. We want to transform them into something clean where the solution is obvious. Row operations are like legal algebraic moves (swap equations, multiply an equation by a non-zero constant, add a multiple of one equation to another). They don't change the solution set. We systematically apply these moves until the system is in a form we can read the answer from directly. (Diagram)

2. Row Echelon Form (REF)

2.1 Definition

A matrix is in row echelon form if:
  1. All non-zero rows are above any zero rows
  2. The leading (first non-zero) entry of each row is to the right of the leading entry in the row above
  3. All entries below a leading entry are zero The leading entry (or pivot) is the first non-zero element in a row. In REF, pivots are typically normalised to 1 for convenience (though the definition doesn't require it).

2.2 Examples

✓ REF (correct):
[12−1300120000]\begin{bmatrix} 1 & 2 & -1 & 3 \\ 0 & 0 & 1 & 2 \\ 0 & 0 & 0 & 0 \end{bmatrix}
✗ Not REF (violation):
[001212−130000](row 2’s pivot at column 1 is to the left of row 1’s pivot at column 3 — wrong order)\begin{bmatrix} 0 & 0 & 1 & 2 \\ 1 & 2 & -1 & 3 \\ 0 & 0 & 0 & 0 \end{bmatrix} \quad \text{(row 2's pivot at column 1 is to the left of row 1's pivot at column 3 — wrong order)}

2.3 Reduced Row Echelon Form (RREF)

A matrix is in RREF if it is in REF and additionally:
  1. The leading entry in each non-zero row is 11
  2. Each leading 11 is the only non-zero entry in its column ✓ RREF (correct):
[120700120000]\begin{bmatrix} 1 & 2 & 0 & 7 \\ 0 & 0 & 1 & 2 \\ 0 & 0 & 0 & 0 \end{bmatrix}

3. Elementary Row Operations

There are exactly three operations that preserve the solution set:
OperationNotationExampleEffect
SwapRi↔RjR_i \leftrightarrow R_jSwap rows 1 and 2Changes order
ScaleRi→cRiR_i \to c R_i , c≠0c \neq 0Multiply row 2 by 13\frac{1}{3}Simplifies entries
Add multipleRi→Ri+cRjR_i \to R_i + c R_jR2→R2−2R1R_2 \to R_2 - 2R_1Eliminates entries
Key insight: Adding a multiple of one row to another preserves the determinant. Swapping flips its sign. Scaling scales the determinant by cc.

4. Gaussian Elimination Algorithm

4.1 Forward Elimination (to REF)

Given an m×nm \times n matrix AA:
  1. Start with the leftmost non-zero column (pivot column)
  2. Find a pivot: select a non-zero entry in this column. If none exists, move to the next column
  3. Swap (if needed): bring the pivot row to the top
  4. Scale (optional): make the pivot 11
  5. Eliminate below: use row operations to create zeros below the pivot
  6. Repeat: ignore the pivot row and repeat steps 1-5 on the remaining submatrix
Example 1: Gaussian elimination (3 equations, 3 unknowns)
Solve:
>{x+2y+z=82x+4y−z=−13x+2y−2z=−1>> \begin{cases} x + 2y + z = 8 \\ 2x + 4y - z = -1 \\ 3x + 2y - 2z = -1 \end{cases} >
Augmented matrix:
>[121824−1−132−2−1]>> \left[\begin{array}{ccc|c} 1 & 2 & 1 & 8 \\ 2 & 4 & -1 & -1 \\ 3 & 2 & -2 & -1 \end{array}\right] >
Step 1: Already have pivot (1,1)=1(1,1) = 1.
Step 2: Eliminate column 1 below pivot:
>R2→R2−2R1,R3→R3−3R1>> R_2 \to R_2 - 2R_1,\quad R_3 \to R_3 - 3R_1 >
>[121800−3−170−4−5−25]>> \left[\begin{array}{ccc|c} 1 & 2 & 1 & 8 \\ 0 & 0 & -3 & -17 \\ 0 & -4 & -5 & -25 \end{array}\right] >
Step 3: Next pivot is in column 2. Row 2 has a 0 in column 2, so swap R2↔R3R_2 \leftrightarrow R_3:
>[12180−4−5−2500−3−17]>> \left[\begin{array}{ccc|c} 1 & 2 & 1 & 8 \\ 0 & -4 & -5 & -25 \\ 0 & 0 & -3 & -17 \end{array}\right] >
Step 4: Scale pivots (optional but helpful):
>R2→−14R2,R3→−13R3>> R_2 \to -\frac{1}{4}R_2,\quad R_3 \to -\frac{1}{3}R_3 >
>[12180154254001173]>> \left[\begin{array}{ccc|c} 1 & 2 & 1 & 8 \\ 0 & 1 & \frac{5}{4} & \frac{25}{4} \\ 0 & 0 & 1 & \frac{17}{3} \end{array}\right] >
Step 5: Back substitution. From row 3: z=173z = \frac{17}{3}.
From row 2: y+54z=254⇒y=254−54⋅173=75−8512=−1012=−56y + \frac{5}{4}z = \frac{25}{4} \Rightarrow y = \frac{25}{4} - \frac{5}{4}\cdot\frac{17}{3} = \frac{75 - 85}{12} = -\frac{10}{12} = -\frac{5}{6}
From row 1: x+2y+z=8⇒x=8−2(−56)−173=8+53−173=243+53−173=123=4x + 2y + z = 8 \Rightarrow x = 8 - 2(-\frac{5}{6}) - \frac{17}{3} = 8 + \frac{5}{3} - \frac{17}{3} = \frac{24}{3} + \frac{5}{3} - \frac{17}{3} = \frac{12}{3} = 4
Solution: x=4x = 4, y=−56y = -\frac{5}{6}, z=173z = \frac{17}{3}.

4.2 Gauss-Jordan Elimination (to RREF)

Instead of stopping at REF and back-substituting, we continue eliminating above each pivot to get RREF:
  1. Perform forward elimination (to REF)
  2. Scale each row so pivots are 11
  3. Eliminate upward: for each pivot, use row operations to create zeros above it
Example 2: Gauss-Jordan (same system)
Start from REF:
>[12180154254001173]>> \left[\begin{array}{ccc|c} 1 & 2 & 1 & 8 \\ 0 & 1 & \frac{5}{4} & \frac{25}{4} \\ 0 & 0 & 1 & \frac{17}{3} \end{array}\right] >
Step 1: Eliminate above pivot in column 3:
>R2→R2−54R3,R1→R1−R3>> R_2 \to R_2 - \frac{5}{4}R_3,\quad R_1 \to R_1 - R_3 >
>[12073010−56001173]>> \left[\begin{array}{ccc|c} 1 & 2 & 0 & \frac{7}{3} \\ 0 & 1 & 0 & -\frac{5}{6} \\ 0 & 0 & 1 & \frac{17}{3} \end{array}\right] >
Step 2: Eliminate above pivot in column 2:
>R1→R1−2R2>> R_1 \to R_1 - 2R_2 >
>[1004010−56001173]>> \left[\begin{array}{ccc|c} 1 & 0 & 0 & 4 \\ 0 & 1 & 0 & -\frac{5}{6} \\ 0 & 0 & 1 & \frac{17}{3} \end{array}\right] >
Solution is now read directly from the RREF: x=4,y=−56,z=173x=4, y=-\frac{5}{6}, z=\frac{17}{3}.

5. Three Cases for Solution Sets

A linear system can have:
CaseConditionRREF PatternExample in R2\mathbb{R}^2
Unique solutionrank = number of variablesEvery column (except last) has a pivotTwo intersecting lines
No solutionA row like $[0;0;\dots;0;;c] withwith c \neq 0$Inconsistent row
Infinitely many solutionsrank < number of variablesAt least one column without a pivot (free variable)Two coincident lines
Rank = number of non-zero rows (pivots) in RREF.

5.1 Case 1: Unique Solution (already seen in Example 1)

5.2 Case 2: No Solution (Inconsistent)

Example 3: Inconsistent system
>{x+y=22x+2y=5>> \begin{cases} x + y = 2 \\ 2x + 2y = 5 \end{cases} >
Augmented matrix and row reduction:
>[112225]→R2→R2−2R1[112001]>> \left[\begin{array}{cc|c} 1 & 1 & 2 \\ 2 & 2 & 5 \end{array}\right] \xrightarrow{R_2 \to R_2 - 2R_1} \left[\begin{array}{cc|c} 1 & 1 & 2 \\ 0 & 0 & 1 \end{array}\right] >
Row 2 says 0x+0y=10x + 0y = 1, which is impossible. No solution.

5.3 Case 3: Infinitely Many Solutions

Example 4: Infinitely many solutions
>{x+2y−z=12x+4y−2z=2>> \begin{cases} x + 2y - z = 1 \\ 2x + 4y - 2z = 2 \end{cases} >
Augmented matrix:
>[12−1124−22]→R2→R2−2R1[12−110000]>> \left[\begin{array}{ccc|c} 1 & 2 & -1 & 1 \\ 2 & 4 & -2 & 2 \end{array}\right] \xrightarrow{R_2 \to R_2 - 2R_1} \left[\begin{array}{ccc|c} 1 & 2 & -1 & 1 \\ 0 & 0 & 0 & 0 \end{array}\right] >
RREF:
>[12−110000]>> \begin{bmatrix} 1 & 2 & -1 & 1 \\ 0 & 0 & 0 & 0 \end{bmatrix} >
Columns 1 and 3 have pivots? Actually column 2 has no pivot (free variable). Column 1 has pivot. Column 3 has no pivot.
Wait — let me re-check. We have pivots in column 1 only. So columns 2 and 3 are free.
Solution: x=1−2y+zx = 1 - 2y + z, where y,zy, z are free variables (can be any real number).
In parametric vector form:
>[xyz]=[100]+y[−210]+z[101]>> \begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix} + y\begin{bmatrix} -2 \\ 1 \\ 0 \end{bmatrix} + z\begin{bmatrix} 1 \\ 0 \\ 1 \end{bmatrix} >

6. Rank of a Matrix

Definition (Rank). The rank of a matrix AA is the number of non-zero rows in its RREF (equivalently, the number of pivots).
rank(A)=number of pivots\text{rank}(A) = \text{number of pivots}
Properties:
  • rank(A)≤min⁡(m,n)\text{rank}(A) \leq \min(m, n) for Am×nA_{m \times n}
  • rank(A)=rank(AT)\text{rank}(A) = \text{rank}(A^T)
  • rank(A)=dim⁡(column space of A)\text{rank}(A) = \dim(\text{column space of } A)
  • rank(AB)≤min⁡(rank(A),rank(B))\text{rank}(AB) \leq \min(\text{rank}(A), \text{rank}(B))
Example 5: Finding rank
>A=[123246369]→R2−2R1,  R3−3R1[123000000]>> A = \begin{bmatrix} 1 & 2 & 3 \\ 2 & 4 & 6 \\ 3 & 6 & 9 \end{bmatrix} \xrightarrow{R_2 - 2R_1,\; R_3 - 3R_1} \begin{bmatrix} 1 & 2 & 3 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{bmatrix} >
Rank = 1 (only one pivot).

7. Homogeneous Systems (Ax=0A\mathbf{x} = \mathbf{0})

Definition (Homogeneous). A system Ax=0A\mathbf{x} = \mathbf{0} (all right-hand sides are zero) is homogeneous. Key facts:
  • Always has at least the trivial solution x=0\mathbf{x} = \mathbf{0}
  • Has non-trivial solutions iff there is at least one free variable (i.e., rank < number of columns)
  • The solution set is a vector space (the null space of AA)
Example 6: Homogeneous system
>{x+2y−z=02x+4y+z=0>> \begin{cases} x + 2y - z = 0 \\ 2x + 4y + z = 0 \end{cases} >
>[12−1241]→R2−2R1[12−1003]→13R2[12−1001]>> \begin{bmatrix} 1 & 2 & -1 \\ 2 & 4 & 1 \end{bmatrix} \xrightarrow{R_2 - 2R_1} \begin{bmatrix} 1 & 2 & -1 \\ 0 & 0 & 3 \end{bmatrix} \xrightarrow{\frac{1}{3}R_2} \begin{bmatrix} 1 & 2 & -1 \\ 0 & 0 & 1 \end{bmatrix} >
>→R1+R2[120001]>> \xrightarrow{R_1 + R_2} \begin{bmatrix} 1 & 2 & 0 \\ 0 & 0 & 1 \end{bmatrix} >
Pivots in columns 1 and 3. Column 2 is free.
x=−2yx = -2y, z=0z = 0, yy free.
Solution:
>[xyz]=y[−210]>> \begin{bmatrix} x \\ y \\ z \end{bmatrix} = y \begin{bmatrix} -2 \\ 1 \\ 0 \end{bmatrix} >
.

8. Algorithm Summary

(Diagram)

9. Edge Cases & Gotchas

SituationWhat Happens
Pivot is zeroNeed to swap with a row below; if none, move to next column
All-zero row in coefficient matrixEither redundant (consistent) or impossible (inconsistent depending on RHS)
Free variablesIndicate infinitely many solutions; parameterise them
**Rectangular matrix m<nm < n **Always have free variables (more unknowns than equations)
Numerical precisionFloating-point arithmetic can create near-zero pivots; use partial pivoting

10. Common Pitfalls

❌ Pitfall 1: Arithmetic errors in elimination

Track every operation carefully. Use fractions or rational arithmetic. Double-check that Ri→Ri+cRjR_i \to R_i + cR_j (adding cc times row jj to row ii) leaves row jj unchanged.

❌ Pitfall 2: Forgetting to apply operations to the RHS

When working with the augmented matrix, every row operation affects both the coefficient matrix and the right-hand side.

❌ Pitfall 3: Misidentifying free variables after Gauss-Jordan

In RREF, a column without a pivot (except the last column) corresponds to a free variable. The pivot columns are basic variables.

❌ Pitfall 4: Thinking REF requires pivots to be 1

REF does not require leading entries to be 1 (RREF does). Many textbooks normalise to 1 during forward elimination for convenience.

11. Formula Summary Table

ConceptDescription
REFEach pivot right of previous pivot; zeros below pivots
RREFREF + pivots are 1 + zeros above and below
Elementary row opsSwap, scale ( c≠0c \neq 0 ), add multiple of another row
RankNumber of pivots (non-zero rows in RREF)
Free variablesColumns without pivots (≠ last column)
Homogeneous systemAx=0A\mathbf{x} = \mathbf{0} ; always at least trivial solution
Inconsistent systemRow of $[0;\dots;0;

12. 📝 Practice Questions

Q1: Simple elimination (unique solution)
Solve using Gaussian elimination:
>{x+y=32x−y=0>> \begin{cases} x + y = 3 \\ 2x - y = 0 \end{cases} >
Strategy: Augmented matrix → REF → back substitute.
Solution:
>[1132−10]→R2−2R1[1130−3−6]>> \left[\begin{array}{cc|c} 1 & 1 & 3 \\ 2 & -1 & 0 \end{array}\right] \xrightarrow{R_2 - 2R_1} \left[\begin{array}{cc|c} 1 & 1 & 3 \\ 0 & -3 & -6 \end{array}\right] >
From R2R_2: −3y=−6⇒y=2-3y = -6 \Rightarrow y = 2. From R1R_1: x+2=3⇒x=1x + 2 = 3 \Rightarrow x = 1.
Solution: x=1x = 1, y=2y = 2. Q2: Inconsistent system
Solve:
>{x+2y=52x+4y=9>> \begin{cases} x + 2y = 5 \\ 2x + 4y = 9 \end{cases} >
Strategy: Check for inconsistency.
Solution:
>[125249]→R2−2R1[12500−1]>> \left[\begin{array}{cc|c} 1 & 2 & 5 \\ 2 & 4 & 9 \end{array}\right] \xrightarrow{R_2 - 2R_1} \left[\begin{array}{cc|c} 1 & 2 & 5 \\ 0 & 0 & -1 \end{array}\right] >
Row 2: 0x+0y=−10x + 0y = -1 — impossible. No solution. Q3: Infinitely many solutions
Solve:
>{x+y−2z=12x+2y−4z=2>> \begin{cases} x + y - 2z = 1 \\ 2x + 2y - 4z = 2 \end{cases} >
Solution:
>[11−2122−42]→R2−2R1[11−210000]>> \left[\begin{array}{ccc|c} 1 & 1 & -2 & 1 \\ 2 & 2 & -4 & 2 \end{array}\right] \xrightarrow{R_2 - 2R_1} \left[\begin{array}{ccc|c} 1 & 1 & -2 & 1 \\ 0 & 0 & 0 & 0 \end{array}\right] >
Pivot in column 1 (basic variable xx). y,zy, z are free.
x=1−y+2zx = 1 - y + 2z, y,z∈Ry, z \in \mathbb{R}.
Parametric form:
>[xyz]=[100]+y[−110]+z[201]>> \begin{bmatrix} x\\y\\z \end{bmatrix} = \begin{bmatrix} 1\\0\\0 \end{bmatrix} + y\begin{bmatrix} -1\\1\\0 \end{bmatrix} + z\begin{bmatrix} 2\\0\\1 \end{bmatrix} >
. Q4: Gauss-Jordan elimination
Solve using Gauss-Jordan:
>{x+2y+z=02x−y+z=3x−y+z=1>> \begin{cases} x + 2y + z = 0 \\ 2x - y + z = 3 \\ x - y + z = 1 \end{cases} >
Solution:
>[12102−1131−111]>> \left[\begin{array}{ccc|c} 1 & 2 & 1 & 0 \\ 2 & -1 & 1 & 3 \\ 1 & -1 & 1 & 1 \end{array}\right] >
R2→R2−2R1R_2 \to R_2 - 2R_1, R3→R3−R1R_3 \to R_3 - R_1:
>[12100−5−130−301]>> \left[\begin{array}{ccc|c} 1 & 2 & 1 & 0 \\ 0 & -5 & -1 & 3 \\ 0 & -3 & 0 & 1 \end{array}\right] >
R2→−15R2R_2 \to -\frac{1}{5}R_2:
>[12100115−350−301]>> \left[\begin{array}{ccc|c} 1 & 2 & 1 & 0 \\ 0 & 1 & \frac{1}{5} & -\frac{3}{5} \\ 0 & -3 & 0 & 1 \end{array}\right] >
R3→R3+3R2R_3 \to R_3 + 3R_2:
>[12100115−350035−45]>> \left[\begin{array}{ccc|c} 1 & 2 & 1 & 0 \\ 0 & 1 & \frac{1}{5} & -\frac{3}{5} \\ 0 & 0 & \frac{3}{5} & -\frac{4}{5} \end{array}\right] >
R3→53R3R_3 \to \frac{5}{3}R_3:
>[12100115−35001−43]>> \left[\begin{array}{ccc|c} 1 & 2 & 1 & 0 \\ 0 & 1 & \frac{1}{5} & -\frac{3}{5} \\ 0 & 0 & 1 & -\frac{4}{3} \end{array}\right] >
Eliminate above: R1→R1−R3R_1 \to R_1 - R_3, R2→R2−15R3R_2 \to R_2 - \frac{1}{5}R_3:
>[12043010−13001−43]>> \left[\begin{array}{ccc|c} 1 & 2 & 0 & \frac{4}{3} \\ 0 & 1 & 0 & -\frac{1}{3} \\ 0 & 0 & 1 & -\frac{4}{3} \end{array}\right] >
R1→R1−2R2R_1 \to R_1 - 2R_2:
>[1002010−13001−43]>> \left[\begin{array}{ccc|c} 1 & 0 & 0 & 2 \\ 0 & 1 & 0 & -\frac{1}{3} \\ 0 & 0 & 1 & -\frac{4}{3} \end{array}\right] >
Solution: x=2x = 2, y=−13y = -\frac{1}{3}, z=−43z = -\frac{4}{3}. Q5: Homogeneous system with free variables
Find all solutions to:
>{x+2y−z=02x+3y+z=03x+5y+0z=0>> \begin{cases} x + 2y - z = 0 \\ 2x + 3y + z = 0 \\ 3x + 5y + 0z = 0 \end{cases} >
Solution:
>[12−1023103500]→R2−2R1,  R3−3R1[12−100−1300−130]>> \left[\begin{array}{ccc|c} 1 & 2 & -1 & 0 \\ 2 & 3 & 1 & 0 \\ 3 & 5 & 0 & 0 \end{array}\right] \xrightarrow{R_2 - 2R_1,\; R_3 - 3R_1} \left[\begin{array}{ccc|c} 1 & 2 & -1 & 0 \\ 0 & -1 & 3 & 0 \\ 0 & -1 & 3 & 0 \end{array}\right] >
R3→R3−R2R_3 \to R_3 - R_2:
>[12−100−1300000]>> \left[\begin{array}{ccc|c} 1 & 2 & -1 & 0 \\ 0 & -1 & 3 & 0 \\ 0 & 0 & 0 & 0 \end{array}\right] >
R2→−R2R_2 \to -R_2, R1→R1−2R2R_1 \to R_1 - 2R_2:
>[105001−300000]>> \left[\begin{array}{ccc|c} 1 & 0 & 5 & 0 \\ 0 & 1 & -3 & 0 \\ 0 & 0 & 0 & 0 \end{array}\right] >
Pivots in columns 1, 2. zz is free. x=−5zx = -5z, y=3zy = 3z.
Solution:
>[xyz]=z[−531]>> \begin{bmatrix} x\\y\\z \end{bmatrix} = z \begin{bmatrix} -5\\3\\1 \end{bmatrix} >
, z∈Rz \in \mathbb{R}. Q6: Rank from RREF
Find the rank of
>A=[123124621103]>> A = \begin{bmatrix} 1 & 2 & 3 & 1 \\ 2 & 4 & 6 & 2 \\ 1 & 1 & 0 & 3 \end{bmatrix} >
.
Solution:
>[123124621103]→R2−2R1,  R3−R1[123100000−1−32]>> \begin{bmatrix} 1 & 2 & 3 & 1 \\ 2 & 4 & 6 & 2 \\ 1 & 1 & 0 & 3 \end{bmatrix} \xrightarrow{R_2 - 2R_1,\; R_3 - R_1} \begin{bmatrix} 1 & 2 & 3 & 1 \\ 0 & 0 & 0 & 0 \\ 0 & -1 & -3 & 2 \end{bmatrix} >
Swap R2↔R3R_2 \leftrightarrow R_3:
>[12310−1−320000]>> \begin{bmatrix} 1 & 2 & 3 & 1 \\ 0 & -1 & -3 & 2 \\ 0 & 0 & 0 & 0 \end{bmatrix} >
Rank = 2 (two pivots). Q7: Parameterising solution set
Solve and parameterise:
>{x1+2x2+x3−x4=12x1+4x2+2x3−2x4=2>> \begin{cases} x_1 + 2x_2 + x_3 - x_4 = 1 \\ 2x_1 + 4x_2 + 2x_3 - 2x_4 = 2 \end{cases} >
Solution:
>[121−11242−22]→R2−2R1[121−1100000]>> \left[\begin{array}{cccc|c} 1 & 2 & 1 & -1 & 1 \\ 2 & 4 & 2 & -2 & 2 \end{array}\right] \xrightarrow{R_2 - 2R_1} \left[\begin{array}{cccc|c} 1 & 2 & 1 & -1 & 1 \\ 0 & 0 & 0 & 0 & 0 \end{array}\right] >
Pivot in column 1. x1x_1 basic; x2,x3,x4x_2, x_3, x_4 free.
x1=1−2x2−x3+x4x_1 = 1 - 2x_2 - x_3 + x_4, x2,x3,x4∈Rx_2, x_3, x_4 \in \mathbb{R}.
Parametric:
>[x1x2x3x4]=[1000]+x2[−2100]+x3[−1010]+x4[1001]>> \begin{bmatrix} x_1\\x_2\\x_3\\x_4 \end{bmatrix} = \begin{bmatrix} 1\\0\\0\\0 \end{bmatrix} + x_2\begin{bmatrix} -2\\1\\0\\0 \end{bmatrix} + x_3\begin{bmatrix} -1\\0\\1\\0 \end{bmatrix} + x_4\begin{bmatrix} 1\\0\\0\\1 \end{bmatrix} >
. Q8: System with parameters
For what value(s) of kk does the system have (a) unique solution, (b) no solution, (c) infinitely many solutions?
>{x+y=12x+ky=3>> \begin{cases} x + y = 1 \\ 2x + ky = 3 \end{cases} >
Solution:
>[1112k3]→R2−2R1[1110k−21]>> \left[\begin{array}{cc|c} 1 & 1 & 1 \\ 2 & k & 3 \end{array}\right] \xrightarrow{R_2 - 2R_1} \left[\begin{array}{cc|c} 1 & 1 & 1 \\ 0 & k-2 & 1 \end{array}\right] >
  • If k≠2k \neq 2, unique solution (y=1k−2y = \frac{1}{k-2}, x=1−1k−2x = 1 - \frac{1}{k-2}).
  • If k=2k = 2, row 2 says 0x+0y=10x + 0y = 1 — no solution.
  • Infinitely many solutions are impossible here (2 equations, 2 unknowns, RHS not all zero). Q9: Rank of transpose
If AA is 3×43 \times 4 with rank 2, what is the rank of ATA^T?
Solution: rank(AT)=rank(A)=2\text{rank}(A^T) = \text{rank}(A) = 2. Q10: Application — network flow
A network has nodes A, B, C with flow equations:
>{x1+x2=10x2−x3=5x1+x3=15>> \begin{cases} x_1 + x_2 = 10 \\ x_2 - x_3 = 5 \\ x_1 + x_3 = 15 \end{cases} >
Does a unique flow exist?
Solution:
>[1101001−1510115]→R3−R1[1101001−150−115]>> \left[\begin{array}{ccc|c} 1 & 1 & 0 & 10 \\ 0 & 1 & -1 & 5 \\ 1 & 0 & 1 & 15 \end{array}\right] \xrightarrow{R_3 - R_1} \left[\begin{array}{ccc|c} 1 & 1 & 0 & 10 \\ 0 & 1 & -1 & 5 \\ 0 & -1 & 1 & 5 \end{array}\right] >
>R3→R3+R2:[1101001−1500010]>> R_3 \to R_3 + R_2: \left[\begin{array}{ccc|c} 1 & 1 & 0 & 10 \\ 0 & 1 & -1 & 5 \\ 0 & 0 & 0 & 10 \end{array}\right] >
Row 3 says 0=100 = 10 — impossible. No solution exists (the equations are inconsistent).
Wait — let me recheck. The sum of equations 1 and 2 minus equation 3: (x1+x2)+(x2−x3)−(x1+x3)=10+5−15⇒2x2−2x3=0⇒x2=x3(x_1+x_2)+(x_2-x_3)-(x_1+x_3) = 10+5-15 \Rightarrow 2x_2-2x_3 = 0 \Rightarrow x_2 = x_3. Then eq 2: x2−x3=0≠5x_2-x_3 = 0 \neq 5. Indeed inconsistent.

🔗 Cross-References

  • Next topic: Cramer's Rule — solving systems using determinants
  • Week 3 (Vector Spaces): The solution set of Ax=0A\mathbf{x} = \mathbf{0} is a vector space
  • Week 4 (Basis & Dimension): Gaussian elimination finds bases for vector spaces
  • Week 5 (Rank-Nullity): Rank from elimination feeds into the rank-nullity theorem
  • BSCS2004 (ML Foundations): Solving normal equations in linear regression uses Gaussian elimination Join Discord Previous1.3 DeterminantsNext2.2 Cramer's Rule & Inverses
Document outline

Keep your place and jump directly to a heading.

Table of contents

No note selected

Open a chapter to see its outline, backlinks, and sources here.