Abstract. Let K := SO (2) A1 ∪ SO (2) A2 . . . SO (2) AN where A1, A2, . . . , AN are matrices of nonzero determinant. We establish a sharp relation between the following two minimisation problems in two dimensions. Firstly the N -well problem with surface energy. Let p ∈ [1, 2], Ω ⊂ R 2 be a convex polytopal region. Defineand let AF denote the subspace of functions in W 2,2 (Ω) that satisfy the affine boundary condition Du = F on ∂Ω (in the sense of trace), where F ∈ K. We consider the scaling (with respect to ) of