Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Linear Systems

Consider a system of nn equations in nn unknowns:

a11x1+a12x2++a1nxn=b1a21x1+a22x2++a2nxn=b2an1x1+an2x2++annxn=bn\begin{aligned} a_{11}x_1 + a_{12}x_2 + \cdots + a_{1n}x_n &= b_1 \\ a_{21}x_1 + a_{22}x_2 + \cdots + a_{2n}x_n &= b_2 \\ &\vdots \\ a_{n1}x_1 + a_{n2}x_2 + \cdots + a_{nn}x_n &= b_n \end{aligned}

In matrix form: Ax=bA\mathbf{x} = \mathbf{b} where ARn×nA \in \mathbb{R}^{n \times n}, and x,bRn\mathbf{x}, \mathbf{b} \in \mathbb{R}^n.

The Fundamental Theorem of Linear Algebra

Matrix Factorizations: The Key to Solving Linear Systems

The naive approach to solving Ax=bA\mathbf{x} = \mathbf{b} is to compute A1A^{-1} and then x=A1b\mathbf{x} = A^{-1}\mathbf{b}. This is a bad idea:

Instead, we factorize the matrix: write AA as a product of simpler matrices that are easy to invert or solve with.

Why Factorizations?

  1. Solve efficiently: Triangular systems are cheap (O(n2)O(n^2))

  2. Reuse work: Once factored, solve for multiple right-hand sides cheaply

  3. Reveal structure: Factorizations expose rank, conditioning, eigenvalues

The Big Three Factorizations

FactorizationFormBest For
LUA=PLUA = PLUSquare systems, multiple RHS
QRA=QRA = QRLeast squares, stability
SVDA=UΣVTA = U\Sigma V^TRank-deficient problems, analysis

This chapter focuses on QR, which handles rectangular matrices and least squares problems where LU doesn’t apply.

Learning Outcomes

After completing this chapter, you should be able to: