lec16
Least square
find a line y=C+Dx through: (1,1)(2,2)(3,2) :
111123[CD]=122
in the form of
Ax=b
Minimize :
∥Ax−b∥2=∥e∥2
that is, finding P (projection vector)
Ax^=P
Steps:
A⊤(b−Ax^)A⊤bx^=0=A⊤Ax^=(A⊤A)−1A⊤b
get:
x^=[CD]=[2/31/2]
which means the line is
y=21x+32
When A⊤A is invertible
If A has independent columns, then A⊤A is invertible.
to prove: if A has dependent cols, if A⊤Ax=0 then x=0
$N(A^\top A) =N(A) see[proofof N(A^\top A)=N(A)$ ](lec14%20e323f8c6256b4c4f8fd632761950a29f.md)
trick
A⊤Axx⊤A⊤Ax(Ax)⊤AxAxx=0=0=0=0(square)=0(A has independent columns)
that means A is invertible.
Special case of independent columns
Columns are perp. unit vectors.
e.g.
orthonormal vector