  We study quadratic optimization with indicator variables and an M-matrix,
i.e., a PSD matrix with non-positive off-diagonal entries, which arises
directly in image segmentation and portfolio optimization with transaction
costs, as well as a substructure of general quadratic optimization problems. We
prove, under mild assumptions, that the minimization problem is solvable in
polynomial time by showing its equivalence to a submodular minimization
problem. To strengthen the formulation, we decompose the quadratic function
into a sum of simple quadratic functions with at most two indicator variables
each and provide the convex-hull descriptions of these sets. We also describe
strong conic quadratic valid inequalities. Preliminary computational
experiments indicate that the proposed inequalities can substantially improve
the strength of the continuous relaxations with respect to the standard
perspective reformulation.
