# Accented Equations Error

I am facing few errors when I try to write accented letters in equations. Below is an MWE of my code. I am sure I am making a very basic mistake but the problem is that I have written a lot of equations using same commands and I can't edit them now. So I will request both a 'quick fix' solution for my document and a 'proper solution' to avoid it in the future. I am totally a novice both on this forum as well as latex so I apologize for any inconvenience in advance. Thanks

\documentclass{article}
\begin{document}
$$\vec{r}_1=r_1\^{r}_1=-r_1\^{e}_r$$
\end{document}


When I run this code, I get the following errors shown in figure below.

Whereas I want the output as shown in figure below.

You can use \hat in a math environment:

\documentclass[]{article}
\begin{document}
$$\vec{r}_1=r_1\hat{r}_1=-r_1\hat{e}_r$$
\end{document}


• Excellent that qualifies to be my long term solution. However, I have written few hundred equations using '\^'. Any quick fix for that also will be highly appreciated. Otherwise, I will have to be content with editing all my equations and close this as answer. Thank you very much! – Mist Aug 25 '15 at 11:57
• Hmm. Not sure I can help with a quick fix. How about using a find & replace option in an editor? That might work reasonably quickly, even with a few hundred equations. If you are using, e.g., TexMaker, you could try Edit -> Replace and use "Replace all". – RHertel Aug 25 '15 at 12:00
• @Mist There is a reason why \^ is not used in math mode. It means now not the circumflex accent, but for example Fourier transform. – Przemysław Scherwentke Aug 25 '15 at 12:32