Systems of Linear Equations | Mathematics
4.1 Gaussian Elimination
Section titled “4.1 Gaussian Elimination”A system of linear equations in unknowns can be written as Where , And .
Gaussian elimination transforms the augmented matrix into row echelon Form (REF) using elementary row operations:
- Swap two rows ().
- Multiply a row by a non-zero scalar ().
- Add a multiple of one row to another ().
A matrix is in REF if:
- All zero rows are at the bottom.
- The leading entry (pivot) of each non-zero row is strictly to the right of the pivot above.
- All entries below a pivot are zero.
Reduced row echelon form (RREF) additionally requires:
- Each pivot is 1.
- Each pivot is the only non-zero entry in its column.
Theorem 4.1. Every matrix has a unique RREF. Two matrices are row-equivalent if and only if they Have the same RREF.
4.2 Existence and Uniqueness
Section titled “4.2 Existence and Uniqueness”Theorem 4.2 (Rouché—Capelli). The system is consistent (has at least one Solution) if and only if
If consistent, the solution set has free parameters, where .
Proof. Let the RREF of have pivots in the coefficient Columns. The system is inconsistent if and only if the last non-zero row is Which occurs precisely when the augmented column contains a pivot, i.e., when .
If consistent, the pivot variables are determined by the free variables, yielding degrees of freedom.
4.3 LU Decomposition
Section titled “4.3 LU Decomposition”An LU decomposition of writes where is Lower triangular with 1s on the diagonal, and is upper triangular.
Theorem 4.3. If Gaussian elimination can be performed on without row exchanges, then Admits an LU decomposition.
Algorithm. Store the multipliers (used to eliminate entry ) in the lower Triangular portion. The resulting upper triangular matrix is And the multipliers form .
Worked Example. Find the LU decomposition of
Solution
Step 1: Eliminate below . , .
Step 2: Eliminate below . .
Verify: .
To solve First solve (forward substitution), Then (back substitution).
4.4 Gaussian Elimination with Partial Pivoting
Section titled “4.4 Gaussian Elimination with Partial Pivoting”When a pivot is zero (or very small), we swap rows to bring the largest available entry in the Current column into the pivot position. This is partial pivoting, and it improves numerical Stability.
Problem. Solve the system using Gaussian elimination with partial pivoting:
Solution
Augmented matrix:
Step 1. Column 1: largest entry is 3 in row 2. Swap :
, :
Step 2. Column 2: largest entry below pivot is in row 3. Swap :
:
Back substitution. From row 3: So .
From row 2: So Giving .
From row 1: So Giving .
Solution: , , .
4.5 Least Squares Solutions
Section titled “4.5 Least Squares Solutions”When is overdetermined (more equations than unknowns) and inconsistent, We seek that minimises .
Theorem 4.4 (Normal Equations). The least squares solution satisfies
If has full column rank, then is invertible and .
Proof. The error vector is minimised when I.e., when . This gives Or . If has full column rank, then So Meaning is invertible.
Problem. Find the least squares line fitting the data points , , .
Solution
The system is I.e., with , .
Compute .
.
Solve :
.
.
.
The least squares line is .
4.6 Worked Example: System with Infinitely Many Solutions
Section titled “4.6 Worked Example: System with Infinitely Many Solutions”Problem. Solve the system:
Solution
The last row reads So the system is inconsistent (no solution).
Revised problem: Change the last equation to :
Still inconsistent! The RREF reveals in the last row.
Revised again: Change the last equation to :
Now the system is consistent. Pivots in columns 1 and 3; free variables are and . From row 2: . From row 1: .
Solution set: .
In parametric form: .
The solution space is a 2-dimensional affine subspace (a plane) in .
4.7 Common Pitfalls
Section titled “4.7 Common Pitfalls”- Partial pivoting is not optional for numerical work. Without it, Gaussian elimination can produce catastrophically wrong results due to rounding errors.
- The normal equations can be ill-conditioned. For better numerical stability, use QR decomposition to solve least squares problems instead of forming .
- Not every system has a solution. Always check consistency via the Rouche—Capelli theorem before attempting to solve.
- When a system has infinitely many solutions, the solution set is an affine subspace, not a vector space. The general solution is where is a particular solution and is any element of the null space. The null space is a vector space, but the affine shift by means the solution set does not contain (unless ).
- Do not confuse the number of equations with the number of unknowns. A system with more equations than unknowns (overdetermined) may have no solution, exactly one solution, or infinitely many solutions. A system with fewer equations than unknowns (underdetermined) may have no solution or infinitely many solutions, but never exactly one solution.
4.8 Intuition: What Does Gaussian Elimination Do Geometrically?
Section titled “4.8 Intuition: What Does Gaussian Elimination Do Geometrically?”Each elementary row operation corresponds to a geometric operation on the system of equations. In , each equation defines a plane. The solution to the system is the intersection of all these planes.
- Swapping rows reorders the equations, which does not change the solution set.
- Multiplying a row by a scalar rescales an equation without changing its solution set.
- Adding a multiple of one row to another replaces one plane with a new plane that passes through the line of intersection of the two original planes.
Gaussian elimination systematically rotates and translates the planes so that their intersection becomes apparent. After reduction to row echelon form, the last equation involves only one variable, the second-to-last involves at most two variables, and so on. Back substitution then recovers all variables one at a time, starting from the simplest equation.
When the system is inconsistent, the row reduction produces a contradiction (such as ), meaning the planes have no common point of intersection. When there are free variables, the planes intersect in a line, plane, or higher-dimensional flat, reflecting the infinitely many solutions.
4.9 Worked Example: 4x4 System
Section titled “4.9 Worked Example: 4x4 System”Problem. Solve the system:
Solution
Augmented matrix:
, , :
, :
:
The last row gives , so the system is inconsistent (no solution).
Check: The rank of the coefficient matrix is 3 (three pivots), but the rank of the augmented matrix is 4 (four pivots). By the Rouche—Capelli theorem, the system is inconsistent.
Intuition
Section titled “Intuition”Gaussian elimination is the systematic process of untangling a web of simultaneous constraints. Each equation in a linear system defines a hyperplane in some high-dimensional space, and a solution is a point where all hyperplanes intersect. Row reduction is the algebraic equivalent of rotating and sliding these hyperplanes until they reveal their intersection evidently. When you swap rows, you are re-ordering which constraint you address first. When you multiply a row by a scalar, you are rescaling a constraint without changing the solution set. When you add a multiple of one row to another, you are using one equation to eliminate a variable from another — the same logic as solving two equations with two unknowns by substitution.
The deeper insight is that row reduction preserves the solution space while simplifying its description. The row echelon form makes the structure of the solution set transparent: pivot columns identify the dependent variables, free columns identify the independent degrees of freedom, and the rank tells you the dimension of the solution space. This is why the same technique extends to function spaces and operator theory, where infinite-dimensional systems of equations arise logically.
flowchart TD A[4_Systems Of Linear Equations] --> B[Key Concepts] A --> C[Core Principles] A --> D[Practical Applications] B --> E[Fundamental definitions] C --> F[Design patterns] D --> G[Real-world usage]Cross-References
Section titled “Cross-References”- Matrices: The coefficient matrix of a linear system determines its solvability via rank and determinant.
- Linear Transformations: A system can be viewed as finding the preimage of under the linear transformation defined by .
- Singular Value Decomposition: The pseudoinverse derived from the SVD provides the minimum-norm least squares solution to inconsistent systems.