Derivation Of Least Square Matrix Algebra