# Error-Undefined control sequence

I occurred a problem recently, but, I　donot know how to solve it?

Error:

Undefined control sequence.
l.26 \eqalignno {P^{-1}&=P_{1}^{-1}+P_{2}^{-1}\cr P^{-1}\mathhat{x}&=P_{1}^...  My codes: \documentclass{article} \usepackage{amsmath} \begin{document}\eqalignno{P^{-1}&=P_{1}^{-1}+P_{2}^{-1}\cr P^{-1}\mathhat{x}&=P_{1}^{-1}\mathhat{x}_{1}+P_{2}^{-1}\mathhat{x}_{2}.&\hbox{(7)}}\end{document}  ## 1 Answer Is this you want? \documentclass{article} \usepackage{amsmath,amssymb} \begin{document} \begin{align} \begin{aligned} P^{-1} &=P_{1}^{-1}+P_{2}^{-1}\\ P^{-1}\hat{x}&=P_{1}^{-1}\hat{x}_{1}+P_{2}^{-1}\hat{x}_{2}%.(7) \end{aligned} \end{align} \end{document}  Actually, I should admit that I don't understand your code (\eqalignno and \mathhat). And in latex, don't use .

• \eqalignno is macro from plainTeX, but \mathhat is unknown. The construction looks like plain TeX and the first three lines and the last line of OP's code is only something like curiosity. – wipet Apr 8 '15 at 13:17
• Yes, thank you, you solved my problems. It seems I mix the Tex  codes with Latex environment, see this, tex.stackexchange.com/a/55694/44227. – wayne Apr 8 '15 at 13:17
• @wipet You are right, actually, I copy this code from TEX Source of an IEEE paper which is a Full Text in HTML version in order to be used in my paper. – wayne Apr 8 '15 at 13:25