As a natural, fast mathematical formula input, online handwritten mathematical formula input have great prospects. The paper described the algorithm of recognizing the common online handwritten mathematical formula structure. Firstly, the forms were defined, the convention of formulas were expanded. A method of calculating weight for the minimum spanning tree(MST) was proposed according to the characteristics of hand-written formula. On the basis of them, MST algorithm was applied to formula structural analysis. Then two new algorithms were proposed to recognize the mix form and table structure respectively. Compared with other classical algorithms, the algorithm proposed in this paper can recognized the expansive structure, while recognition rate was improved.