A system of linear equation is a bunch of equations where the left hand side is a linear function and the right hand side is a constant.
A linear system can be written in the format
where we need to solve
Visualization
For any linear system, there are some good mental models to visualize:
Solution
Not all linear systems can be solved. A system of linear equations has either
- no solution, or,
- exactly one solution
- an infinite number of solutions
Whether the system of linear equations have a solution depends on the numbers of equations versus the number of unknowns. For a system of linear equation
(more equations than unknowns), we expect no solution (less equations than unknowns), we expect many solutions , one solution if is invertible
Solvers
There are two types of linear solvers: direct and iterative.
A direct solvers find the exact solution in a finite number of steps, without relying on iterative approximation. Gaussian elimination, LU factorization, and Cramer’s rule are all considered direct methods. 1 2