On Geometric Optimization, Learning and Control