I am trying to achieve ^ over any letter in math formula. In normal text, it works with \^letter. However in my case, I am using

    \mathcal{L} = \frac{1}{n}\sum_{i=1}^{n}(y^{i}-\^{y}^{(i)})^{2}

which outputs nothing on the place where y with ^ should be. What is a workaround for this or how can I achieve it?

Thanks for help.


The math accent for ^ is called \hat, see "The Comprehensive LaTeX Symbol List".

  \mathcal{L} = \frac{1}{n}\sum_{i=1}^{n}(y^{i}-\hat{y}^{(i)})^{2}


| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.