In open heterogeneous context-aware pervasive computing systems, suitable context models and reasoning approaches are necessary to enable collaboration and distributed reasoning among agents. This paper proposes, develops, and demonstrates the following: 1) a novel context model and reasoning approach developed with concepts from the state-space model, which describes context and situations as geometrical structures in a multidimensional space; and 2) a context algebra based on the model, which enables distributed reasoning by merging and partitioning context models that represent different perspectives of computing entities over the object of reasoning. We show how merging and reconciling different points of view over context enhances the outcomes of reasoning about the context. We develop and evaluate our proposed algebraic operators and reasoning approaches with cases using real sensors and with simulations. We embed agents and mobile agents with these modeling and reasoning capabilities, thus facilitating context-aware and adaptive mobile agents operating in open pervasive environments.