Put hat(â, ṟ̂) symbol over a letter or an underlined letter in LaTeX

In this tutorial, you will learn how to get the hat (^) symbol in LaTex over a letter and an underlined letter.

Hat symbol over a letter in math mode

If you want to put the hat symbol over a letter (only one letter or symbol) you can use the \hat{<char>} command.

And if you want to get the hat symbol over multiple letters then you have to use the \widehat{<char>} command.

\documentclass{article}
\begin{document}
  $$ \verb|\hat{a}|\rightarrow \hat{a} $$
  $$ \verb|\widehat{a}|\rightarrow \widehat{a} $$
  $$ \verb|\widehat{ab}|\rightarrow \widehat{ab} $$
  $$ \verb|\widehat{abc}|\rightarrow \widehat{abc} $$
\end{document}

Output:

hat symbol over a letter.

Hat symbol over a letter in text mode

To get that symbol over a letter in text mode you can use the \^{<char>} command.

\documentclass{article}
\begin{document}
   \noindent\verb|\^{a}|$\rightarrow$ \^{a}\\[4pt]
   \verb|\^{o}|$\rightarrow$ \^{o}\\[4pt] 
   \verb|\^{u}|$\rightarrow$ \^{u}\\[4pt]
\end{document}

Output:

hat symbol over a letter in text mode.

Hat(ṟ̂) symbol over an underlined letter in LaTeX

Usually, we use \underline{} command to get an underlined letter.

In order to get the hat symbol over an underlined letter you can use the \underline{} command inside the \hat{} or \widehat{} command like this \hat{\underline{<char>}} or \widehat{\underline{<char>}}.

\documentclass{article}
\begin{document}
  $$ \verb|\hat{\underline{a}}|\rightarrow \hat{\underline{a}}$$
  $$ \verb|\underline{\hat{a}}|\rightarrow \underline{\hat{a}}$$
  $$ \verb|\widehat{\underline{a}}|\rightarrow \widehat{\underline{a}}$$
  $$ \verb|\underline{\widehat{a}}|\rightarrow \underline{\widehat{a}}$$
  $$ \verb|\underline{\widehat{abc}}|\rightarrow \underline{\widehat{abc}}$$
\end{document}

Output:

hat symbol over an underlined letter in text mode.

Leave a Reply

Your email address will not be published. Required fields are marked *