The medial axis transform of a 2D region was introduced by Blum in the 1960's as an aid to the description of biological shape. It is an alternative representation of a region which is often more amenable to analysis. This property has led to its use in diverse fields including pattern recognition and automatic finite element mesh generation. There are two widely agreed mathematical definitions for the medial axis transform which are closely related. It is shown that these definitions are not in general equivalent, despite being so far many types of region. In this paper, precise mathematical definitions of the medial axis transform and its key points (atoms) are given, and an O(n2) algorithm for its computation via those atoms presented. This algorithm is described in terms of simple polygons whose sole boundary consists of circular arcs and straight line segments, then extended to polygons with holes. It is shown how more complex edges could be accommodated. In comparison with existing algorithms it is simple to implement and stable in the presence of geometric degeneracy.