Topic 4 Orthogonality and Least-Squares
The final section of the study document, focusing on Topic 4: Orthogonality and Least-Squares.
This topic covers the geometric aspects of linear algebra: dot products, orthogonal complements, the Gram-Schmidt process for creating orthogonal/orthonormal bases, matrix factorizations like QR, and using the Normal Equations to find Least-Squares solutions to inconsistent systems.
Question 1: Finding a Basis for an Orthogonal Complement ( )
Source: Exam 2, Question 11
Exact Question: Let
Methodology:
- Definition: The orthogonal complement
is the set of all vectors that are orthogonal to every vector in . - Logic: If a vector
is orthogonal to the spanning vectors of , its dot product with each of them is zero. This is equivalent to saying is in the null space of a matrix where the rows of are the spanning vectors of (because computes exactly these dot products). - Process: Put the spanning vectors as rows in a matrix
. Row reduce to find the parametric vector form of . The basis vectors of the null space form the basis for .
Solution:
- Step 1: Construct the matrix.
- Step 2: Row reduce to solve
. . - Step 3: Scale row 2 by
, then . - Step 4: Extract the solution. The pivots are
and . Free variables are and .
Final Answer:
Question 2: The Gram-Schmidt Process (Orthonormal Basis)
Source: Practice Exam 4, Question 10
Exact Question: Find an orthonormal basis of the column space of the matrix
Methodology:
- Objective: Convert a set of arbitrary vectors (the columns of
) into a set of mutually orthogonal vectors of length 1 that span the same space. - Gram-Schmidt Formulas: Let the original columns be
and the new orthogonal vectors be - (Note: If any
evaluates to the zero vector , it means the original column was a linear combination of previous columns. Discard the zero vector and move to the next column).
- Normalization: After finding the orthogonal basis
, divide each vector by its magnitude to make it orthonormal.
Solution:
- Step 1:
. - Step 2: Find
.
. - Step 3: Find
.
. .
. .
.
Because we get the zero vector, we discard. - Step 4: Find
(using ).
Following the same math,also results in the zero vector (discard it). The orthogonal basis is just . - Step 5: Normalize the vectors.
. .
. .
Final Answer:
Question 3: QR Decomposition
Source: Practice Exam 3, Question 7
Exact Question: Let
Methodology:
- Objective: Factor matrix
into , where has orthonormal columns (meaning ) and is an upper triangular invertible matrix. - Process:
- Apply the Gram-Schmidt process to the columns of
to get an orthogonal basis . - Normalize these vectors to get an orthonormal basis
. These form the columns of . - Compute
using the formula .
- Apply the Gram-Schmidt process to the columns of
Solution:
- Step 1: Gram-Schmidt.
.
. - Step 2: Normalize to create
.
. .
. . - Step 3: Compute
. (Note that is upper triangular as expected!)
Final Answer:
Question 4: Orthogonal Decomposition
Source: Practice Exam 4, Question 11
Exact Question: Let
Methodology:
- Objective: Find
, which is the component of orthogonal to . By definition, , where is the projection of onto . - Crucial Check: The projection formula
only works if the basis vectors are orthogonal. Check . They are not orthogonal! - Process:
- First, apply Gram-Schmidt to
to find an orthogonal basis for . - Compute
using the projection formula with the new orthogonal basis. - Compute
.
- First, apply Gram-Schmidt to
Solution:
- Step 1: Gram-Schmidt on the basis.
.
. - Step 2: Compute
directly (you can do ).
.
.
. - Step 3: Subtract.
.
Final Answer:
Question 5: Least-Squares Curve Fitting & Normal Equations
Source: Exam 2, Question 6
Exact Question: Consider the points
Methodology:
- Objective: Find the coefficients
that best satisfy an inconsistent system of linear equations derived from data points. - Setup the Design Matrix (
) and Observation Vector ( ): - For the equation
, plug each data point in to get a row. - Write this as a matrix equation
, where . The first column of is all 1s (coefficients of ), the second column is the -values (coefficients of ). holds the -values.
- For the equation
- Normal Equations: To find the least squares solution
, you must solve the consistent system: .
Solution:
- Step 1: Define matrices.
- Step 2: Compute
. - Step 3: Compute
. - Step 4: Solve the Normal Equations
. - You can row reduce the augmented matrix or use the inverse formula. Using the inverse:
. .
- Step 5: Write the final equation.
Final Answer:
Additional Note: Generating Design Matrices for Complex Curves
Source: Practice Exam 3, Question 5
(Quick Methodology highlight)
If asked to fit a more complex curve like
- Col 1: Evaluations of "
" for each data point. - Col 2: Evaluations of "
" for each data point.
You do not include a column of 1s unless the equation contains a standalone constant term (likein ). The -values always go into the observation vector , never into .