linear regression linear algebra derivation