distributing dot products to factorize linear models