# 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}
$$\vec{r}_1=r_1\hat{r}_1=-r_1\hat{e}_r$$

• @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