Last modified: October 27, 2023
This article is written in: 🇺🇸
Linear Systems of Equations
A linear system of equations is a collection of one or more linear equations involving the same set of variables. Such systems arise in diverse areas such as engineering, economics, physics, and computer science. The overarching goal is to find values of the variables that simultaneously satisfy all equations.
When working with linear systems, representing the equations in matrix form proves to be highly efficient. This matrix-based representation underpins a variety of numerical methods—such as Gaussian elimination, LU decomposition, and iterative techniques—used for both small and large-scale problems.
Mathematical Formulation
A general linear system with variables can be expressed as:
We can rewrite this collection of equations succinctly as:
where
In this form:
I. (an matrix) contains the coefficients of the variables.
II. (an column vector) represents the unknowns of the system.
III. (an column vector) contains the constant terms from the right-hand side of each equation.
Expressing the system in matrix form allows us to apply well-studied algebraic procedures and computational routines to solve for .
Criteria for a Unique Solution
A system of linear equations in unknowns has a unique solution if and only if any one (and thus all) of the following equivalent conditions holds:
I. Non-zero determinant: .
A non-zero determinant indicates that the matrix is invertible.
II. Invertibility of : There exists an inverse matrix such that
III. Linear independence of columns: The columns of are linearly independent vectors in . In practical terms, no column can be written as a linear combination of the other columns.
IV. Linear independence of rows: Similarly, the rows of are also linearly independent. No row can be expressed as a linear combination of the other rows.
If any of these criteria fail (e.g., ), the system does not have a unique solution: it may either have no solution (inconsistent system) or infinitely many solutions (underdetermined system).
Example
Consider the following system of three linear equations in three unknowns :
We can represent it in matrix form as:
To solve this system, one may use:
- Transform into an upper-triangular (or row-echelon) form via elementary row operations, then perform back-substitution to determine .
- Factor into a product of a lower-triangular matrix and an upper-triangular matrix . Then solve two simpler triangular systems.
- Compute and multiply both sides of by .
Each approach exploits the structure of linear systems to systematically isolate the solution for .
Advantages
- Matrix methods, such as Gaussian elimination, provide a systematic framework for solving linear systems, making both theoretical understanding and practical implementation more straightforward.
- Representing a system of equations as creates a compact representation that reduces complexity, especially for systems involving many equations and variables.
- Computational efficiency benefits from scalability, as many matrix-based algorithms have predictable complexities, and optimized libraries like BLAS and LAPACK are designed to utilize modern hardware capabilities.
- Properties of the system can be analyzed using matrix insights, such as the determinant to assess solution existence or uniqueness, or matrix decompositions (e.g., LU, QR, SVD) to reveal structure and enhance solving methods.
Limitations
- When the matrix is singular or nearly singular, solutions may not exist, may be infinite, or may be numerically unstable due to amplified computational errors.
- Solving large systems can be computationally expensive since direct methods like Gaussian elimination scale with , and dense matrices increase memory requirements significantly.
- Numerical instability can arise from ill-conditioned matrices where small changes in or lead to large deviations in the solution, requiring techniques like pivoting or iterative refinement to mitigate errors.
- Sparse systems can be inefficiently handled if treated as dense, leading to unnecessary computational and memory overhead unless specialized sparse techniques are employed.