Let be a directed acyclic graph with arcs, a source and a sink . We introduce the cone of flow matrices, which is a polyhedral cone generated by the matrices , where is the incidence vector of the path . We show that several hard flow (or path) optimization problems, that cannot be solved by using the standard arc‐representation of a flow, reduce to a linear optimization problem over . This cone is intractable: we prove that the membership problem associated to is NP‐complete. However, the affine hull of this cone admits a nice description, and we give an algorithm which computes in polynomial‐time the decomposition of a matrix as a linear combination of some 's. Then, we provide two convergent approximation hierarchies, one of them based on a completely positive representation of . We illustrate this approach by computing bounds for the quadratic shortest path problem, as well as a maximum flow problem with pairwise arc‐capacities.