A novel approach for trajectory tracking of a mobile-robots formation by using linear algebra theory and numerical methods is presented in this paper. The formation controller design is based on the formation states concept and the dynamic model of a unicycle-like nonholonomic mobile robot. The proposed control law designed is decentralized and scalable. Simulations and experimental results confirm the feasibility and the effectiveness of the proposed controller and the advantages of using the dynamic model of the mobile robot. By using this new strategy, the formation of mobile robots is able to change its configuration (shape and size) and follow different trajectories in a precise way, minimizing the tracking and formation errors.