Linear Systems
Direct and iterative methods for solving systems of linear equations Ax = b
Interactive Visualizer
System: 4x₁ - x₂ + x₃ = 7, 4x₁ - 8x₂ + x₃ = -21, -2x₁ + x₂ + 5x₃ = 15
Solution: x = [2, 4, 3]
Practice Problem
Solve the system using Gaussian elimination:
Matrix & Vector Norms
A vector norm is a function that assigns a non-negative length or size to a vector. For a vector , the three most common norms are:
1-norm (Manhattan / Taxicab)
Sum of absolute values of all components.
2-norm (Euclidean)
The familiar straight-line distance from the origin.
∞-norm (Maximum / Chebyshev)
The largest absolute value among all components.
Norm Properties (for any valid norm )
- Non-negativity: , and
- Homogeneity: for any scalar
- Triangle inequality:
Matrix norms extend the concept of vector norms to matrices. The most common induced norms are derived from vector norms via
1-norm (Maximum Column Sum)
Take the absolute column sums; the largest one is the 1-norm.
∞-norm (Maximum Row Sum)
Take the absolute row sums; the largest one is the ∞-norm.
Frobenius Norm
The Frobenius norm is the square root of the sum of all squared entries. It is not an induced norm but satisfies all norm axioms and is submultiplicative.
Interactive Vector Norm Calculator
Enter vector components to compute all three norms in real time.
1-norm
2-norm
∞-norm
Interactive Matrix Norm Calculator
Enter a 2×2 matrix to compute all three matrix norms.
1-norm (max col sum)
∞-norm (max row sum)
Frobenius norm
Error in Linear Systems
Given the linear system , let be an approximate solution. We can quantify and correct the error using the residual vector.
Residual
The residual measures how far is from . A small residual suggests a good approximation, but a small residual does not always imply a small error — the condition number of matters.
Error
The true error satisfies because .
Norm Bound
This gives an upper bound on the error in terms of the residual and the norm of . When is ill-conditioned, is large, so even a small residual can correspond to a large error.
Iterative Refinement
Once we have the residual, we can solve for the error correction and improve our solution:
Solving for the correction and adding it to yields a refined approximate solution. This process can be repeated.
Worked Example
System
True solution: . Gauss-Seidel approximate solution after several iterations:
Step 1: Compute
Step 2: Solve
Step 3: Correct
Result: — the true solution. ■
Interactive Residual Calculator
Enter a 3×3 matrix , vector , and approximate solution . The residual is computed live.
Matrix A
Vector b
Approximate
Results
| Component | |||
|---|---|---|---|
| r1 | 11.000000 | 11.000629 | -6.2900e-4 |
| r2 | 5.000000 | 5.000340 | -3.4000e-4 |
| r3 | -1.000000 | -1.000000 | 0.0000e+0 |
Moderate residual. Iterative refinement may improve accuracy.