Here's the question you clicked on:

## KonradZuse Group Title Given the linear system Ax = b with (a) Find all least squares solutions of the linear system Ax = b. (b) What is the normal system for this least squares problem? (c) Compute the least squares error to three decimal places. one year ago one year ago

• This Question is Closed
1. KonradZuse Group Title

$A =\left[\begin{matrix}1 & 3 \\ 3 & 9\\ -2 & -6\end{matrix}\right]$ $B = \left(\begin{matrix}1 \\ 1\\ 0\end{matrix}\right)$

2. KonradZuse Group Title

@UnkleRhaukus @Zarkon

3. KonradZuse Group Title

Since my work was deleted I will explain that I got up to the end where I need to solve, I am confused exactly how to solve the matrix [x1x2] col matrix = [4...12] which was my col matrix answer... Flipping out trying to get this done by midnight.... :(

4. KonradZuse Group Title

There was also a trick someone taught me that if I take the A * A^-1 I can use that to find my answer; however i got 0 for my determinant so........ Idk how that works, everything = 0? I don't think so...... Maybe?

5. KonradZuse Group Title

nope, it's correct.....

6. KonradZuse Group Title

Tk have you come to save me? :P

7. tkhunny Group Title

Ax = b Introduce the Transpose $$A^{T}Ax = A^{T}b$$ Hope that $$A^{T}A$$ is non-singular and calculate it's inverse: $$\left(A^{T}A\right)^{-1}\left(A^{T}A\right)x = \left(A^{T}A\right)^{-1}A^{T}b$$ $$Ix = \left(A^{T}A\right)^{-1}A^{T}b$$

8. KonradZuse Group Title

Oh were you the one who showed me that trick with the -1? When taking the determinant I get 0... What happens then? Is it all 0? lol

9. tkhunny Group Title

Determinant? It's an inverse.

10. tkhunny Group Title

Unfortunately, your $$\left(A^{T}A\right)^{-1}$$ is singular. We should have seen this from the original data. Column 2 is rather obviuosly twice Column 1. Where does that leave us?

11. KonradZuse Group Title

I thought taking the inverse is the same as taking the determinant?

12. KonradZuse Group Title

I guess I konfused myself again :p.

13. KonradZuse Group Title

1/ad-bc [d -b -c a]?

14. KonradZuse Group Title

:P

15. tkhunny Group Title

No, the Determinat CAN be used as part of finding an Inverse, depending on how you find an Inverse. However, in this case, there is no Inverse. The determinant will not help you find it.

16. KonradZuse Group Title

ic, so what happens since there is none?

17. KonradZuse Group Title

I got 0 so that makes sense.

18. tkhunny Group Title

Well, just for practice, can you write the Normal Equations? I'll get you started: $$\sum x_{1} + 3\cdot\sum x_{2} = \sum y$$ You write the other two.

19. KonradZuse Group Title

3x1 +9x2= y

20. KonradZuse Group Title

-2x1 - 6x2

21. tkhunny Group Title

Whoops! Using the model $$I = \left(a\cdot x_{1} + b\cdot x_{2} - y\right)^{2}$$ Forget that first thing. You did exactly what I told you and that was incorrect. We're trying to FIND the coefficients, not just invent them! Find $$\dfrac{\partial I}{\partial a}$$ and $$\dfrac{\partial I}{\partial b}$$

22. KonradZuse Group Title

I'm soo konfused.......

23. KonradZuse Group Title

I am able to solve everything up until the end where it asks for the final part, that's where IU'm confused. I'll show yu what my book explains.

24. KonradZuse Group Title

25. Zarkon Group Title

for your first question just solve the system (without inverses). you will get an infinite number of solutions. which is fine

26. KonradZuse Group Title

yeah I figured that out 2/7-3*t is x1 and x2 is t.

27. KonradZuse Group Title

part b we already solved the normal eq, now I'm working on the error part 3...

28. KonradZuse Group Title

I'm not sure how to get the decimal answer. My matrix comes out as Vector(3, {(1) = 5/7, (2) = 1/7, (3) = 4/7})

29. Zarkon Group Title

are you taking the error to be $\|Ax-b\|$

30. KonradZuse Group Title

first it shows the error vector, then shows that.

31. KonradZuse Group Title

is that asking for the norm?

32. Zarkon Group Title

then just compute it...you have all the pieces yes

33. KonradZuse Group Title

does that error play into it, or what exactly am I computing the norm with?

34. KonradZuse Group Title

error vector*

35. Zarkon Group Title

you are computing $$\|Ax-b\|$$ where for any vector $$v=<a,b,c>$$ $\|v\|=\sqrt{a^2+b^2+c^2}$

36. KonradZuse Group Title

SO I guess we do use that error vector then lol.

37. KonradZuse Group Title

(1/7)*sqrt(42)

38. KonradZuse Group Title

0.9258

39. Zarkon Group Title

seems fine

40. KonradZuse Group Title

Thanks for the help :).