Vector spaces and algebras for chemistry and physics