turbowaffle
New member
- Joined
- Apr 3, 2006
- Messages
- 7
I seem to be stuck on the first least-squares problem I have. We are given A
[[1,2,-1]
[2,3,1]
[-1,-1,-2]
[3,5,0]]
and b
[1,0,1,0]
The equation I have says the least squares solution is
(At * A)^-1 * At * b
Where At is A transposed, which I have as
[[1,2,-1,3]
[2,3,-1,5]
[-1,1,-2,0]]
For At * A, I get
[[15,24,3]
[24,39,3]
[-1,-3,4]]
Which I don't think is right, because it is not invertible. Any ideas what I'm doing wrong?
[[1,2,-1]
[2,3,1]
[-1,-1,-2]
[3,5,0]]
and b
[1,0,1,0]
The equation I have says the least squares solution is
(At * A)^-1 * At * b
Where At is A transposed, which I have as
[[1,2,-1,3]
[2,3,-1,5]
[-1,1,-2,0]]
For At * A, I get
[[15,24,3]
[24,39,3]
[-1,-3,4]]
Which I don't think is right, because it is not invertible. Any ideas what I'm doing wrong?