  Domain branching near the boundary appears in many singularly-perturbed
models for microstructure in materials and was first demonstrated
mathematically by Kohn and M\"uller for a scalar problem modeling the elastic
behavior of shape-memory alloys. We study here a model for shape-memory alloys
based on the full vectorial problem of nonlinear elasticity, including
invariance under rotations, in the case of two wells in two dimensions. We show
that, for two wells with two rank-one connections, the energy scales
proportional to the power $2/3$ of the surface energy, in agreement with the
scalar model. In a case where only one rank-one connection is present, we show
that the energy exhibits a different behavior, proportional to the power $4/5$
of the surface energy. This lower energy is achieved by a suitable interaction
of the two components of the deformations and hence cannot be reproduced by the
scalar model. Both scalings are proven by explicit constructions and matching
lower bounds.
