# Best Approximation

Please find the least squares solution of linear system Ax=b, and find the orthogonal projection of b onto the column space of A.

I) Matrix 3*2 A=[1 1;-1 1;-1 2] , b=[7;0;7]

II) A=[2 0 -1;1 -2 2;2 -1 0;0 1 -1] , b=[0;6;0;6]

Answers: I) x1=5, x2=1/2, [11/2;-9/2;-4] II) x1=14, x2=30, x3=26; [2;6;-2;4]

Find the orthogonal projection of u onto the subspace of R^4 spanned by the vectors v1 and v2 and v3.

u=(-2,0,2,4) v1=(1,1,3,0) v2=(-2,-1,-2,1) v3=(-3,-1,1,3)

Answer: (-12/5,-4/5,12/5,16/5)

*(You may use matlab, please show comments, commands and outputs or it could be done by hand)

Â© BrainMass Inc. brainmass.com March 4, 2021, 9:57 pm ad1c9bdddfhttps://brainmass.com/math/basic-algebra/inner-product-spaces-best-approximation-least-squares-286289

#### Solution Preview

see attachment

Problem:

Find the least squares solution of linear system Ax=b, and find the orthogonal projection of b onto the column space of A.

I) Matrix 3*2 A=[1 1;-1 1;-1 2] , b=[7;0;7]

II) A=[2 0 -1;1 -2 2;2 -1 0;0 1 -1] , b=[0;6;0;6]

Answers: I) x1=5, x2=1/2, [11/2;-9/2;-4] II) x1=14, x2=30, x3=26; [2;6;-2;4]

III) Find the orthogonal projection of u onto the subspace of R^4 spanned by the vectors v1 and v2 and v3.

u=(-2,0,2,4) v1=(1,1,3,0) v2=(-2,-1,-2,1) v3=(-3,-1,1,3)

Answer: (-12/5,-4/5,12/5,16/5)

Solution:

I) We have to solve the overdetermined algebraic system:

( 1)

First thing that we have to check is whether the vector [B] belongs or not to the column space of matrix [A] or, in other words, to compare the rank of the extended matrix to the rank of the main matrix:

ïƒ

where extended matrix.

Since , one concludes that the system (1) is not consistent

(Kronecker-Capelli ...

#### Solution Summary

Best Approximation is emphasized for inner products spaces, best approximation and least squares.