Rotation is a well-known operation on lists. We define its two-dimensional analogue and discuss its implementation in Prolog using difference lists. An application to the iterative solution of a system of linear equations by the Gauss–Seidel method is given.