Algebraic relationships between classical regression and total least-squares estimation