Linear AlgebraLeast-Squares Solutions

Solve Overdetermined System Ax = b via Normal Equations A^T A x-hat = A^T b

Homework Question

Find the least-squares solution x^\hat{\mathbf{x}} to Ax=bA\mathbf{x} = \mathbf{b} where A=(101112)A = \begin{pmatrix} 1 & 0 \\ 1 & 1 \\ 1 & 2 \end{pmatrix} and b=(125)\mathbf{b} = \begin{pmatrix} 1 \\ 2 \\ 5 \end{pmatrix}.

Verified Final Answer
x^=(2/32)\hat{\mathbf{x}} = \begin{pmatrix} 2/3 \\ 2 \end{pmatrix}

Key Formula & Principle

ATAx^=ATbA^T A \hat{\mathbf{x}} = A^T \mathbf{b}

Step-by-Step Solution

  1. 1
    Compute ATA=(111012)(101112)=(3335)A^T A = \begin{pmatrix} 1 & 1 & 1 \\ 0 & 1 & 2 \end{pmatrix}\begin{pmatrix} 1 & 0 \\ 1 & 1 \\ 1 & 2 \end{pmatrix} = \begin{pmatrix} 3 & 3 \\ 3 & 5 \end{pmatrix}.
  2. 2
    Compute ATb=(111012)(125)=(812)A^T \mathbf{b} = \begin{pmatrix} 1 & 1 & 1 \\ 0 & 1 & 2 \end{pmatrix}\begin{pmatrix} 1 \\ 2 \\ 5 \end{pmatrix} = \begin{pmatrix} 8 \\ 12 \end{pmatrix}.
  3. 3
    Solve the normal system 3x^1+3x^2=83\hat{x}_1 + 3\hat{x}_2 = 8 and 3x^1+5x^2=123\hat{x}_1 + 5\hat{x}_2 = 12.
  4. 4
    Subtract Equation 1 from Equation 2: 2x^2=4  ⟹  x^2=22\hat{x}_2 = 4 \implies \hat{x}_2 = 2, then 3x^1=2  ⟹  x^1=233\hat{x}_1 = 2 \implies \hat{x}_1 = \frac{2}{3}.
Interactive Homework Customizer

Have this WebAssign / Canvas problem with different numbers?

Replace the numbers or functions below to match your exact assignment version, then generate a custom step-by-step derivation.

View all Linear Algebra →