0

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

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

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.

1

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

\documentclass{article}
\begin{document}
\[
  \mathcal{L} = \frac{1}{n}\sum_{i=1}^{n}(y^{i}-\hat{y}^{(i)})^{2}
\]
\end{document}

Result

| improve this answer | |

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