cleaned up dot_products and divide, multiply for fvar matrix