Tensors: geometry, optimization, and applications