# Least Squares problem with non-invertible matrix

### Least Squares problem with non-invertible matrix

This problem projects $b = (b_1,b_2....,b_m)$ onto the line through $a = (1, 1, 1, ....1)$. We solve m equations ax = b in 1 unknown (by least squares).

(a) Solve $a^T~a~\hat{x} = a^T~b$ to show that $\hat{x}$is the mean (the average) of the b’s.
(b) Find $e = b - a \hat{x}$ and the variance $||e||^2$ and the standard deviation $||e||$.
(c) The horizontal line $\hat{b} = 3$ is closest to b = (1, 2, 6). Check that p = (3, 3 3) is perpendicular to e and find the 3 by 3 projection matrix P.

Ans(a): Becauase a = (1,1,1,....1), therefore $a^T a = 1 + 1 + 1 +....+ 1 = 1~*~m = m$
And $a^T b = b_1 + b_2 + .... + b_m$
So $\hat{x} = \frac{b_1 + b_2 + b_3 + .... + b_m}{m} = b_{avg}$

Ans(b): Need help..

Ans(c): Need help..
zollen

Posts: 2
Joined: Wed Jan 17, 2018 3:24 pm
Reputation: 0