MathChat: computational mathematics via a social machine. The main question of this research is: how does a social machine discover algorithmic mathematical knowledge? A social machine is a system of humans and computers engaged in some purposeful activity. To address the main question, an empiric and theoretical framework for algorithmic mathematical knowledge discovered by the social machine is proposed. The framework is derived from findings in distributed cognition documenting how collaborators evolve a mathematical algorithm. By combining distributed cognition with the standard message passing model of distributed computing, a formalism is introduced to specify the activities of the social machine and its algorithmic knowledge. Furthermore, the software system MathChat is introduced which provides an online environment for social machines engaged in mathematical computations. An application of MathChat in network analysis education is described which outlines a social machine covered by the proposed framework.