local min in matrix