Linear System of Equations
where is a matrix, is a column vector, and is a column vector.
If is a square matrix, we have exactly as many knowns as unknowns, and if is invertible , we can solve for to get the unique solution .Written out explicitly:
The are called variables or unknowns, the are coefficients ( is the coefficient matrix), and is the right-hand side. A system with no solution is called inconsistent.
Set of solutions
Homogenous system of equations
A linear system of equations with and is called homogenous if the right-hand side is the zero vector :
To a given linear system of equations , we call the associated homogenous system of equations.
Every homogenous system of equations has at least one solution, the trivial solution , i.e. .
How to find all solutions to
Goal: Find the general solution: The set of all vectors satisfying .
We can decompose problem into two simpler parts:
1] Find one particular solution , i.e. satisfying
2] Find the null spaceThe general solution is , i.e. every solution has the form where .
If the null space is trivial, , then , i.e. the solution is unique.
If the the null space is non-trivial, , then there are infinitely many solutions.
The above holds if at least one solution exists; if no solution exists, then .
Why does this work?
Adding a null space vector to gives another solution:
Every solution is captured:
If also solves , then , so , meaning
Solve
Particular solution:
Null space: (solutions to )
General solution: for any
When does have a solution?
Bring the augmented matrix into row echelon form (gaussian elimination).
No solution iff there’s a zero row in with non-zero entry in :
This row says , a contradiction.
Otherwise, the system is solvable. Back-substitute from bottom to top: each pivot variable is determined by the variables to its right (which are either already solved or free).
Existence and uniqueness of solutions
For with , the rank of :
Existence (is there at least one solution?):
If (full row rank), every row has a pivot, so a solution exists for every .
If , some rows become zero rows after elimination; solution exists only if the corresponding .Uniqueness (is there at most one solution?):
If (full column rank), every column has a pivot, so no free variables, so at most one solution.
If , there are free variables, giving infinitely many solutions (if any exist).
In other words: (trivial null space).
Overdetermined (, tall skinny ): more equations/constraints than unknowns.
At best rank , so if a solution exists it’s unique.
But the rank is , so most have no exact solution, i.e. .
We can approximate with Least squares, finding that minimize .Underdetermined (, short fat ): more unknowns than equations.
At best rank , so a solution exists for every .
But rank , so always infinitely many solutions.
Minimum norm finds the with smallest among solutions.For square matrices: is invertible unique solution for every .
Link to originalPivot columns vs free columns
When solving Ax = b:
Pivot columns correspond to basic variables, determined by back-substitution (solving from the bottom row upward, each pivot variable in terms of the ones already solved).
Non-pivot columns correspond to free variables (can be set to any value).In the REF example above, columns 1, 2, 4 have pivots, column 3 doesn’t. So is free — the solution is parameterized by it.
Number of free variables null space.
… constraints
… degrees of freedom (free variables)
Three equivalent forms / notations for solution sets
After back-substitution, each pivot variable is expressed in terms of free variables. Three ways to write the result:
Implicit: restate the constraints as set membership conditions. Doesn’t “solve” anything, just a different notation for the same set.
Parametric: substitute the free variables with parameters and write out the solution tuple directly. Each element of the tuple is either a parameter or an expression in the parameters.
Vector: write as where is a particular solution and are null space vectors. Shows the structure: particular solution + linear combination of null space directions.
Example: (rank 1, 2 variables, 1 free variable)
… implicit
… parametric
… vectorVerify: pick .
Parametric gives . Check: ✓
Vector gives . Check: ✓The vector is a null space vector (), so adding any multiple of it to a particular solution stays on the solution set.
A solution of only exists if is in the column space of .
– the null space of – is the orthogonal complement to the column space, so if the vector was in , there would be no linear combintation of the columns of that yields , i.e. no solution to the system of equations.
Link to originalEXAMPLE
The vector can be represented as a linear combination of columns of :
There is no that can solve the below system of equations, as the column space of does not contain :
If , then there are infinitely many solutions ().