xˉ is a least squares solution of Ax=b⟺xˉ is a solution of ATA=ATb
A has linearly independent columns ⟺ATA is Invertible. It follows from 1 that xˉ=(ATA)−1ATb
Proof
With linear map LA:Rn→Rm
We find yˉ∈Range(LA) such that ∣∣b−yˉ∣∣≤∣∣b−y∣∣
Now, we find the vector xˉ such that Axˉ=yˉ. If we can find such a xˉ, then xˉ is the solution because we find we can now map directly to the smallest