Optimal rank matrix algebras preconditioners