One-dimensional and two-dimensional differences