Check my answer for least square solution of Ax=b
I was just trying to solve a couple of questions from the past exam tests and I've got the following answer for this question. Can someone check if my answer is right. I am not so sure. Thanks!
A = [ 1 1 0
1 1 0
1 0 1
1 0 1]
and b = [1,3,8,2]^T. Find the least squares solutions of the system Ax=b.
The general least squares solution to this sort of problem is:
x = ((A^T)A)^(-1)*((A^T)*b)
In this case this will not yield a solution, since you have two pairs of identical rows, the A matrix represents only 2 independent realtions. As such, ((A^T)A) is singular so no solution exists.