solving linear parameters using normal equation