In this work, we study theoretical models of programmable matter systems. The systems under consideration consist of spherical modules, kept together by magnetic forces and able to perform two minimal mechanical operations (or movements): rotate around a neighbor and slide over a line. In terms of modeling, there are n nodes arranged in a 2-dimensional grid and forming some initial shape. The goal is for the initial shape A to transform to some target shape B by a sequence of movements. Most of the paper focuses on transformability questions, meaning whether it is in principle feasible to transform a given shape to another. We first consider the case in which only rotation is available to the nodes. Our main result is that deciding whether two given shapes A and B can be transformed to each other, is in P. We then insist on rotation only and impose the restriction that the nodes must maintain global connectivity throughout the transformation. We prove that the corresponding transformability question is in PSPACE and study the problem of determining the minimum seeds that can make feasible, otherwise infeasible transformations. Next we allow both rotations and slidings and prove universality: any two connected shapes A, B of the same order, can be transformed to each other without breaking connectivity. The worst-case number of movements of the generic strategy is Ω(n 2 ). We improve this to O(n) parallel time, by a pipelining strategy, and prove optimality of both by matching lower bounds. In the last part of the paper, we turn our attention to distributed transformations. The nodes are now distributed processes able to perform communicate-compute-move rounds. We provide distributed algorithms for a general type of transformations. Such a material would be able to adjust its shape in a programmable way. Other examples of physical properties of interest for real applications would be connectivity, color [27,5], and strength of the material.Computer scientists, nanoscientists, and engineers are more and more joining their forces towards the development of such programmable materials and have already produced some first impressive outcomes (even though it is evident that there is much more work to be done in the direction of real systems), such as programmed DNA molecules that self-assemble into desired structures [30,13] and large collectives of tiny identical robots that orchestrate resembling a single multi-robot organism (Kilobot system) [31]. Other systems for programmable matter include the Robot Pebbles [21], consisting of 1cm cubic programmable matter modules able to form 2-dimensional (usually abbreviated "2D") shapes through selfdisassembly, and the Millimotein [24], a chain of programmable matter which can fold itself into digitized approximations of arbitrary 3-dimensional (usually abbreviated "3D") shapes. Ambitious long-term applications of programmable materials include molecular computers, collectives of nanorobots injected into the human circulatory system for monitoring and treating diseases, or ev...