The flow matrix